Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

berkeley: Update minter to use first typecode when pattern contains multiple typecodes #592

Closed
kheal opened this issue Jul 16, 2024 · 2 comments · Fixed by #597
Closed
Assignees
Labels
berkeley-schema Related to making the Runtime work with the Berkeley schema bug Something isn't working X SMALL Less than 1 day

Comments

@kheal
Copy link

kheal commented Jul 16, 2024

In berkeley-schema-fy24, some of the syntax declarations on ids of classes result in extra parentheses during minting on the berkeley-schema nmdc runtime. This results in badly minted ids for instances of new classes.

There are two existing classes in the berkeley schema where the id typecodes need to be either "dgns" or "omprc", but the minter should only mint IDs for "dgns".

This class

NucleotideSequencing:
    class_uri: nmdc:NucleotideSequencing
    is_a: DataGeneration
    slot_usage:
      id:
        structured_pattern:
          syntax: "{id_nmdc_prefix}:(dgns|omprc)-{id_shoulder}-{id_blade}$"
          interpolated: true

Needs to mint ids with dgns (not omprc).

Criteria for Completion

minting for NucleotideSequencing and MassSpectrometry classes generates ids with typecodes "dgns" and "dgms" respectively.

Reference: microbiomedata/nmdc-schema#2122

@kheal kheal changed the title Adjust minting when id has multiple typecodes (like "(dgms|omprc)") to mint IDs with the first typecode (in nmdc runtime) berkeley: Adjust minting when id has multiple typecodes (like "(dgms|omprc)") to mint IDs with the first typecode Jul 16, 2024
@kheal kheal transferred this issue from microbiomedata/nmdc-schema Jul 16, 2024
@kheal kheal changed the title berkeley: Adjust minting when id has multiple typecodes (like "(dgms|omprc)") to mint IDs with the first typecode berkeley: Adjust minting when id has multiple typecodes to mint IDs with the first typecode Jul 16, 2024
@eecavanna eecavanna changed the title berkeley: Adjust minting when id has multiple typecodes to mint IDs with the first typecode berkeley: Update minter to use first typecode when pattern contains multiple typecodes Jul 16, 2024
@eecavanna eecavanna added bug Something isn't working X SMALL Less than 1 day labels Jul 16, 2024
@aclum
Copy link
Contributor

aclum commented Jul 16, 2024

FWIW this endpoint will return what runtime things the typecodes are

curl -X 'GET' \
  'https://api-berkeley.microbiomedata.org/nmdcschema/typecodes' \
  -H 'accept: application/json' 

Response body agree's with issues noted by @kheal

cc @turbomam

@aclum aclum added the berkeley-schema Related to making the Runtime work with the Berkeley schema label Jul 16, 2024
@eecavanna eecavanna self-assigned this Jul 17, 2024
@eecavanna eecavanna moved this to 🏗 In Progress in Berkeley-Schema Refactor Roll Out Jul 17, 2024
@eecavanna eecavanna moved this from In Progress to In Review in 2024 - Sprint 41 - July 15-26, 2024 Jul 17, 2024
@eecavanna eecavanna moved this from 🏗 In Progress to 👀 In Review in Berkeley-Schema Refactor Roll Out Jul 17, 2024
@eecavanna eecavanna moved this from In Review to Done in 2024 - Sprint 41 - July 15-26, 2024 Jul 18, 2024
@eecavanna eecavanna moved this from 👀 In Review to ✅ Done in Berkeley-Schema Refactor Roll Out Jul 18, 2024
@eecavanna
Copy link
Collaborator

This is done in the berkeley branch now.

@eecavanna eecavanna added this to the Berkeley schema compatibility 🤝 milestone Aug 30, 2024
@eecavanna eecavanna removed this from the Berkeley schema compatibility 🤝 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
berkeley-schema Related to making the Runtime work with the Berkeley schema bug Something isn't working X SMALL Less than 1 day
Projects
No open projects
3 participants