Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add test to ensure all supported ontologies are supported by COG API #236

Merged
merged 19 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api/python/tests/test_entities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from cellxgene_ontology_guide.entities import Ontology
from cellxgene_ontology_guide.supported_versions import load_supported_versions


def test_all_supported_ontologies_in_dataclass():
"""
Test that all supported ontologies are defined in the Ontology enum (and deprecated ontologies removed).
Do not include additional ontologies.
"""
ontology_info = load_supported_versions()
supported_ontologies = set()
for _, version_info in ontology_info.items():
for ontology, _ in version_info["ontologies"].items():
supported_ontologies.add(ontology)

assert supported_ontologies == {ontology.name for ontology in Ontology}
Loading