-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #773 from microbiomedata/fix-gold-jgi-ids-submissi…
…on-translator Fix handling of GOLD and JGI IDs in submission data translator
- Loading branch information
Showing
6 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from nmdc_schema import nmdc | ||
|
||
from nmdc_runtime.site.translation.translator import Translator | ||
|
||
|
||
class TestTranslator(Translator): | ||
def get_database(self) -> nmdc.Database: | ||
pass | ||
|
||
|
||
def test_ensure_curie(): | ||
assert TestTranslator._ensure_curie("nmdc:bsm-11-z8x8p723", default_prefix="nmdc") == "nmdc:bsm-11-z8x8p723" | ||
|
||
assert TestTranslator._ensure_curie("bsm-11-z8x8p723", default_prefix="nmdc") == "nmdc:bsm-11-z8x8p723" | ||
|
||
assert TestTranslator._ensure_curie("gold:Gb0123456", default_prefix="nmdc") == "gold:Gb0123456" |