record unit types in the demand-type vocabulary - #45
Merged
Conversation
Add a canonical EDP_TYPES mapping that stores the acronym and unit type of every demand type, and a UNIT_TYPES vocabulary (acceleration, speed, displacement, unitless, rotation). EDP_to_demand_type is now derived from EDP_TYPES with content identical to before, so existing consumers are unaffected. Unit types let consumers (e.g., pelicun 3.10+) infer physical units for demand columns from the vocabulary.
Bump the version to 3.1, refresh uv.lock, and add the 3.1 changelog entry and release notes.
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 PR extends the controlled vocabularies with unit-type
information for demand types. The model data itself is unchanged.
EDP_TYPESmapping records each demand type's short acronym and thephysical quantity it is measured in, and the new
UNIT_TYPESvocabulary enumerates the valid unit types (
acceleration,speed,displacement,unitless,rotation,force,force_per_length,pressure). Consumers — most immediately Pelicun 3.10 — can inferphysical units for demand data from the vocabulary instead of
maintaining hardcoded lists.
EDP_to_demand_typeis now derived fromEDP_TYPESwith contentidentical to before, so existing consumers are unaffected.