From 2eac18be0425ee0f81eca317598dff624c3e8e03 Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Mon, 30 Jan 2023 16:39:42 +0000 Subject: [PATCH 1/8] Update python-app.yml Added code coverage using coverage.py --- .github/workflows/python-app.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3b6b0d5a..0ffdeb43 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -38,3 +38,5 @@ jobs: - name: Test with pytest run: | pytest + - name: coverage.py badge + uses: tj-actions/coverage-badge-py@v1.8 From 898fbfde6e3443f175acacc532bebb152e86a754 Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Mon, 30 Jan 2023 16:41:31 +0000 Subject: [PATCH 2/8] Update test-requirements.txt Added coverage dependency --- test-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test-requirements.txt b/test-requirements.txt index cd484dcd..fd463555 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,3 +10,4 @@ torch pandas numpy matplotlib +coverage From 5265e09266cfff92e853eaf7b031c27d101eaf20 Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:57:37 +0000 Subject: [PATCH 3/8] Update python-app.yml Updated to use codecov --- .github/workflows/python-app.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0ffdeb43..97ef2365 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -38,5 +38,8 @@ jobs: - name: Test with pytest run: | pytest - - name: coverage.py badge - uses: tj-actions/coverage-badge-py@v1.8 + - name: Upload coverage reports to Codecov + run: | + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -t ${CODECOV_TOKEN} From 00647aa06dbed3e00f18e8269420ad88bd3d2e00 Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:58:25 +0000 Subject: [PATCH 4/8] Update python-app.yml collect coverage --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 97ef2365..1fa11d5a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -37,7 +37,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --extend-ignore=C901,E261,E302,E305,F401 - name: Test with pytest run: | - pytest + pytest --cov . - name: Upload coverage reports to Codecov run: | curl -Os https://uploader.codecov.io/latest/linux/codecov From 4eff59e3a3b44921f3853b6195adfdb0d0775399 Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Mon, 30 Jan 2023 19:03:13 +0000 Subject: [PATCH 5/8] Update test-requirements.txt Switched to using codecov --- test-requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index fd463555..cd484dcd 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,4 +10,3 @@ torch pandas numpy matplotlib -coverage From 959a46c066c038ea1970cca5488190b59d2bd2d5 Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Tue, 31 Jan 2023 18:29:23 +0000 Subject: [PATCH 6/8] Update test_simvue.py Test --- tests/unit/test_simvue.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_simvue.py b/tests/unit/test_simvue.py index 50e91181..5914ec3e 100644 --- a/tests/unit/test_simvue.py +++ b/tests/unit/test_simvue.py @@ -8,6 +8,7 @@ import matplotlib.pyplot as plt import pandas as pd + def test_suppress_errors(): """ Check that errors are surpressed From b03f9189921ccc558c4bd01a9e66a2c73adb371a Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:34:21 +0000 Subject: [PATCH 7/8] Update python-app.yml reverted changes with pytest --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1fa11d5a..97ef2365 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -37,7 +37,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --extend-ignore=C901,E261,E302,E305,F401 - name: Test with pytest run: | - pytest --cov . + pytest - name: Upload coverage reports to Codecov run: | curl -Os https://uploader.codecov.io/latest/linux/codecov From ea2a25e7ee0ef20b3f4bb4d30215242ed32d92dc Mon Sep 17 00:00:00 2001 From: AbyAbraham21 <95077500+AbyAbraham21@users.noreply.github.com> Date: Wed, 1 Feb 2023 12:04:55 +0000 Subject: [PATCH 8/8] Update python-app.yml install pytest-cov and running pytest --cov --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 97ef2365..1aadc4b6 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest-cov pip install -e . if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - name: Lint with flake8 @@ -37,7 +37,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --extend-ignore=C901,E261,E302,E305,F401 - name: Test with pytest run: | - pytest + pytest --cov . - name: Upload coverage reports to Codecov run: | curl -Os https://uploader.codecov.io/latest/linux/codecov