From 7cf0f92665e9e1544afc6e4c3bcad38be75925e1 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Sat, 14 Jun 2025 22:01:02 -0400 Subject: [PATCH 01/27] Minor change --- .github/workflows/github-actions.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7939d29e1..6a8cf26c0 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -155,6 +155,9 @@ jobs: - name: Generate Coverage Report run: ./test.sh report coverage.stumpy.xml shell: bash + - name: List Reports + run: ls + shell: bash - name: Upload Coverage Tests Results uses: codecov/codecov-action@v4 with: From cf5b423a1dc4ea84335115ae7f11496d0c9fcb9a Mon Sep 17 00:00:00 2001 From: Sean Law Date: Sat, 14 Jun 2025 22:53:05 -0400 Subject: [PATCH 02/27] Minor change --- .github/workflows/github-actions.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 6a8cf26c0..15d5f061c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -156,7 +156,10 @@ jobs: run: ./test.sh report coverage.stumpy.xml shell: bash - name: List Reports - run: ls + run: ls *xml + shell: bash + - name: Show Reports + run: head coverage.stumpy.xml shell: bash - name: Upload Coverage Tests Results uses: codecov/codecov-action@v4 From bbd7b49eed703f09be038ec10f39a27c48ea34fe Mon Sep 17 00:00:00 2001 From: Sean Law Date: Sun, 15 Jun 2025 09:33:11 -0400 Subject: [PATCH 03/27] Initiate migration away from codecov --- .github/workflows/github-actions.yml | 15 +++++++-------- .gitignore | 4 ++-- test.sh | 14 +++++++------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 15d5f061c..c86e23a57 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -156,14 +156,13 @@ jobs: run: ./test.sh report coverage.stumpy.xml shell: bash - name: List Reports - run: ls *xml + run: ls *json shell: bash - name: Show Reports - run: head coverage.stumpy.xml + run: head coverage.stumpy.json + shell: bash + - name: Get Coverage Percentage + run: | + export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") + echo $TOTAL shell: bash - - name: Upload Coverage Tests Results - uses: codecov/codecov-action@v4 - with: - file: ./coverage.stumpy.xml - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 4ba903a59..c1a36735c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ LOG* PID .coverage* -coverage.xml -stumpy.coverage.xml +coverage.json +coverage.stumpy.json dask-worker-space stumpy.egg-info build diff --git a/test.sh b/test.sh index 06070c7c6..ddd4c23a2 100755 --- a/test.sh +++ b/test.sh @@ -5,7 +5,7 @@ print_mode="verbose" custom_testfiles=() max_iter=10 site_pkgs=$(python -c 'import site; print(site.getsitepackages()[0])') -fcoveragexml="coverage.stumpy.xml" +fcoveragejson="coverage.stumpy.json" # Parse command line arguments for var in "$@" do @@ -31,8 +31,8 @@ do custom_testfiles+=("$var") elif [[ $var =~ ^[\-0-9]+$ ]]; then max_iter=$var - elif [[ "$var" == *".xml" ]]; then - fcoveragexml=$var + elif [[ "$var" == *".json" ]]; then + fcoveragejson=$var elif [[ "$var" == "links" ]]; then test_mode="links" else @@ -173,11 +173,11 @@ show_coverage_report() coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } -gen_coverage_xml_report() +gen_coverage_json_report() { - # This function saves the coverage report in Cobertura XML format, which is compatible with codecov + # This function saves the coverage report in JSON format set_ray_coveragerc - coverage xml -o $fcoveragexml --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc + coverage json -o $fcoveragejson --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } test_custom() @@ -384,7 +384,7 @@ elif [[ $test_mode == "report" ]]; then echo "Generate Coverage Report Only" # Assume coverage tests have already been executed # and a coverage file exists - gen_coverage_xml_report + gen_coverage_json_report elif [[ $test_mode == "gpu" ]]; then echo "Executing GPU Unit Tests Only" test_gpu From 802252e7d574fdd9315742f7717c50cbf14cb143 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Sun, 15 Jun 2025 10:33:23 -0400 Subject: [PATCH 04/27] Minor change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c86e23a57..bb56ad4ad 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -163,6 +163,6 @@ jobs: shell: bash - name: Get Coverage Percentage run: | - export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") + export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])") echo $TOTAL shell: bash From f36d4929f43ee662b8d8839c2fecb744bd4c955f Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 10:19:43 -0400 Subject: [PATCH 05/27] Added parallel-mode to coverage.py --- test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index ddd4c23a2..6cdec2754 100755 --- a/test.sh +++ b/test.sh @@ -258,14 +258,14 @@ test_coverage() # Execute all tests for testfile in tests/test_*.py; do - coverage run --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile + coverage run --parallel-mode --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile check_errs $? done else # Execute custom tests for testfile in "${custom_testfiles[@]}"; do - coverage run --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile + coverage run --parallel-mode --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile check_errs $? done fi From 6990da1bbc47180ac2211978ff47fb96868c86aa Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 10:27:59 -0400 Subject: [PATCH 06/27] Added upload artifacts --- .github/workflows/github-actions.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index bb56ad4ad..af2b163b5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -152,6 +152,13 @@ jobs: - name: Run Coverage Tests run: ./test.sh coverage shell: bash + - name: Upload Coverage Data to Github + uses: actions/upload-artifact@v4 + with: + name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }} + path: .coverage.* + include-hidden-files: true + if-no-files-found: ignore - name: Generate Coverage Report run: ./test.sh report coverage.stumpy.xml shell: bash From f060b3245fe118a827f6d9431fe6a854335e2377 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 10:46:04 -0400 Subject: [PATCH 07/27] Minor change --- .github/workflows/github-actions.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index af2b163b5..7641e69ba 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -160,16 +160,35 @@ jobs: include-hidden-files: true if-no-files-found: ignore - name: Generate Coverage Report - run: ./test.sh report coverage.stumpy.xml + run: ./test.sh report coverage.stumpy.json shell: bash - name: List Reports run: ls *json shell: bash - - name: Show Reports - run: head coverage.stumpy.json - shell: bash - name: Get Coverage Percentage run: | export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])") echo $TOTAL shell: bash + coverage-aggregation: + name: Combine and Check Coverage + if: always() + needs: coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + python-version: '3.12' + - uses: actions/download-artifact@v4 + with: + pattern: coverage-data-* + merge-multiple: true + - name: Combine Coverage Files and Fail If Under 100% + run: ls .coverage.* + shell: bash + - name: Generate Coverage Report + run: ./test.sh report coverage.stumpy.json + shell: bash + - name: Get Coverage Percentage + run: | + export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])") From 745bc308089c96ae235944331ba42548f73ef03e Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 10:57:58 -0400 Subject: [PATCH 08/27] Removed paralle-mode from coverage.py --- test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index 6cdec2754..ddd4c23a2 100755 --- a/test.sh +++ b/test.sh @@ -258,14 +258,14 @@ test_coverage() # Execute all tests for testfile in tests/test_*.py; do - coverage run --parallel-mode --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile + coverage run --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile check_errs $? done else # Execute custom tests for testfile in "${custom_testfiles[@]}"; do - coverage run --parallel-mode --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile + coverage run --append --source=. -m pytest -rsx -W ignore::RuntimeWarning -W ignore::DeprecationWarning -W ignore::UserWarning $testfile check_errs $? done fi From bbdd5253771a92faf731bf152594329e6e68ccc6 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 11:05:09 -0400 Subject: [PATCH 09/27] Minor change --- .github/workflows/github-actions.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7641e69ba..15c919926 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -152,11 +152,14 @@ jobs: - name: Run Coverage Tests run: ./test.sh coverage shell: bash + - name: Rename Coverage Data Files + run: mv .coverage .coverage.${{ matrix.os }}.${{ matrix.python-version }} + shell: bash - name: Upload Coverage Data to Github uses: actions/upload-artifact@v4 with: name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }} - path: .coverage.* + path: .coverage.${{ matrix.os }}.${{ matrix.python-version }} include-hidden-files: true if-no-files-found: ignore - name: Generate Coverage Report From bc192d4b54c483fee27c2d76a56629324f566fca Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 11:06:30 -0400 Subject: [PATCH 10/27] Minor change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 15c919926..d00f75f16 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -176,7 +176,7 @@ jobs: coverage-aggregation: name: Combine and Check Coverage if: always() - needs: coverage + needs: coverage-testing runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 766240acc3c05a9589304a7115088c3d24dd9f56 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 11:25:33 -0400 Subject: [PATCH 11/27] Minor change --- .github/workflows/github-actions.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index d00f75f16..638092038 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -162,17 +162,6 @@ jobs: path: .coverage.${{ matrix.os }}.${{ matrix.python-version }} include-hidden-files: true if-no-files-found: ignore - - name: Generate Coverage Report - run: ./test.sh report coverage.stumpy.json - shell: bash - - name: List Reports - run: ls *json - shell: bash - - name: Get Coverage Percentage - run: | - export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])") - echo $TOTAL - shell: bash coverage-aggregation: name: Combine and Check Coverage if: always() @@ -195,3 +184,4 @@ jobs: - name: Get Coverage Percentage run: | export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])") + shell: bash From b8710cfe3d329a15b1afd0e12c1664c86e240885 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 14:00:24 -0400 Subject: [PATCH 12/27] Fixed combine function --- .github/workflows/github-actions.yml | 34 +++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 638092038..3f800440d 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -171,12 +171,44 @@ jobs: - uses: actions/checkout@v4 with: python-version: '3.12' + - name: Display Python Version + run: python -c "import sys; print(sys.version)" + shell: bash + - name: Upgrade Pip + run: python -m pip install --upgrade pip + shell: bash + - name: Install STUMPY And Other Dependencies + run: python -m pip install --editable .[ci] + shell: bash + - name: Run Black + run: black --check --diff ./ + shell: bash + - name: Run Flake8 + run: flake8 ./ + shell: bash + - name: Link OpenMP + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + echo "Installing OpenMP" + brew install libomp + echo "Linking OpenMP" + brew link --force libomp + echo "Find OpenMP Linking Location" + libfile=`brew list libomp --verbose | grep libomp.dylib` + echo $libfile + echo "Changing @rpath for the omppool.cpython-x-darwin.so shared object to look in $libfile" + ls "$(python -c 'import site; print(site.getsitepackages()[0])')"/numba/np/ufunc/omppool.*.so | xargs install_name_tool -change @rpath/libomp.dylib $libfile + fi + shell: bash + - name: Show Full Numba Environment + run: python -m numba -s + shell: bash - uses: actions/download-artifact@v4 with: pattern: coverage-data-* merge-multiple: true - name: Combine Coverage Files and Fail If Under 100% - run: ls .coverage.* + run: ./test.sh combine* shell: bash - name: Generate Coverage Report run: ./test.sh report coverage.stumpy.json From 51ed53ef7aebb8d2cc24d92aeb897ea63652a0a8 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 14:58:12 -0400 Subject: [PATCH 13/27] Minor change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 3f800440d..9596471bc 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -208,7 +208,7 @@ jobs: pattern: coverage-data-* merge-multiple: true - name: Combine Coverage Files and Fail If Under 100% - run: ./test.sh combine* + run: ./test.sh combine shell: bash - name: Generate Coverage Report run: ./test.sh report coverage.stumpy.json From b87f1aad0a3385ccd7d840b2aea5c210229f3080 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 16:01:57 -0400 Subject: [PATCH 14/27] Minor change --- test.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test.sh b/test.sh index ddd4c23a2..f83a754c6 100755 --- a/test.sh +++ b/test.sh @@ -25,6 +25,8 @@ do test_mode="custom" elif [[ $var == "report" ]]; then test_mode="report" + elif [[ $var == "combine" ]]; then + test_mode="combine" elif [[ $var == "silent" || $var == "print" ]]; then print_mode="silent" elif [[ "$var" == *"test_"*".py"* ]]; then @@ -180,6 +182,11 @@ gen_coverage_json_report() coverage json -o $fcoveragejson --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } +combine_coverage_data_files() +{ + coverage combine +} + test_custom() { # export NUMBA_DISABLE_JIT=1 @@ -385,6 +392,11 @@ elif [[ $test_mode == "report" ]]; then # Assume coverage tests have already been executed # and a coverage file exists gen_coverage_json_report +elif [[ $test_mode == "combine" ]]; then + echo "Combine All Coverage Data Files" + # Assume coverage tests have already been executed + # and a coverage file exists + combine_coverage_data_files elif [[ $test_mode == "gpu" ]]; then echo "Executing GPU Unit Tests Only" test_gpu From 86104cd2504b11e3df860ff0f7da6a07b52da867 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 20:53:45 -0400 Subject: [PATCH 15/27] Minor change --- .github/workflows/github-actions.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9596471bc..406ba2eed 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -203,6 +203,9 @@ jobs: - name: Show Full Numba Environment run: python -m numba -s shell: bash + - name: Erase Any Coverage Data Files + run: coverage erase + shell: bash - uses: actions/download-artifact@v4 with: pattern: coverage-data-* From 91afdb9fea36fc2bf24c936dd9e22dbff53df092 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 22:12:18 -0400 Subject: [PATCH 16/27] Minor change --- .github/workflows/github-actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 406ba2eed..969388506 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -203,9 +203,6 @@ jobs: - name: Show Full Numba Environment run: python -m numba -s shell: bash - - name: Erase Any Coverage Data Files - run: coverage erase - shell: bash - uses: actions/download-artifact@v4 with: pattern: coverage-data-* @@ -213,6 +210,9 @@ jobs: - name: Combine Coverage Files and Fail If Under 100% run: ./test.sh combine shell: bash + - name: List Files + run: ls + shell: bash - name: Generate Coverage Report run: ./test.sh report coverage.stumpy.json shell: bash From 7f7823236eeaa1878dacabd17717e27e31c97b64 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 22:18:04 -0400 Subject: [PATCH 17/27] Minor change --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index f83a754c6..9952886e4 100755 --- a/test.sh +++ b/test.sh @@ -179,7 +179,7 @@ gen_coverage_json_report() { # This function saves the coverage report in JSON format set_ray_coveragerc - coverage json -o $fcoveragejson --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc + coverage json -o $fcoveragejson -i --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } combine_coverage_data_files() From bfede72d147d551be8a0cbbe4b354aa2aecd1ae7 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 22:37:38 -0400 Subject: [PATCH 18/27] Minor change --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 9952886e4..c95036549 100755 --- a/test.sh +++ b/test.sh @@ -179,7 +179,7 @@ gen_coverage_json_report() { # This function saves the coverage report in JSON format set_ray_coveragerc - coverage json -o $fcoveragejson -i --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc + coverage json -o $fcoveragejson --skip-empty --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } combine_coverage_data_files() From 499428298684bf60a972753725813da1470ad7d1 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Mon, 16 Jun 2025 23:39:58 -0400 Subject: [PATCH 19/27] Minor change --- .github/workflows/github-actions.yml | 6 +----- test.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 969388506..5e1e82381 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -214,9 +214,5 @@ jobs: run: ls shell: bash - name: Generate Coverage Report - run: ./test.sh report coverage.stumpy.json - shell: bash - - name: Get Coverage Percentage - run: | - export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])") + run: ./test.sh report coverage.html shell: bash diff --git a/test.sh b/test.sh index c95036549..63989308c 100755 --- a/test.sh +++ b/test.sh @@ -5,7 +5,7 @@ print_mode="verbose" custom_testfiles=() max_iter=10 site_pkgs=$(python -c 'import site; print(site.getsitepackages()[0])') -fcoveragejson="coverage.stumpy.json" +fcoveragehtml="coverage.html" # Parse command line arguments for var in "$@" do @@ -33,8 +33,8 @@ do custom_testfiles+=("$var") elif [[ $var =~ ^[\-0-9]+$ ]]; then max_iter=$var - elif [[ "$var" == *".json" ]]; then - fcoveragejson=$var + elif [[ "$var" == *".html" ]]; then + fcoveragehtml=$var elif [[ "$var" == "links" ]]; then test_mode="links" else @@ -175,11 +175,11 @@ show_coverage_report() coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } -gen_coverage_json_report() +gen_coverage_html_report() { # This function saves the coverage report in JSON format set_ray_coveragerc - coverage json -o $fcoveragejson --skip-empty --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc + coverage html -o $fcoveragehtml --skip-empty --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } combine_coverage_data_files() @@ -391,7 +391,7 @@ elif [[ $test_mode == "report" ]]; then echo "Generate Coverage Report Only" # Assume coverage tests have already been executed # and a coverage file exists - gen_coverage_json_report + gen_coverage_html_report elif [[ $test_mode == "combine" ]]; then echo "Combine All Coverage Data Files" # Assume coverage tests have already been executed From a9d2601c45d86361d2665106a2aec3f2b630dc94 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 00:31:41 -0400 Subject: [PATCH 20/27] Minor change --- test.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test.sh b/test.sh index 63989308c..e7bd75aef 100755 --- a/test.sh +++ b/test.sh @@ -5,7 +5,6 @@ print_mode="verbose" custom_testfiles=() max_iter=10 site_pkgs=$(python -c 'import site; print(site.getsitepackages()[0])') -fcoveragehtml="coverage.html" # Parse command line arguments for var in "$@" do @@ -33,8 +32,6 @@ do custom_testfiles+=("$var") elif [[ $var =~ ^[\-0-9]+$ ]]; then max_iter=$var - elif [[ "$var" == *".html" ]]; then - fcoveragehtml=$var elif [[ "$var" == "links" ]]; then test_mode="links" else @@ -175,13 +172,6 @@ show_coverage_report() coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } -gen_coverage_html_report() -{ - # This function saves the coverage report in JSON format - set_ray_coveragerc - coverage html -o $fcoveragehtml --skip-empty --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc -} - combine_coverage_data_files() { coverage combine @@ -391,7 +381,7 @@ elif [[ $test_mode == "report" ]]; then echo "Generate Coverage Report Only" # Assume coverage tests have already been executed # and a coverage file exists - gen_coverage_html_report + show_coverage_report elif [[ $test_mode == "combine" ]]; then echo "Combine All Coverage Data Files" # Assume coverage tests have already been executed From 1e2c02da829cb42b78634c5d0227861e5f15d6b1 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 00:33:06 -0400 Subject: [PATCH 21/27] Minor change --- .github/workflows/github-actions.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5e1e82381..ce54efcda 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -207,12 +207,9 @@ jobs: with: pattern: coverage-data-* merge-multiple: true - - name: Combine Coverage Files and Fail If Under 100% + - name: Combine Coverage Files run: ./test.sh combine shell: bash - - name: List Files - run: ls - shell: bash - - name: Generate Coverage Report - run: ./test.sh report coverage.html + - name: Show Coverage Report + run: ./test.sh report shell: bash From f0af554b3cc30fd714913c614203e0f9ad19e7ee Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 08:16:24 -0400 Subject: [PATCH 22/27] Minor change --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index e7bd75aef..372c261b1 100755 --- a/test.sh +++ b/test.sh @@ -169,7 +169,7 @@ set_ray_coveragerc() show_coverage_report() { set_ray_coveragerc - coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc + coverage report -m --fail-under=100 --skip-covered --skip-empty --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } combine_coverage_data_files() From 36d1085f3a796bf04bcd463111ac9e4932237edb Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 09:10:06 -0400 Subject: [PATCH 23/27] Minor change --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 372c261b1..379eaf90d 100755 --- a/test.sh +++ b/test.sh @@ -169,7 +169,7 @@ set_ray_coveragerc() show_coverage_report() { set_ray_coveragerc - coverage report -m --fail-under=100 --skip-covered --skip-empty --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc + coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py,conftest.py $fcoveragerc } combine_coverage_data_files() From 796f6b4ed64443d579a3cd5982addb2ee43c4a1e Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 12:27:11 -0400 Subject: [PATCH 24/27] Added __init__.py to be omitted --- README.rst | 3 +-- test.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index b4c8e0bc8..d34b0cc8b 100644 --- a/README.rst +++ b/README.rst @@ -17,8 +17,7 @@ .. |Test Status| image:: https://github.com/stumpy-dev/stumpy/workflows/Tests/badge.svg :target: https://github.com/stumpy-dev/stumpy/actions?query=workflow%3ATests+branch%3Amain :alt: Test Status -.. |Code Coverage| image:: https://codecov.io/gh/stumpy-dev/stumpy/graph/badge.svg?token=u0DooAbGji - :target: https://codecov.io/gh/stumpy-dev/stumpy +.. |Code Coverage| image:: https://img.shields.io/badge/Coverage-100%25-green :alt: Code Coverage .. |RTD Status| image:: https://readthedocs.org/projects/stumpy/badge/?version=latest :target: https://stumpy.readthedocs.io/ diff --git a/test.sh b/test.sh index 379eaf90d..dc8e24b5c 100755 --- a/test.sh +++ b/test.sh @@ -169,7 +169,7 @@ set_ray_coveragerc() show_coverage_report() { set_ray_coveragerc - coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py,conftest.py $fcoveragerc + coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py,conftest.py,"*__init__.py" $fcoveragerc } combine_coverage_data_files() From 303eb7aba287bdb9e9aae290bbe22f6beb7287d5 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 12:55:34 -0400 Subject: [PATCH 25/27] Removed aggregation step --- .github/workflows/github-actions.yml | 60 +--------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ce54efcda..fbd8b0025 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -152,64 +152,6 @@ jobs: - name: Run Coverage Tests run: ./test.sh coverage shell: bash - - name: Rename Coverage Data Files - run: mv .coverage .coverage.${{ matrix.os }}.${{ matrix.python-version }} - shell: bash - - name: Upload Coverage Data to Github - uses: actions/upload-artifact@v4 - with: - name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }} - path: .coverage.${{ matrix.os }}.${{ matrix.python-version }} - include-hidden-files: true - if-no-files-found: ignore - coverage-aggregation: - name: Combine and Check Coverage - if: always() - needs: coverage-testing - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - python-version: '3.12' - - name: Display Python Version - run: python -c "import sys; print(sys.version)" - shell: bash - - name: Upgrade Pip - run: python -m pip install --upgrade pip - shell: bash - - name: Install STUMPY And Other Dependencies - run: python -m pip install --editable .[ci] - shell: bash - - name: Run Black - run: black --check --diff ./ - shell: bash - - name: Run Flake8 - run: flake8 ./ - shell: bash - - name: Link OpenMP - run: | - if [ "$RUNNER_OS" == "macOS" ]; then - echo "Installing OpenMP" - brew install libomp - echo "Linking OpenMP" - brew link --force libomp - echo "Find OpenMP Linking Location" - libfile=`brew list libomp --verbose | grep libomp.dylib` - echo $libfile - echo "Changing @rpath for the omppool.cpython-x-darwin.so shared object to look in $libfile" - ls "$(python -c 'import site; print(site.getsitepackages()[0])')"/numba/np/ufunc/omppool.*.so | xargs install_name_tool -change @rpath/libomp.dylib $libfile - fi - shell: bash - - name: Show Full Numba Environment - run: python -m numba -s - shell: bash - - uses: actions/download-artifact@v4 - with: - pattern: coverage-data-* - merge-multiple: true - - name: Combine Coverage Files - run: ./test.sh combine - shell: bash - - name: Show Coverage Report + - name: Show Coverage Results run: ./test.sh report shell: bash From 06a79552cd233629692c5b1b51d9595178d023cb Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 12:56:31 -0400 Subject: [PATCH 26/27] Minor change --- test.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/test.sh b/test.sh index dc8e24b5c..796024489 100755 --- a/test.sh +++ b/test.sh @@ -24,8 +24,6 @@ do test_mode="custom" elif [[ $var == "report" ]]; then test_mode="report" - elif [[ $var == "combine" ]]; then - test_mode="combine" elif [[ $var == "silent" || $var == "print" ]]; then print_mode="silent" elif [[ "$var" == *"test_"*".py"* ]]; then @@ -169,12 +167,7 @@ set_ray_coveragerc() show_coverage_report() { set_ray_coveragerc - coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py,conftest.py,"*__init__.py" $fcoveragerc -} - -combine_coverage_data_files() -{ - coverage combine + coverage report --show-missing --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc } test_custom() @@ -382,11 +375,6 @@ elif [[ $test_mode == "report" ]]; then # Assume coverage tests have already been executed # and a coverage file exists show_coverage_report -elif [[ $test_mode == "combine" ]]; then - echo "Combine All Coverage Data Files" - # Assume coverage tests have already been executed - # and a coverage file exists - combine_coverage_data_files elif [[ $test_mode == "gpu" ]]; then echo "Executing GPU Unit Tests Only" test_gpu From 409557b01bd6f77876b427f6da15d352ee21d940 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Tue, 17 Jun 2025 13:01:12 -0400 Subject: [PATCH 27/27] Removed explicit show report --- .github/workflows/github-actions.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index fbd8b0025..9d0978d30 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -152,6 +152,3 @@ jobs: - name: Run Coverage Tests run: ./test.sh coverage shell: bash - - name: Show Coverage Results - run: ./test.sh report - shell: bash