NIST data records library #9
ion-oset
started this conversation in
Design & Development
Replies: 1 comment 1 reply
-
A few comments to start the discussion:
What would this look like in practice, using this records library? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal
Create a library that defines Python data classes for each of the NIST schemas that can be shared between all ElectOS subsystems that are built (initially the ones using Python).
Rationale & Design Goals:
Schemas
The schemas in question are the ones listed in NIST Publications:
Design decisions
Start with Python
Rationale:
Use data classes
"Data classes", aka "records", "plain old data", "structs" are classes with no methods. Functionality can be added to them as class methods or via subclasses, but there's no data attached to a basic record beyond the data extracted from the schema.
Rationale:
Use a code generator
Don't write these classes by hand. Existing generators get us most of the way there. If we need to do so we can we can develop a custom generator that allows us complete control over the output.
Rationale:
ifwhen dependencies change.Use the standard's JSON Schema as the source of truth
We don't need to be limited to JSON, or to require it, but as an initial source of truth it has some advantages:
Example
An example of what this looks like for NIST SP-1500-102 is what's currently in Vanadium Core: vanadium/models/nist
Beta Was this translation helpful? Give feedback.
All reactions