From d9f1f9b6c795c5bedeb5136d87bd2b412622db98 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 12 Feb 2024 14:39:50 -0700 Subject: [PATCH 1/8] Enable sys.monitoring coverage for Python 3.12 This should make the 3.12 tests run as fast or faster than the 3.11 tests. --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0c683fc7..db8a760e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,8 @@ jobs: - python-version: '3.12-dev' numpy-version: '1.22' fail-fast: false + env: + COVERAGE_CORE: sysmon # Enable experimental faster sys.monitoring coverage for Python 3.12 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 From 1c37b1dd2bee62ecc7a9a615da843cde9f9bcf90 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 12 Feb 2024 14:45:55 -0700 Subject: [PATCH 2/8] Only set COVERAGE_CORE in Python 3.12 --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index db8a760e..678aa25a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: numpy-version: '1.22' fail-fast: false env: - COVERAGE_CORE: sysmon # Enable experimental faster sys.monitoring coverage for Python 3.12 + COVERAGE_CORE: sysmon # steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -31,6 +31,10 @@ jobs: else python -m pip install --upgrade numpy==${{ matrix.numpy-version }}.* fi + # Enable experimental faster sys.monitoring coverage for Python 3.12 + - name: Set COVERAGE_CORE=sysmon + run: echo COVERAGE_CORE=sysmon" >> $GITHUB_ENV + if: matrix.python-version == 3.12 - name: Run Tests run: | set -x From 03ecf3894ffdeca9031855bf224bf5d89c7bfc47 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 12 Feb 2024 14:47:01 -0700 Subject: [PATCH 3/8] Remove global COVERAGE_CORE env var --- .github/workflows/tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 678aa25a..5d736f57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,8 +12,6 @@ jobs: - python-version: '3.12-dev' numpy-version: '1.22' fail-fast: false - env: - COVERAGE_CORE: sysmon # steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 From 9defed0fa4b81e20879018f60d2fd607a4ec8677 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 13 Feb 2024 14:10:34 -0700 Subject: [PATCH 4/8] Fix syntax --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d736f57..dcafe06f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,7 @@ jobs: fi # Enable experimental faster sys.monitoring coverage for Python 3.12 - name: Set COVERAGE_CORE=sysmon - run: echo COVERAGE_CORE=sysmon" >> $GITHUB_ENV + run: echo "COVERAGE_CORE=sysmon" >> $GITHUB_ENV if: matrix.python-version == 3.12 - name: Run Tests run: | From 7bfb9a599995a844f66e715561f63f4cd8fe5585 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 13 Feb 2024 14:27:13 -0700 Subject: [PATCH 5/8] Fix python version variable --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dcafe06f..5c893990 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: # Enable experimental faster sys.monitoring coverage for Python 3.12 - name: Set COVERAGE_CORE=sysmon run: echo "COVERAGE_CORE=sysmon" >> $GITHUB_ENV - if: matrix.python-version == 3.12 + if: matrix.python-version == "3.12-dev" - name: Run Tests run: | set -x From ae14bf926a50c9859d11c25563b81d7374d2bd90 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 13 Feb 2024 14:30:31 -0700 Subject: [PATCH 6/8] Just use 3.12 instead of 3.12-dev --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c893990..d290600a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,11 +5,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12-dev'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] # https://numpy.org/neps/nep-0029-deprecation_policy.html numpy-version: ['1.22', 'latest', 'dev'] exclude: - - python-version: '3.12-dev' + - python-version: '3.12' numpy-version: '1.22' fail-fast: false steps: @@ -32,7 +32,7 @@ jobs: # Enable experimental faster sys.monitoring coverage for Python 3.12 - name: Set COVERAGE_CORE=sysmon run: echo "COVERAGE_CORE=sysmon" >> $GITHUB_ENV - if: matrix.python-version == "3.12-dev" + if: matrix.python-version == 3.12 - name: Run Tests run: | set -x From 06b36efdd00da44e648dee3c108ea9308ac681a2 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 13 Feb 2024 16:27:02 -0700 Subject: [PATCH 7/8] Test disabling coverage reporting to see what the runtime is --- .github/workflows/tests.yml | 14 +++++++------- pytest.ini | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d290600a..4f4000c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,7 +40,7 @@ jobs: python -We:invalid -We::SyntaxWarning -m compileall -f -q ndindex/ # The coverage requirement check is done by the coverage report line below - PYTEST_FLAGS="$PYTEST_FLAGS -v --cov-fail-under=0"; + # PYTEST_FLAGS="$PYTEST_FLAGS -v --cov-fail-under=0"; pytest $PYTEST_FLAGS ./run_doctests # Make sure it installs @@ -48,9 +48,9 @@ jobs: # Coverage. This also sets the failing status if the # coverage is not 100%. Travis sometimes cuts off the last command, which is # why we print stuff at the end. - if ! coverage report -m; then - echo "Coverage failed"; - false; - else - echo "Coverage passed"; - fi; + # if ! coverage report -m; then + # echo "Coverage failed"; + # false; + # else + # echo "Coverage passed"; + # fi; diff --git a/pytest.ini b/pytest.ini index 97864177..2b240119 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] -addopts = --cov=ndindex/ --cov-report=term-missing --flakes --full-trace +addopts = --flakes --full-trace filterwarnings = error From 77dadf6c57cc0ddf7addf28e04b7d80cb9913998 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 13 Feb 2024 21:26:12 -0700 Subject: [PATCH 8/8] Revert "Test disabling coverage reporting to see what the runtime is" This reverts commit 06b36efdd00da44e648dee3c108ea9308ac681a2. --- .github/workflows/tests.yml | 14 +++++++------- pytest.ini | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4f4000c7..d290600a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,7 +40,7 @@ jobs: python -We:invalid -We::SyntaxWarning -m compileall -f -q ndindex/ # The coverage requirement check is done by the coverage report line below - # PYTEST_FLAGS="$PYTEST_FLAGS -v --cov-fail-under=0"; + PYTEST_FLAGS="$PYTEST_FLAGS -v --cov-fail-under=0"; pytest $PYTEST_FLAGS ./run_doctests # Make sure it installs @@ -48,9 +48,9 @@ jobs: # Coverage. This also sets the failing status if the # coverage is not 100%. Travis sometimes cuts off the last command, which is # why we print stuff at the end. - # if ! coverage report -m; then - # echo "Coverage failed"; - # false; - # else - # echo "Coverage passed"; - # fi; + if ! coverage report -m; then + echo "Coverage failed"; + false; + else + echo "Coverage passed"; + fi; diff --git a/pytest.ini b/pytest.ini index 2b240119..97864177 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] -addopts = --flakes --full-trace +addopts = --cov=ndindex/ --cov-report=term-missing --flakes --full-trace filterwarnings = error