Skip to content

Commit

Permalink
fix: update entrypoints and add related test
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Feb 24, 2024
1 parent 69d9966 commit fe808e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ where = ["."]
"brat" = "edsnlp.data:write_brat" # alias for standoff

[project.entry-points."spacy_misc"]
"eds.span_sentence_getter" = "edsnlp.utils.span_getters:make_span_sentence_getter"
"eds.span_context_getter" = "edsnlp.utils.span_getters:make_span_context_getter"

[project.entry-points."spacy_languages"]
"eds" = "edsnlp.language:EDSLanguage"
Expand Down
15 changes: 15 additions & 0 deletions tests/test_entrypoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import catalogue

try:
from importlib.metadata import entry_points
except ImportError:
from importlib_metadata import entry_points


def test_entrypoints():
ep = entry_points()
namespaces = ep.groups if hasattr(ep, "groups") else ep.keys()
for ns in namespaces:
if ns.startswith("spacy_") or ns.startswith("edsnlp_"):
reg = catalogue.Registry(ns.split("_"), entry_points=True)
reg.get_all()

0 comments on commit fe808e9

Please sign in to comment.