Skip to content

Commit

Permalink
Fix property name extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
ehennestad committed Nov 13, 2024
1 parent 49c8202 commit e3fdba1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ downloads/
target/
_sources/

docs/reports/

# Autosave files
*.asv
*.m~
Expand Down
3 changes: 2 additions & 1 deletion pipeline/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _build_mixed_type_class(self, schema, prop):

def _create_matlab_name(json_name):
"""Remove the openMINDS prefix from a name"""
return json_name.replace(OPENMINDS_VOCAB_URI, '')
return json_name.split('/')[-1]

def _generate_class_name(iri):
"""
Expand Down Expand Up @@ -528,6 +528,7 @@ def _create_property_validator_functions(name, property_info):

def _expand_type_namespace( type_specifier ):
if type_specifier.startswith('https://'):
# For versions 3 and below, the type specifier is already fully expanded in the schema
return type_specifier
else:
schema_type_name = type_specifier.split(':')[-1]
Expand Down

0 comments on commit e3fdba1

Please sign in to comment.