From 2928fc5514aee657c01031907322f1d046913d0d Mon Sep 17 00:00:00 2001 From: Mitchell <120224887+Mitchell-Medeiros@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:20:32 +0300 Subject: [PATCH] Added codecov report to github action for unit tests. Supressed deprecation warnings internal to the kaggle library in tests. Updated badges in readme. --- .github/workflows/unit-tests.yml | 7 ++++++- .gitignore | 2 ++ README.md | 23 ++++++++++++----------- pyproject.toml | 2 ++ tests/.coveragerc | 4 ++++ 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 tests/.coveragerc diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ef68ad6..4b7c154 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -52,4 +52,9 @@ jobs: - name: Run tests working-directory: ./tests - run: pytest + run: pytest --cov . --cov-config=.coveragerc + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 9fe1518..5e2e4a7 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,5 @@ tests/data/test.* .DS_Store .env .pypirc +.coverage +.coverage.* diff --git a/README.md b/README.md index 15e2e5a..e582073 100644 --- a/README.md +++ b/README.md @@ -5,25 +5,26 @@
Supported Python Versions - PyPI - Version - PyPI - License + + + Read the Docs +  - GitHub Actions build status (Lint) - + GitHub Actions Workflow Status - GitHub Actions build status (MacOS Unit Tests) - -

diff --git a/pyproject.toml b/pyproject.toml index 2055728..453eca6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "pytest>=8.0.0", + "pytest-cov>=5.0.0", "black>=24.0.0", "ruff>=0.5.0", "ipykernel>=6.0.0", @@ -72,6 +73,7 @@ packages = ["mlcompare"] [tool.pytest.ini_options] testpaths = "tests" xfail_strict = true +filterwarnings = ["ignore::DeprecationWarning:kaggle.rest"] [tool.ruff] line-length = 99 diff --git a/tests/.coveragerc b/tests/.coveragerc new file mode 100644 index 0000000..dfaa523 --- /dev/null +++ b/tests/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = + ./conftest.py + ./testing.py