Introduce a new inventory JSON/dict format that preserves more primitive types #200
+126
−33
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 includes several changes to improve inventory management and proxy version handling, as well as the addition of new tests. The most important changes include the introduction of versioning in
to_dict
andfrom_dict
functions, updates to the proxy version, and the addition of utility functions to handle primitive types.Inventory Management Enhancements:
speasy/core/inventory/indexes.py
: Added aversion
parameter to theto_dict
,from_dict
,to_json
, andfrom_json
functions to support different versions of inventory serialization. [1] [2]speasy/data_providers/cda/_inventory_builder/__init__.py
: Updated various functions to use constants for inventory keys and added versioning support into_dict
andfrom_dict
calls. [1] [2]speasy/data_providers/csa/__init__.py
: Added the_only_primitive_types
function to ensure metadata contains only primitive types before serialization. [1] [2]Proxy Version Update:
speasy/core/proxy/__init__.py
: Updated theMINIMUM_REQUIRED_PROXY_VERSION
to "0.12.0" and added versioning support in theget
function. [1] [2]Testing Enhancements:
tests/test_inventories.py
: Added new tests to ensure that thefrom_dict
andto_dict
functions preserve the inventory structure and data accurately.