Skip to content

Commit f1b861a

Browse files
committed
regex tweak
1 parent cc04ea7 commit f1b861a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

script/oca_to_linkml.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
base: str
5050
uri: xsd:token
5151
settings:
52-
Title_Case: '(((?<=\b)[^a-z\W]\w*?|[\W])+)'
52+
Title_Case: '((?<=\b)[^a-z\W]\w*?|[\W])+'
5353
UPPER_CASE: '[A-Z\W\d_]*'
5454
lower_case: '[a-z\W\d_]*'
5555
"""
@@ -182,6 +182,9 @@ def writeSchemaCore():
182182
'description': SCHEMA["description"],
183183
'is_a': 'dh_interface'
184184
}
185+
# ISSUE: Each class may have (meta) title and description fields translated
186+
# but we don't have a SCHEMA_CLASSES table to handle translations in
187+
# tabular_to_schema.py, so can't communicate them.
185188

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

207210
# Range 2 gets any picklist for now.

0 commit comments

Comments
 (0)