From 5f48935be9b5ba50d0ece8407c23e1f367d541e0 Mon Sep 17 00:00:00 2001 From: Adrian Leung <107446173+adrianl726@users.noreply.github.com> Date: Sun, 15 Dec 2024 22:12:16 -0800 Subject: [PATCH] Ms4 final: minor fix on running tests (#76) * Update README.md * Update and rename README to README.md * Update README.md * Update README.md * Update CHANGELOG.md * Update README.md change testing from root to tests/ * Update tests/README.md * Update tests/README.md * Update tests/README.md * Update README.md --------- Co-authored-by: Farhan Bin Faisal <77621905+Farhan-Faisal@users.noreply.github.com> --- CHANGELOG.md | 4 ++-- README.md | 3 ++- tests/{README => README.md} | 16 ++++++++++------ 3 files changed, 14 insertions(+), 9 deletions(-) rename tests/{README => README.md} (62%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c281f87..be4a64c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ - **Issue 1:** Latest tag was used for docker. This is not ideal because if the user has latest locally, but there is a newer version on the container registry, then Docker will not pull it.
**Fix 1:**: No Fix. In our readme, we explicitly tell the user to remove the existing local files first. Therefore, we do not run into this issue.
-### Milestone 2 Feedback +### Milestone 3 Feedback - N/A ### Peer Review Feedback @@ -61,4 +61,4 @@ [Commit Link](https://github.com/UBC-MDS/DSCI522-2425-22-wine-chromatic-profile/commit/29e1e5b9427cc202c8119da2a91e5e656b47063e#diff-059ae229d14bfbf15abe1e3587fcff94884f9497fffa3b5bdf6c2ff3e94f44d4R113) - **Issue 6:** The PDF link in Other Formats under the html report is not working.
-**Fix 6:**: Not Fixed. Not within scope of this project
\ No newline at end of file +**Fix 6:**: Not Fixed. Not within scope of this project
diff --git a/README.md b/README.md index 1cf4599..17976b3 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,8 @@ where you launched the container, and then type `docker compose rm` ``` ### Running the test suite -Use the same docker compose up command as described in the Running the analysis section above to launch Jupyter lab. Tests are run using the pytest command in the root of the project. More details about the test suite can be found in the tests directory. +Use the same docker compose up command as described in the Running the analysis section above to launch Jupyter lab. Tests are run using the pytest command in the `tests/` directory. More details about the test suite can be found in `tests/`. + # License This project was created with the [`MIT License`](LICENSE.md) diff --git a/tests/README b/tests/README.md similarity index 62% rename from tests/README rename to tests/README.md index 92c0d39..18c85c2 100644 --- a/tests/README +++ b/tests/README.md @@ -1,20 +1,24 @@ +Use the bash command below to change directory from root to `tests/` +`cd tests` + +Run each test one by one in the `tests/` directory: ``` +pytest test_validate_column_names.py + +pytest test_split_data.py + pytest -v test_random_search.py \ --train_data=../data/proc/wine_train.csv \ --test_data=../data/proc/wine_test.csv \ --pipeline_path=../results/models/wine_pipeline.pickle -pytest test_validate_column_names.py - -pytest test_split_data.py - pytest test_evaluation.py ``` -Test all at once with the command below: +Or run all tests at once in the `tests/` directory with the command below: ``` pytest -v \ --train_data=../data/proc/wine_train.csv \ --test_data=../data/proc/wine_test.csv \ --pipeline_path=../results/models/wine_pipeline.pickle -``` \ No newline at end of file +```