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

Fix handling of GOLD and JGI IDs in submission data translator #773

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

pkalita-lbl
Copy link
Collaborator

These changes update the submission portal data translator to place the JGI proposal ID into the jgi_portal_study_identifiers slot on Study. Previously it was placing it in alternative_identifiers, which is all that was available when the translation code was originally written.

Details

Additional minor changes:

  • Previously the submission portal data translator was prepending the prefix GOLD: to GOLD study IDs. This has been updated to gold:.
  • The Translator._get_curie() method has been renamed to Translator._ensure_curie(). The behavior and calling semantics have been changed a bit to clarify that it will not add a prefix if the provided identifier already has one. See test cases in tests/test_data/test_translator.py for examples.
  • tests/test_data/test_submission_portal_translator_data.yaml has been updated with GOLD and JGI IDs to exercise the updated code.

Related issue(s)

These issues were uncovered while working on microbiomedata/issues#888

Related subsystem(s)

  • Runtime API (except the Minter)
  • Minter
  • Dagster
  • Project documentation (in the docs directory)
  • MongoDB migrations
  • Other

Testing

  • I tested these changes (explain below)
  • I did not test these changes

Added/updated automated tests

Documentation

  • I have not checked for relevant documentation yet (e.g. in the docs directory)
  • I have updated all relevant documentation so it will remain accurate
  • Other (explain below)

N/A

Maintainability

  • Every Python function I defined includes a docstring (test functions are exempt from this)
  • Every Python function parameter I introduced includes a type hint (e.g. study_id: str)
  • All "to do" or "fix me" Python comments I added begin with either # TODO or # FIXME
  • I used black to format all the Python files I created/modified
  • The PR title is in the imperative mood (e.g. "Do X") and not the declarative mood (e.g. "Does X" or "Did X")

@pkalita-lbl pkalita-lbl merged commit a6012f4 into main Nov 15, 2024
2 checks passed
@pkalita-lbl pkalita-lbl deleted the fix-gold-jgi-ids-submission-translator branch November 15, 2024 00:12
@sujaypatil96
Copy link
Collaborator

Apologies for looking at this PR so late. I just looked over the changes being made to add JGI IDs on the appropriate slot and correcting the GOLD IDs to be prefixed with gold:. The changes look great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants