From 979befe7104fe5785bdca67a1eeb5ac6f137a200 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 13 May 2024 16:09:43 -0700 Subject: [PATCH] makefile changes to allow poetry venv --- Makefile | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 5ffb8954..1bf975f8 100644 --- a/Makefile +++ b/Makefile @@ -24,13 +24,24 @@ foo: # only run local tests travis_test: - pytest tests/test_*local*.py tests/test_*parse*.py tests/test*writer*.py tests/test_qc.py \ - tests/test_rdfgen.py tests/test_phenosim_engine.py tests/test_ontol.py \ - tests/test_validation_rules.py tests/unit/test_annotation_scorer.py \ - tests/test_goassociation_model.py tests/test_relations.py \ - tests/unit/test_golr_search_query.py tests/unit/test_owlsim2_api.py \ - tests/test_collections.py \ - tests/test_gocamgen.py + @if [ -d ".venv" ] && [ -f "pyproject.toml" ]; then \ + echo "Running tests in Poetry environment..."; \ + poetry run pytest tests/test_*local*.py tests/test_*parse*.py tests/test*writer*.py tests/test_qc.py \ + tests/test_rdfgen.py tests/test_phenosim_engine.py tests/test_ontol.py \ + tests/test_validation_rules.py tests/unit/test_annotation_scorer.py \ + tests/test_goassociation_model.py tests/test_relations.py \ + tests/unit/test_golr_search_query.py tests/unit/test_owlsim2_api.py \ + tests/test_collections.py \ + tests/test_gocamgen.py; \ + else \ + pytest tests/test_*local*.py tests/test_*parse*.py tests/test*writer*.py tests/test_qc.py \ + tests/test_rdfgen.py tests/test_phenosim_engine.py tests/test_ontol.py \ + tests/test_validation_rules.py tests/unit/test_annotation_scorer.py \ + tests/test_goassociation_model.py tests/test_relations.py \ + tests/unit/test_golr_search_query.py tests/unit/test_owlsim2_api.py \ + tests/test_collections.py \ + tests/test_gocamgen.py; \ + fi cleandist: rm dist/* || true