Skip to content

Commit

Permalink
Make id typecode parts and document types be consistent in doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Dec 6, 2024
1 parent daad9ed commit e7036f7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ def apply_calibration_mapping(self, workflow_execution: dict) -> dict:
>>> from nmdc_schema.migrators.adapters.dictionary_adapter import DictionaryAdapter
>>> m = Migrator(adapter=DictionaryAdapter(database={}))
>>> m.calibration_mappings = {
... 'nmdc:wfnom-99-abc123': 'nmdc:calib-99-def456',
... 'nmdc:wfnom-99-foobar': 'nmdc:calib-99-bazqux',
... 'nmdc:wfmgan-99-abc123': 'nmdc:calib-99-def456',
... 'nmdc:wfmgan-99-foobar': 'nmdc:calib-99-bazqux',
... }
>>> m.apply_calibration_mapping({'id': 'nmdc:wfnom-99-abc123', 'type': 'nmdc:MetagenomeAnnotation'}) # id is in mapping dictionary
{'id': 'nmdc:wfnom-99-abc123', 'type': 'nmdc:MetagenomeAnnotation', 'uses_calibration': 'nmdc:calib-99-def456'}
>>> m.apply_calibration_mapping({'id': 'nmdc:wfnom-00-abc123', 'type': 'nmdc:MetagenomeAnnotation'}) # id is not in mapping dictionary
{'id': 'nmdc:wfnom-00-abc123', 'type': 'nmdc:MetagenomeAnnotation'}
>>> m.apply_calibration_mapping({'id': 'nmdc:wfmgan-99-abc123', 'type': 'nmdc:MetagenomeAnnotation'}) # id is in mapping dictionary
{'id': 'nmdc:wfmgan-99-abc123', 'type': 'nmdc:MetagenomeAnnotation', 'uses_calibration': 'nmdc:calib-99-def456'}
>>> m.apply_calibration_mapping({'id': 'nmdc:wfmgan-00-abc123', 'type': 'nmdc:MetagenomeAnnotation'}) # id is not in mapping dictionary
{'id': 'nmdc:wfmgan-00-abc123', 'type': 'nmdc:MetagenomeAnnotation'}
"""
workflow_execution_id = workflow_execution["id"]

Expand Down

0 comments on commit e7036f7

Please sign in to comment.