glossarist / glossarist-ruby

Concept modeller in Ruby
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

(URGENT) `save_to_file` should never create broken file names #70

Closed ronaldtse closed 1 year ago

ronaldtse commented 1 year ago

In iso-10303-2:

concept-62-6096.yaml
concept-62-6097.yaml
concept-62-6098.yaml
concept-62-6099.yaml
concept-62-6100.yaml
concept-62-6101.yaml
concept-62-6102.yaml
concept-62-6103.yaml
concept-["20"@16, "13584"@10]-5301.yaml
concept-["20"@16, "13584"@10]-5302.yaml
concept-["20"@16, "13584"@10]-5303.yaml
concept-["20"@16, "13584"@10]-5304.yaml
concept-["20"@16, "13584"@10]-5305.yaml
concept-["20"@16, "13584"@10]-5306.yaml
concept-["20"@16, "13584"@10]-5307.yaml
concept-["20"@16, "13584"@10]-5308.yaml
concept-["20"@16, "13584"@10]-5309.yaml

The latter filenames are completely invalid and must be fixed.

ronaldtse commented 1 year ago

In the Concept YAML the IDs are completely messed up:

termid: '["20"@16, "13584"@10]-5302'
term: simple_generic_expression
eng:
  id: '["20"@16, "13584"@10]-5302'
  terms:
  - type: expression
    normative_status: preferred
    designation: simple_generic_expression
  definition:
  - content: "{{entity data type}} that is a type of {{generic_expression}} that represents
      the simple generic expression {{entity}}"
  notes:
  - {}
  examples: []
  language_code: eng
  domain: 'resource: iso13584_generic_expressions_schema'
  sources:
  - type: authoritative
    origin:
      ref: ISO 10303-["20"@16, "13584"@10]:2013
      link: https://www.iso.org/standard/32858.html
  part: '["20"@16, "13584"@10]'
ronaldtse commented 1 year ago

We must enforce ID to be a string unless it is overridden by a subclass.