From 6c4ff68cfe42b28d2952b0243f217192cdf80b3d Mon Sep 17 00:00:00 2001 From: Jason Payne Date: Mon, 11 Mar 2024 11:47:38 -0400 Subject: [PATCH] Fix Testing Action Fixes the GitHub Action that automatically tests the module. Also fixes a "bug" in the testing suite introduced by errors in EFO --- .github/workflows/python-app.yml | 3 ++- test/simple_tests.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 96f008a..cf5010f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,6 +23,7 @@ jobs: uses: actions/setup-python@v3 with: python-version: "3.10" + cache: 'pip' - name: show python path run: | python -c "import sys; print('\n'.join(sys.path))" @@ -30,7 +31,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install flake8 pytest + pip install flake8 pytest wheel - name: Check package location run: | pip show pandas diff --git a/test/simple_tests.py b/test/simple_tests.py index bbe8654..305281e 100644 --- a/test/simple_tests.py +++ b/test/simple_tests.py @@ -86,8 +86,8 @@ def test_mapping_to_cached_ontology_using_syntactic_mapper(self): def test_mapping_using_ontology_acronym(self): # Test mapping a list of terms by specifying the target ontology acronym, which gets resolved by bioregistry print( - "Test mapping a list of terms by specifying the ontology acronym, which gets resolved by bioregistry") - df2 = text2term.map_terms(["contains", "asthma"], "MONDO") + "Test mapping a list of terms to EFO by specifying the ontology acronym, which gets resolved by bioregistry") + df2 = text2term.map_terms(["contains", "asthma"], "MONDO", term_type=OntologyTermType.CLASS) print(f"{df2}\n") assert df2.size > 0