-
Notifications
You must be signed in to change notification settings - Fork 5
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
#597
berkeley
: Update minter to use first typecode when pattern contains multiple typecodes
#597
Conversation
Thanks @eecavanna, this looks good to me and was turned around very fast. I am going to restate the obvious: this requires that we agree on what typecode should appear first in the @aclum @kheal what are your thoughts about that? I think you or others you nominate should be end-user reviewers of this PR. |
@turbomam . Good point and I agree re: documentation. I think this is a schema/documentation request and at the least can be naturally incorporated into the CONTRIBUTING guide in microbiomedata/berkeley-schema-fy24#225, I've added it to that PR. |
This is fine as a workaround but longer term I'd like something more explicit in the schema, like a separate slot which specifies the minting typecode @turbomam |
I will work with @kheal to create either an Issue or a Discussion in |
There is now a discussion in the |
I changed the base branch from |
berkeley
: Update minter to use first typecode when pattern contains multiple typecodes
Description
In this branch, I updated the minter so that, in addition to extracting typecodes verbatim from patterns in the schema, it now also extracts the first typecode in a
(...|...|...)
-formatted sequence.I also added a
TODO
comment about moving away from extracting typecodes from these pattern strings, which I think are authored with the mindset of "here's what I want the schema to allow for values in this field," as opposed to "here's what I want the minter to use when creating an ID."Fixes #592
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
$ python -m doctest -v nmdc_runtime/minter/config.py
within thefastapi
container in my development environment. Looks to me like this may be able to be incorporated into the existingpytest
infrastructure (based on what I see in the pytest documentation, here), but I haven't done it yet.Definition of Done (DoD) Checklist:
black nmdc_runtime/
?)docs/
and in <htt ps://github.com/microbiomedata/NMDC_documentation/>?)make up-test && make test-run
)