Skip to content

Commit

Permalink
Fix EC Code resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Feb 7, 2021
1 parent 041d6ab commit 961147a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bioregistry/data/bioregistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -4558,6 +4558,7 @@
"prefix": "ec-code"
},
"name": "Enzyme Nomenclature",
"pattern": "^\\d{1,2}(\\.\\d{0,2}){0,3}$",
"synonyms": [
"EC",
"EC-CODE",
Expand Down
4 changes: 4 additions & 0 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def test_patterns(self):
if external_pattern:
self.assertEqual(pattern, external_pattern, msg=f'{prefix}: {key} pattern not same')

for eccode in ['1', '1.1', '1.1.1', '1.1.1.1']:
with self.subTest(eccode=eccode):
self.assertTrue(bioregistry.validate('eccode', eccode))

def test_examples(self):
"""Test that all entries have examples."""
for prefix, entry in self.registry.items():
Expand Down

0 comments on commit 961147a

Please sign in to comment.