Add JSON-LD properties#11
Open
JR-1991 wants to merge 4 commits into
Open
Conversation
Bump uuid dependency from 1.16.0 to 1.18.1 with v4 feature enabled and add the derivative crate version 2.2.0 to Cargo.toml. This updates dependencies for improved functionality and compatibility.
Introduces JSON-LD headers and an additional_properties field to all major structs in the v2 schema for extensibility and semantic web compatibility. Updates macros to populate these fields and adds tests to verify the new behavior.
Added `..Default::default()` to struct initializations in SBML conversion implementations to ensure all fields are properly initialized. Also refactored default value usage in v2.rs and simplified context term insertions for JSON-LD header functions.
Reformatted all JSON-LD header functions to use multi-line and indented insertions for context terms, improving code readability and maintainability. No functional changes were made; only code style and formatting were updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to unit macros by adding default JSON-LD headers and support for additional properties, as well as bringing in new dependencies for UUID and code derivation. The main focus is on enriching the metadata for unit and base unit structures, which will help with serialization and interoperability.
Dependency additions:
uuid(v1.18.1, with v4 feature) andderivative(v2.2.0) as new dependencies inCargo.tomlto support unique identifiers and code derivation features.Unit macro enhancements:
build_base_unit!,inverse_unit!,ratio_unit!, andsimple_unit!macros to include ajsonldfield with a default header and anadditional_propertiesfield set toNonein the generated structs, improving metadata completeness. [1] [2] [3] [4]Testing improvements:
additional_propertiesfield is set toNone, ensuring the new field is correctly initialized. [1] [2]