From d774df46971c1f538f7bc13edb9d8c23329de302 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 5 Jul 2023 13:07:55 +0100 Subject: [PATCH] moved .coveragerc and pytest.ini files to model_data --- .coveragerc => model_data/.coveragerc | 0 model_data/README.md | 2 +- pytest.ini => model_data/pytest.ini | 0 model_data/tests/test_sap_model.py | 2 ++ 4 files changed, 3 insertions(+), 1 deletion(-) rename .coveragerc => model_data/.coveragerc (100%) rename pytest.ini => model_data/pytest.ini (100%) diff --git a/.coveragerc b/model_data/.coveragerc similarity index 100% rename from .coveragerc rename to model_data/.coveragerc diff --git a/model_data/README.md b/model_data/README.md index 32fb29d1..278b3f99 100644 --- a/model_data/README.md +++ b/model_data/README.md @@ -45,5 +45,5 @@ conda activate envName Then run ```commandline -python -m pytest +pytest --cov-config=model_data/.coveragerc --cov=model_data ``` \ No newline at end of file diff --git a/pytest.ini b/model_data/pytest.ini similarity index 100% rename from pytest.ini rename to model_data/pytest.ini diff --git a/model_data/tests/test_sap_model.py b/model_data/tests/test_sap_model.py index a226b781..71d6369c 100644 --- a/model_data/tests/test_sap_model.py +++ b/model_data/tests/test_sap_model.py @@ -25,6 +25,8 @@ class TestSapModel: assert model.final_model is not None assert model.test_model is not None + # Note - this will potentially be different on different machines so may need to adjust these tests accordingly + # when running in CI/CD assert (model.fit_error['Median Absolute Error'] - 1.7316860436422203) < 0.00001 assert (model.predict_error['Median Absolute Error'] - 2.85481857667385) < 0.00001 # final model doesn't do that well on this test data