From 53c2306d06ed9c3f380471ba80c9662990785711 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 13:57:57 -0500 Subject: [PATCH 01/12] Don't install graphblas=8.0 yet Fixes #458 --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index d129ef26f..36624fe36 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -258,7 +258,7 @@ jobs: ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ - ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0"' || '' }} \ + ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0,<8.0"' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From 052ff08a6230340c5cdd402ee79f13bae7b049de Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 14:10:10 -0500 Subject: [PATCH 02/12] Show bash command --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 36624fe36..115423085 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -82,7 +82,7 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - shell: bash -l {0} + shell: bash -lx {0} strategy: # To "stress test" in CI, set `fail-fast` to `false` and perhaps add more items to `matrix.slowtask` fail-fast: true From c238f5e9212c607f98d28dafabe11e2c61d3d38a Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 14:21:13 -0500 Subject: [PATCH 03/12] use `set -x` instead --- .github/workflows/test_and_build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 115423085..d911989cd 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -82,7 +82,7 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - shell: bash -lx {0} + shell: bash -l {0} strategy: # To "stress test" in CI, set `fail-fast` to `false` and perhaps add more items to `matrix.slowtask` fail-fast: true @@ -167,6 +167,7 @@ jobs: # # First let's randomly get versions of dependencies to install. # Consider removing old versions when they become problematic or very old (>=2 years). + set -x # echo on nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", "=3.1", ""]))') yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))') sparsever=$(python -c 'import random ; print(random.choice(["=0.13", "=0.14", ""]))') @@ -262,6 +263,7 @@ jobs: ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | + set -x # echo on if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # Add --pre if installing a pre-release pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} @@ -282,6 +284,7 @@ jobs: pip install --no-deps -e . - name: Unit tests run: | + set -x # echo on A=${{ needs.rngs.outputs.mapnumpy == 'A' || '' }} ; B=${{ needs.rngs.outputs.mapnumpy == 'B' || '' }} C=${{ needs.rngs.outputs.mapnumpy == 'C' || '' }} ; D=${{ needs.rngs.outputs.mapnumpy == 'D' || '' }} E=${{ needs.rngs.outputs.backend == 'E' || '' }} ; F=${{ needs.rngs.outputs.backend == 'F' || '' }} From 79dc5311d66a76e152bea53ee17b86d0c19a062e Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 14:28:12 -0500 Subject: [PATCH 04/12] Don't install python-suitesparse-graphblas from upstream (which needs ss:gb 8.0) --- .github/workflows/test_and_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index d911989cd..2da26b911 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -131,9 +131,9 @@ jobs: source upstream weights: | - 1 - 1 - 1 + 1000000 + 1000000 + 1000000 1 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 From 3b6e654e9f78c7818acdce569d8955afd94bfebf Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 14:30:09 -0500 Subject: [PATCH 05/12] Use `set -x` more strategically --- .github/workflows/test_and_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 2da26b911..233d1833d 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -167,7 +167,6 @@ jobs: # # First let's randomly get versions of dependencies to install. # Consider removing old versions when they become problematic or very old (>=2 years). - set -x # echo on nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", "=3.1", ""]))') yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))') sparsever=$(python -c 'import random ; print(random.choice(["=0.13", "=0.14", ""]))') @@ -253,6 +252,7 @@ jobs: fi echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" + set -x # echo on $(command -v mamba || command -v conda) install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig tomli \ pyyaml${yamlver} ${sparse} pandas${pdver} scipy${spver} numpy${npver} ${awkward} \ networkx${nxver} ${numba} ${fmm} ${psg} \ @@ -263,7 +263,6 @@ jobs: ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | - set -x # echo on if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # Add --pre if installing a pre-release pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} @@ -284,7 +283,6 @@ jobs: pip install --no-deps -e . - name: Unit tests run: | - set -x # echo on A=${{ needs.rngs.outputs.mapnumpy == 'A' || '' }} ; B=${{ needs.rngs.outputs.mapnumpy == 'B' || '' }} C=${{ needs.rngs.outputs.mapnumpy == 'C' || '' }} ; D=${{ needs.rngs.outputs.mapnumpy == 'D' || '' }} E=${{ needs.rngs.outputs.backend == 'E' || '' }} ; F=${{ needs.rngs.outputs.backend == 'F' || '' }} @@ -311,6 +309,7 @@ jobs: if [[ $H && $bizarro ]] ; then if [[ $macos ]] ; then echo " $suitesparse" ; elif [[ $windows ]] ; then echo " $vanilla" ; fi ; fi) echo ${args} pytest -v --pyargs suitesparse_graphblas + set -x # echo on coverage run -m pytest --color=yes --randomly -v ${args} \ ${{ matrix.slowtask == 'pytest_normal' && '--runslow' || '' }} - name: Unit tests (bizarro scalars) @@ -346,6 +345,7 @@ jobs: if [[ $H && $normal ]] ; then if [[ $macos ]] ; then echo " $suitesparse" ; elif [[ $windows ]] ; then echo " $vanilla" ; fi ; fi)$( \ if [[ $H && $bizarro ]] ; then if [[ $macos ]] ; then echo " $vanilla" ; elif [[ $windows ]] ; then echo " $suitesparse" ; fi ; fi) echo ${args} + set -x # echo on coverage run -a -m pytest --color=yes --randomly -v ${args} \ ${{ matrix.slowtask == 'pytest_bizarro' && '--runslow' || '' }} git checkout . # Undo changes to scalar default From 221fb1c644d2fda336287f28a4f5b297595f48ef Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 14:54:12 -0500 Subject: [PATCH 06/12] I don't understand... --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 233d1833d..5f3be76d1 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -259,7 +259,7 @@ jobs: ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ - ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0,<8.0"' || '' }} \ + ${{ steps.sourcetype.outputs.selected != 'wheel' && "'graphblas>=7.4.0,<8.0'" || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From f929ae54d68749063fb1a2d7d5d63f73c48c0e00 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 15:05:43 -0500 Subject: [PATCH 07/12] heh, try this --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 5f3be76d1..0c2910016 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -259,7 +259,7 @@ jobs: ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ - ${{ steps.sourcetype.outputs.selected != 'wheel' && "'graphblas>=7.4.0,<8.0'" || '' }} \ + ${{ steps.sourcetype.outputs.selected != 'wheel' && '\"graphblas>=7.4.0,<8.0\"' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From 92b05a24548d27acb5aed9ed304580c044557aa7 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 15:16:28 -0500 Subject: [PATCH 08/12] heh, this almost certainly won't work --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 0c2910016..12d398efc 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -259,7 +259,7 @@ jobs: ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ - ${{ steps.sourcetype.outputs.selected != 'wheel' && '\"graphblas>=7.4.0,<8.0\"' || '' }} \ + "${{ steps.sourcetype.outputs.selected != 'wheel' && 'graphblas>=7.4.0,<8.0' || 'python' }}" \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From c7b9fd5e852d3df2fdf5615005396104d5daae93 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 15:17:17 -0500 Subject: [PATCH 09/12] heh, maybe this --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 12d398efc..81fd57249 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -259,7 +259,7 @@ jobs: ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ - "${{ steps.sourcetype.outputs.selected != 'wheel' && 'graphblas>=7.4.0,<8.0' || 'python' }}" \ + '"'${{ steps.sourcetype.outputs.selected != 'wheel' && 'graphblas>=7.4.0,<8.0' || 'python' }}'"' \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From a48eae4790854db55421ca860f66c2e91935b92f Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 15:19:57 -0500 Subject: [PATCH 10/12] I don't think we need this --- .github/workflows/test_and_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 81fd57249..c0e513699 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -17,9 +17,9 @@ on: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} +# cancel-in-progress: true jobs: rngs: From e7e0d57cbf011dc9ce73cf3ceeef07a23f136f87 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 15:25:28 -0500 Subject: [PATCH 11/12] I give up... let's just be explicit --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index c0e513699..b0d6bb837 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -259,7 +259,7 @@ jobs: ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ - '"'${{ steps.sourcetype.outputs.selected != 'wheel' && 'graphblas>=7.4.0,<8.0' || 'python' }}'"' \ + ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas=7.4"' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From 80653cfd8f573d7130359580070ad37dc278450d Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 2 Jun 2023 17:20:41 -0500 Subject: [PATCH 12/12] Bump versions --- .github/workflows/test_and_build.yml | 2 +- .pre-commit-config.yaml | 6 +++--- graphblas/tests/test_vector.py | 2 +- scripts/check_versions.sh | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index b0d6bb837..ac541294f 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -170,7 +170,7 @@ jobs: nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", "=3.1", ""]))') yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))') sparsever=$(python -c 'import random ; print(random.choice(["=0.13", "=0.14", ""]))') - fmmver=$(python -c 'import random ; print(random.choice(["=1.4", "=1.5", ""]))') + fmmver=$(python -c 'import random ; print(random.choice(["=1.4", "=1.5", "=1.6", ""]))') if [[ ${{ startsWith(steps.pyver.outputs.selected, '3.8') }} == true ]]; then npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", "=1.24", ""]))') spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", ""]))') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4588ed4f4..4d0e5c0b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - id: black - id: black-jupyter - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.269 + rev: v0.0.270 hooks: - id: ruff args: [--fix-only, --show-fixes] @@ -94,7 +94,7 @@ repos: additional_dependencies: [tomli] files: ^(graphblas|docs)/ - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.269 + rev: v0.0.270 hooks: - id: ruff - repo: https://github.com/sphinx-contrib/sphinx-lint @@ -110,7 +110,7 @@ repos: - id: pyroma args: [-n, "10", .] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: "v0.9.0.2" + rev: "v0.9.0.5" hooks: - id: shellcheck - repo: local diff --git a/graphblas/tests/test_vector.py b/graphblas/tests/test_vector.py index bd2083fd1..36ab346b8 100644 --- a/graphblas/tests/test_vector.py +++ b/graphblas/tests/test_vector.py @@ -1432,7 +1432,7 @@ def test_vector_index_with_scalar(): s0 = Scalar.from_value(0, dtype=dtype) w = v[[s1, s0]].new() assert w.isequal(expected) - for dtype in ["bool", "fp32", "fp64"] + ["fc32", "fc64"] if dtypes._supports_complex else []: + for dtype in ["bool", "fp32", "fp64"] + (["fc32", "fc64"] if dtypes._supports_complex else []): s = Scalar.from_value(1, dtype=dtype) with pytest.raises(TypeError, match="An integer is required for indexing"): v[s] diff --git a/scripts/check_versions.sh b/scripts/check_versions.sh index dda7adbaa..af72f9655 100755 --- a/scripts/check_versions.sh +++ b/scripts/check_versions.sh @@ -4,13 +4,13 @@ # This may be helpful when updating dependency versions in CI. # Tip: add `--json` for more information. conda search 'numpy[channel=conda-forge]>=1.24.3' -conda search 'pandas[channel=conda-forge]>=2.0.1' +conda search 'pandas[channel=conda-forge]>=2.0.2' conda search 'scipy[channel=conda-forge]>=1.10.1' conda search 'networkx[channel=conda-forge]>=3.1' -conda search 'awkward[channel=conda-forge]>=2.2.0' +conda search 'awkward[channel=conda-forge]>=2.2.1' conda search 'sparse[channel=conda-forge]>=0.14.0' -conda search 'fast_matrix_market[channel=conda-forge]>=1.5.1' -conda search 'numba[channel=conda-forge]>=0.56.4' +conda search 'fast_matrix_market[channel=conda-forge]>=1.6.0' +conda search 'numba[channel=conda-forge]>=0.57.0' conda search 'pyyaml[channel=conda-forge]>=6.0' conda search 'flake8-bugbear[channel=conda-forge]>=23.5.9' conda search 'flake8-simplify[channel=conda-forge]>=0.20.0'