Skip to content

Commit

Permalink
Merge branch 'main' into pr/64
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Aug 5, 2023
2 parents 0fe4737 + 77271fa commit 3bc66a2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ tests =
coverage
pandas =
pandas
bioregistry =
bioregistry>=0.5.136
flask =
flask
defusedxml
Expand Down
3 changes: 2 additions & 1 deletion src/curies/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def get_bioregistry_converter(web: bool = False, **kwargs: Any) -> Converter:
except ImportError: # pragma: no cover
pass
else:
return Converter.from_extended_prefix_map(bioregistry.manager.get_curies_records())
epm = bioregistry.manager.get_curies_records() # pragma: no cover
return Converter.from_extended_prefix_map(epm) # pragma: no cover
url = f"{BIOREGISTRY_CONTEXTS}/bioregistry.epm.json"
return Converter.from_extended_prefix_map(url, **kwargs)
11 changes: 0 additions & 11 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import pandas as pd
import rdflib
from bioregistry.export.prefix_maps import EXTENDED_PREFIX_MAP_PATH

from curies.api import (
CompressionError,
Expand Down Expand Up @@ -209,16 +208,6 @@ def assert_bioregistry_converter(self, converter: Converter) -> None:
self.assertIn(chebi_uri, converter.reverse_prefix_map)
self.assertEqual("chebi", converter.reverse_prefix_map[chebi_uri])

@unittest.skipUnless(
EXTENDED_PREFIX_MAP_PATH.is_file(),
reason="missing local, editable installation of the Bioregistry",
)
def test_bioregistry_editable(self):
"""Test loading the bioregistry extended prefix map locally."""
records = json.loads(EXTENDED_PREFIX_MAP_PATH.read_text())
converter = Converter.from_extended_prefix_map(records)
self.assert_bioregistry_converter(converter)

def test_load_path(self):
"""Test loading from paths."""
with tempfile.TemporaryDirectory() as directory:
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ deps =
extras =
tests
pandas
bioregistry
flask
fastapi
rdflib
Expand Down

0 comments on commit 3bc66a2

Please sign in to comment.