Skip to content

Commit

Permalink
Merge pull request hed-standard#992 from IanCa/develop
Browse files Browse the repository at this point in the history
Fix create_ontology using the wrong tag range for libraries
  • Loading branch information
VisLab authored Jul 26, 2024
2 parents e0d4a21 + 30e2453 commit 3b6d897
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hed/schema/schema_io/ontology_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_library_name_and_id(schema):
"""

name = schema.library

library_data = get_library_data(name)
starting_id, _ = library_data.get("id_range", (UNKNOWN_LIBRARY_VALUE, UNKNOWN_LIBRARY_VALUE))
if not name:
Expand Down Expand Up @@ -117,6 +117,8 @@ def update_dataframes_from_schema(dataframes, schema, schema_name="", get_as_ids
These dataframes can potentially have extra columns
"""
hedid_errors = []
if not schema_name:
schema_name = schema.library
# 1. Verify existing hed ids don't conflict between schema/dataframes
for df_key, df in dataframes.items():
section_key = constants.section_mapping.get(df_key)
Expand Down Expand Up @@ -250,7 +252,7 @@ def _get_annotation_prop_ids(dataframes):
# Also add schema properties
annotation_props.update(
{key: value for key, value in zip(dataframes[constants.ATTRIBUTE_PROPERTY_KEY][constants.name],
dataframes[constants.ATTRIBUTE_PROPERTY_KEY][constants.hed_id])})
dataframes[constants.ATTRIBUTE_PROPERTY_KEY][constants.hed_id])})

return annotation_props

Expand Down

0 comments on commit 3b6d897

Please sign in to comment.