microbiomedata / sheets_and_friends

Enhance a LinkML model with imported and optionally modified slots
0 stars 0 forks source link

unrecognized range (unit) from poetry run gen-project #128

Open turbomam opened 2 years ago

turbomam commented 2 years ago
poetry run gen-project \
        --exclude shacl \
        --exclude owl \
        --exclude excel \
        --exclude java \
        --dir project artifacts/nmdc_dh.yaml 2>> logs/gen-project.log

ValueError: File "", line 14587, col 12 slot: has unit - unrecognized range (unit)

We don't really need the generated artifacts. I just find it a good way to apply lots of different validations.

turbomam commented 2 years ago

while commenting out rules that seemed unnecessary

turbomam commented 2 years ago

to be very clear: the input is artifacts/nmdc_dh.yaml

which has this definition

  has unit:
    name: has unit
    description: Links a quantity value to a unit
    from_schema: https://microbiomedata/schema/core
    aliases:
    - scale
    mappings:
    - qud:unit
    - schema:unitCode
    range: unit
turbomam commented 2 years ago

Sure enough, no unit term is defined

https://github.com/microbiomedata/nmdc-schema/blob/main/src/schema/core.yaml defines unit as a type:

  unit:
    base: str
    uri: xsd:string
    mappings:
      - qud:Unit
      - UO:0000000
turbomam commented 2 years ago

Quick fix: add unit to the Google Sheet?

1cMlPKgjZh-v21aMYCm9x1TxzE5BwGQptBQcvuaYAtC8 # nmdc-dh-sheets-mam-non-anno... rename me!