While loading the OAP ontology programmatically with Python's yaml.safe_load, three files in data/ fail to parse. All issues are pure YAML lint, not semantic:
- data/facilities/site.yaml (line 58)
Stray TAB character at end of line:
- primaryFunction: Courthouse<TAB>
Fix: Strip the trailing tab.
- data/type-tags.yaml (lines 1430–1463)
34 consecutive lines in the primaryFunction ENUM list have trailing TAB characters (looks like a paste from a tab-delimited source):
- Bank Branch<TAB>
- Casino<TAB>
- College/University<TAB><TAB>
- Courthouse<TAB>
...
Fix: Strip trailing whitespace across the block. A one-liner: sed -i 's/[[:space:]]*$//' data/type-tags.yaml.
- data/waste/equip.waste.yaml (lines 1–7)
Two issues at the top of the file:
Waste equipment definitions
Bin
BIN
name: Waste Bin
Lines 3–4 (Bin / - Extend base type) appear to be a draft note that isn't valid YAML.
Line 6 (BIN) is missing its trailing :, so the loader can't recognize it as a mapping key — which is why the parser then errors at the name: on line 7 with mapping values are not allowed here.
Fix:
Waste equipment definitions
BIN:
name: Waste Bin
...
(Comment out or remove the "Bin / - Extend base type" lines, and add : after BIN.)
Reproduction:
import yaml
for f in ['data/facilities/site.yaml', 'data/type-tags.yaml', 'data/waste/equip.waste.yaml']:
try:
yaml.safe_load(open(f).read())
except yaml.YAMLError as e:
print(f, e)
Impact for downstream consumers: any tool using a strict YAML parser silently loses ~263 type-tag entries, the BIN equipment definition, and the COURT site definition unless it implements per-file fallback / lint repair.
While loading the OAP ontology programmatically with Python's yaml.safe_load, three files in data/ fail to parse. All issues are pure YAML lint, not semantic:
Stray TAB character at end of line:
Fix: Strip the trailing tab.
34 consecutive lines in the primaryFunction ENUM list have trailing TAB characters (looks like a paste from a tab-delimited source):
Fix: Strip trailing whitespace across the block. A one-liner: sed -i 's/[[:space:]]*$//' data/type-tags.yaml.
Two issues at the top of the file:
Waste equipment definitions
Bin
BIN
name: Waste Bin
Lines 3–4 (Bin / - Extend base type) appear to be a draft note that isn't valid YAML.
Line 6 (BIN) is missing its trailing :, so the loader can't recognize it as a mapping key — which is why the parser then errors at the name: on line 7 with mapping values are not allowed here.
Fix:
Waste equipment definitions
BIN:
name: Waste Bin
...
(Comment out or remove the "Bin / - Extend base type" lines, and add : after BIN.)
Reproduction:
import yaml
for f in ['data/facilities/site.yaml', 'data/type-tags.yaml', 'data/waste/equip.waste.yaml']:
try:
yaml.safe_load(open(f).read())
except yaml.YAMLError as e:
print(f, e)
Impact for downstream consumers: any tool using a strict YAML parser silently loses ~263 type-tag entries, the BIN equipment definition, and the COURT site definition unless it implements per-file fallback / lint repair.