Repository navigation
Update ETL translators to use ProvenanceMetadata class - #1404
Merged
Merged
Conversation
sujaypatil96
previously approved these changes
Mar 12, 2026
Collaborator
There was a problem hiding this comment.
In the GOLD translator
-
provenance_metadataslot asserted onStudy,BiosampleandNucleotideSequencingso check to make sure that it is being applied in each of the respective helper methods –_translate_study(),_translate_biosample(),_translate_nucleotide_sequencing() - Remove direct
add_dateandmod_dateassertions from_translate_biosample() -
source_system_of_recordslot onProvenanceMetadataobject set to GOLD
Similar checks in the Submission Portal translator
-
provenance_metadata slot asserted onStudy,BiosampleandNucleotideSequencingso check to make sure that it is being applied in each of the respective helper methods –_translate_study(),_translate_biosample(),get_database()(has logic for creatingnmdc:NucleotideSequencingobjects) - No direct
add_dateandmod_dateassertions in_translate_biosample()but remove from old nucleotide sequencing object creation logic -
source_system_of_recordandsubmission_portal_identifierslots onProvenanceMetadataobject set to NMDC_Submission_Portal and retrieved submission UUID
eecavanna
previously approved these changes
Mar 13, 2026
pkalita-lbl
dismissed stale reviews from eecavanna and sujaypatil96
via
March 13, 2026 15:21
b6da20c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On this branch, I update the translators for the submission and GOLD ETLs to use the new
ProvenanceMetadataclass.Details
Previously these translators used the
add_dateandmod_dateslots that were directly onBiosampleandNucleotideSequencing. Innmdc-schemav11.17.0 these slots were removed and replaced with aprovenance_metadataslot with rangeProvenanceMetadata. TheProvenanceMetadatahasadd_date,mod_date, and other slots about the source of the data and the system that processed it. The updated translators fill in all the relevant slots. In addition toBiosampleandNucleotideSequencing, the translators also populate the newprovenance_metadataadded toStudy.Here's an example of what one of these
ProvenanceMetadatainstances look like (serialized to YAML):This is the output of the submission translator. The output of the GOLD translator would have a different
source_system_of_recordand nosubmission_portal_identifier. The specific times and version in that example come from testing mock functions. In actual use, the current UTC datetime andnmdc-runtimeversion number would be used.Since these changes rely on new
nmdc-schemamodeling, the dependency was updated and a migration notebook was added. I tested the migration notebook locally and observed these execution times:Related issue(s)
Fixes #1374
Fixes #1375
Related subsystem(s)
docsdirectory)Testing
I tested these changes by
Documentation
docsdirectory)No user-facing documentation needed.
Maintainability
study_id: str)# TODOor# FIXMEblackto format all the Python files I created/modified