Skip to content

Commit

Permalink
regex tweak
Browse files Browse the repository at this point in the history
ddooley committed Jan 23, 2025
1 parent cc04ea7 commit f1b861a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions script/oca_to_linkml.py
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@
base: str
uri: xsd:token
settings:
Title_Case: '(((?<=\b)[^a-z\W]\w*?|[\W])+)'
Title_Case: '((?<=\b)[^a-z\W]\w*?|[\W])+'
UPPER_CASE: '[A-Z\W\d_]*'
lower_case: '[a-z\W\d_]*'
"""
@@ -182,6 +182,9 @@ def writeSchemaCore():
'description': SCHEMA["description"],
'is_a': 'dh_interface'
}
# ISSUE: Each class may have (meta) title and description fields translated
# but we don't have a SCHEMA_CLASSES table to handle translations in
# tabular_to_schema.py, so can't communicate them.

with open("schema_core.yaml", 'w') as output_handle:
yaml.dump(SCHEMA, output_handle, sort_keys=False);
@@ -201,7 +204,7 @@ def writeSlots():
slot['name'] = slot_name;
slot['title'] = oca_labels[slot_name];
slot['range'] = oca_attributes[slot_name]; # ISSUE: Numeric
slot['pattern'] = "^" + oca_formats[slot_name] + "$";
slot['pattern'] = oca_formats[slot_name];
slot['description'] = oca_informations[slot_name];

# Range 2 gets any picklist for now.

0 comments on commit f1b861a

Please sign in to comment.