From c91229d83c823f0a1d27918d20a44ac3d36afda0 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 11 Feb 2023 23:11:41 -0600 Subject: [PATCH 01/59] Test new wheels for `python-suitesparse-graphblas` on all OSes --- .github/workflows/test_and_build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index d3f193c51..bd445a1c6 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -118,10 +118,10 @@ jobs: source upstream weights: | - 2 - 1 - 1 + 0 1 + 0 + 0 - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: @@ -194,13 +194,11 @@ jobs: ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} \ - ${{ matrix.os != 'ubuntu-latest' && '"graphblas>=7.4.0"' || '' }} \ - ${{ steps.sourcetype.outputs.selected == 'wheel' && matrix.os != 'ubuntu-latest' && 'python-suitesparse-graphblas' || '' }} + ${{ matrix.os != 'ubuntu-latest' && '"graphblas>=7.4.0"' || '' }} - name: Build extension module run: | - # We only have wheels for Linux right now - if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" && ${{ matrix.os }} == "ubuntu-latest" ]]; then - pip install --no-deps suitesparse-graphblas + if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then + pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then pip install --no-deps --no-binary=all suitesparse-graphblas elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then From 9ff0112f0fb2f8d28c50897d260eb3d469b90980 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 11 Feb 2023 23:15:38 -0600 Subject: [PATCH 02/59] Different weights --- .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 bd445a1c6..bc79ffe7e 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -118,10 +118,10 @@ jobs: source upstream weights: | - 0 1 - 0 - 0 + 1000000 + 1 + 1 - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: From 53c168aa4bc2530d7ea0bdbf2cf0ad11925897a9 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 11 Feb 2023 23:21:15 -0600 Subject: [PATCH 03/59] Don't fail fast --- .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 bc79ffe7e..b15e4ef21 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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 + fail-fast: false # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. From 48b14d29abf9d19df2df80c626de24b72294f587 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 12 Feb 2023 00:07:52 -0600 Subject: [PATCH 04/59] See what happens with KMP_DUPLICATE_LIB_OK=True --- .github/workflows/test_and_build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index b15e4ef21..164b00249 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -17,6 +17,9 @@ on: branches: - main +env: + KMP_DUPLICATE_LIB_OK: True + jobs: rngs: # To achieve consistent coverage, we need a little bit of correlated collaboration. From 6292c98f1be96fc3b77208cf3d4e05ab8b22bf3e Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 12 Feb 2023 00:35:59 -0600 Subject: [PATCH 05/59] Better comment and add a test for openmp enabled --- .github/workflows/test_and_build.yml | 9 +++++---- graphblas/tests/test_ss_utils.py | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 164b00249..c28af513a 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -17,9 +17,6 @@ on: branches: - main -env: - KMP_DUPLICATE_LIB_OK: True - jobs: rngs: # To achieve consistent coverage, we need a little bit of correlated collaboration. @@ -84,13 +81,17 @@ jobs: 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: false + fail-fast: true # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] slowtask: ["pytest_normal", "pytest_bizarro", "notebooks"] + env: + # Wheels on OS X come with an OpenMP that conflicts with OpenMP from conda-forge. + # Setting this is a workaround. + KMP_DUPLICATE_LIB_OK: True steps: - name: Checkout uses: actions/checkout@v3 diff --git a/graphblas/tests/test_ss_utils.py b/graphblas/tests/test_ss_utils.py index d21f41f03..12c8c6329 100644 --- a/graphblas/tests/test_ss_utils.py +++ b/graphblas/tests/test_ss_utils.py @@ -198,6 +198,11 @@ def test_about(): assert "library_name" in repr(about) +def test_openmp_enabled(): + # SuiteSparse:GraphBLAS without OpenMP enabled is very undesirable + assert gb.ss.about["openmp"] + + def test_global_config(): d = {} config = gb.ss.config From fdb4cdcb3f374a508b9b4bd7965d8e8616152982 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 12 Feb 2023 00:42:40 -0600 Subject: [PATCH 06/59] Ready to merge? --- .github/workflows/test_and_build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index c28af513a..1f454ca49 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -114,16 +114,16 @@ jobs: uses: ddradar/choose-random-action@v2.0.2 id: sourcetype with: - # Set weight to 0 to skip (such as if 'upstream' is known to not work). - # Have slightly higher weight for `conda-forge` for faster CI. + # Set weight close to 0 to skip (such as if 'upstream' is known to not work). + # Have slightly higher weight for `conda-forge` and `wheel` for faster CI. contents: | conda-forge wheel source upstream weights: | - 1 - 1000000 + 2 + 2 1 1 - name: Setup conda @@ -202,6 +202,7 @@ jobs: - name: Build extension module run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then + # TODO: get this from regular PyPI pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then pip install --no-deps --no-binary=all suitesparse-graphblas From 4450432b8eebc94ee6bfb28f0779981406ad28a7 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 12 Feb 2023 11:38:48 -0600 Subject: [PATCH 07/59] Also test sdist --- .github/workflows/test_and_build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 1f454ca49..45e72d6a3 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -122,8 +122,8 @@ jobs: source upstream weights: | - 2 - 2 + 1 + 1 1 1 - name: Setup conda @@ -205,9 +205,11 @@ jobs: # TODO: get this from regular PyPI pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then - pip install --no-deps --no-binary=all suitesparse-graphblas + # TODO: get this from regular PyPI + pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then - pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas + # TODO: get from main, not from a specific hash + pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@7214254aff5cbe708ddea318a85871244e5d673d#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From 71627adccc9eb9ac267c606c6fb14b018a4559d8 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 12 Feb 2023 12:10:21 -0600 Subject: [PATCH 08/59] update comment --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 45e72d6a3..cbff67c61 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -114,8 +114,8 @@ jobs: uses: ddradar/choose-random-action@v2.0.2 id: sourcetype with: - # Set weight close to 0 to skip (such as if 'upstream' is known to not work). - # Have slightly higher weight for `conda-forge` and `wheel` for faster CI. + # Weights must be natural numbers, so set weights to very large to skip one + # (such as if 'upstream' is known to not work). contents: | conda-forge wheel From f76c9a6e107bb12a1d40cade6e8185d0524592a0 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 17 Feb 2023 05:14:57 +0100 Subject: [PATCH 09/59] Use hash from latest psg PR commit --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index cbff67c61..88a267e80 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -123,7 +123,7 @@ jobs: upstream weights: | 1 - 1 + 100 1 1 - name: Setup conda @@ -209,7 +209,7 @@ jobs: pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash - pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@7214254aff5cbe708ddea318a85871244e5d673d#egg=suitesparse-graphblas + pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@c270d51b2b1f02bede3052f1231124e716ba8c01#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From 0084c4a65e265448e2e5a5dba6824ce669bb01e0 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 15:44:20 -0500 Subject: [PATCH 10/59] Test new "test" wheels --- .github/workflows/test_and_build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index c1772588c..d47fba71e 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -124,8 +124,8 @@ jobs: weights: | 1 100 - 1 - 1 + 100 + 100 - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: @@ -191,26 +191,24 @@ jobs: fi echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" - # Once we have wheels for all OSes, we can delete the last two lines. mamba install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ ${{ 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 == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} \ - ${{ matrix.os != 'ubuntu-latest' && '"graphblas>=7.4.0"' || '' }} + ${{ steps.sourcetype.outputs.selected == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} - name: Build extension module run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas + pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==0.0.9 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas + pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==0.0.9 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash - pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@c270d51b2b1f02bede3052f1231124e716ba8c01#egg=suitesparse-graphblas + pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@7ced0a308168764cf8f9bad0f40b6630d4e5f04b#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From d0122d39abc77aebd27b08776a0b3592dcfc54ad Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 15:57:15 -0500 Subject: [PATCH 11/59] Try using conda instead --- .github/workflows/test_and_build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index d47fba71e..b2fcd2c7d 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -129,9 +129,10 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: - miniforge-variant: Mambaforge - miniforge-version: latest - use-mamba: true + # miniforge-variant: Mambaforge + # miniforge-version: latest + # use-mamba: true + auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} channels: conda-forge,nodefaults channel-priority: strict @@ -191,7 +192,7 @@ jobs: fi echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" - mamba install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ + conda install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ From a7e651d4440a8cf430ca819daae43a70011c53c9 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 16:48:57 -0500 Subject: [PATCH 12/59] Temporary change for testing --- graphblas/tests/test_dtype.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/graphblas/tests/test_dtype.py b/graphblas/tests/test_dtype.py index 64e6d69ab..d81a19756 100644 --- a/graphblas/tests/test_dtype.py +++ b/graphblas/tests/test_dtype.py @@ -249,10 +249,11 @@ def test_has_complex(): assert dtypes._supports_complex return - import suitesparse_graphblas as ssgb - from packaging.version import parse - - if parse(ssgb.__version__) < parse("7.4.3.1"): - assert not dtypes._supports_complex - else: - assert dtypes._supports_complex + # import suitesparse_graphblas as ssgb + # from packaging.version import parse + + # if parse(ssgb.__version__) < parse("7.4.3.1"): + # assert not dtypes._supports_complex + # else: + # assert dtypes._supports_complex + assert dtypes._supports_complex # XXX From 8cc62581e695165c694eeadc3f7b3d505bffda59 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 16:57:15 -0500 Subject: [PATCH 13/59] About to try something... --- .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 b2fcd2c7d..1786c31db 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -149,17 +149,17 @@ jobs: yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))') sparsever=$(python -c 'import random ; print(random.choice(["=0.12", "=0.13", "=0.14", ""]))') fmmver=$(python -c 'import random ; print(random.choice(["=1.4", ""]))') - if [[ ${{ steps.pyver.outputs.selected }} == "3.8" ]]; then + if [[ ${{ startsWith(steps.pyver.outputs.selected, '3.8') }} == true ]]; then npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", ""]))') spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", ""]))') pdver=$(python -c 'import random ; print(random.choice(["=1.2", "=1.3", "=1.4", "=1.5", ""]))') akver=$(python -c 'import random ; print(random.choice(["=1.9", "=1.10", "=2.0", "=2.1", ""]))') - elif [[ ${{ steps.pyver.outputs.selected }} == "3.9" ]]; then + elif [[ ${{ startsWith(steps.pyver.outputs.selected, '3.9') }} == true ]]; then npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", ""]))') spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", ""]))') pdver=$(python -c 'import random ; print(random.choice(["=1.2", "=1.3", "=1.4", "=1.5", ""]))') akver=$(python -c 'import random ; print(random.choice(["=1.9", "=1.10", "=2.0", "=2.1", ""]))') - elif [[ ${{ steps.pyver.outputs.selected }} == "3.10" ]]; then + elif [[ ${{ startsWith(steps.pyver.outputs.selected, '3.10') }} == true ]]; then npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", ""]))') spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", ""]))') pdver=$(python -c 'import random ; print(random.choice(["=1.3", "=1.4", "=1.5", ""]))') From 3cdcdaec112f969fb5aee75bf87df062d48de52f Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 17:06:04 -0500 Subject: [PATCH 14/59] Try testing on PyPy --- .github/workflows/test_and_build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 1786c31db..937d516e0 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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 + fail-fast: false # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -106,10 +106,14 @@ jobs: 3.8 3.9 3.10 + 3.8.16 0_73_pypy + 3.9.16 0_73_pypy weights: | 1 1 1 + 100 + 100 - name: RNG for source of python-suitesparse-graphblas uses: ddradar/choose-random-action@v2.0.2 id: sourcetype From 5f795446f471a6f89513cc5f9aa059de7119c314 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 17:52:05 -0500 Subject: [PATCH 15/59] fast_matrix_market not available in PyPy --- .github/workflows/test_and_build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 937d516e0..2ea356f6a 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -152,7 +152,7 @@ jobs: nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", ""]))') yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))') sparsever=$(python -c 'import random ; print(random.choice(["=0.12", "=0.13", "=0.14", ""]))') - fmmver=$(python -c 'import random ; print(random.choice(["=1.4", ""]))') + fmmver=fast_matrix_market$(python -c 'import random ; print(random.choice(["=1.4", ""]))') if [[ ${{ startsWith(steps.pyver.outputs.selected, '3.8') }} == true ]]; then npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", ""]))') spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", ""]))') @@ -181,6 +181,10 @@ jobs: spver="" pdver="" fi + if [[ ${{ contains(steps.pyver.outputs.selected, 'pypy') }} == true ]]; then + # Not available with PyPy + fmmver="" + fi # We can have a tight coupling with python-suitesparse-graphblas. # That is, we don't need to support versions of it that are two years old. # But, it's still useful for us to test with different versions! @@ -197,7 +201,7 @@ jobs: echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" conda install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ - pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ + pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} ${fmmver} \ ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ From cfd5a1cbce747682bd1a7a86cd5f87d4d6750be6 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 17:55:46 -0500 Subject: [PATCH 16/59] give pypy more flexibility --- .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 2ea356f6a..b114d49ae 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -138,7 +138,7 @@ jobs: # use-mamba: true auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} - channels: conda-forge,nodefaults + channels: conda-forge${{ contains(steps.pyver.outputs.selected, 'pypy') && '' || ',nodefaults' }} channel-priority: strict activate-environment: graphblas auto-activate-base: false From 7a51e15445d897a18def80e631df05e5353d8faf Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 18:11:34 -0500 Subject: [PATCH 17/59] Relax all versions temporarily just to see --- .github/workflows/test_and_build.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index b114d49ae..79a72944b 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -127,9 +127,9 @@ jobs: upstream weights: | 1 - 100 - 100 - 100 + 1 + 1 + 1 - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: @@ -184,6 +184,14 @@ jobs: if [[ ${{ contains(steps.pyver.outputs.selected, 'pypy') }} == true ]]; then # Not available with PyPy fmmver="" + # XXX: temporary! + npver="" + spver="" + pdver="" + akver="" + nxver="" + yamlver="" + sparsever="" fi # We can have a tight coupling with python-suitesparse-graphblas. # That is, we don't need to support versions of it that are two years old. From 87948d2357f7e34b912099a9a58f6bc12317a1d7 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 18:21:24 -0500 Subject: [PATCH 18/59] Make sure pypy is and remains installed --- .github/workflows/test_and_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 79a72944b..92aa3ec3a 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -214,7 +214,8 @@ jobs: ${{ 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 == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} + ${{ steps.sourcetype.outputs.selected == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} \ + ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then From c5027c7e70f8a947ce03b1f4519f864ec2d4e0bc Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 18:38:15 -0500 Subject: [PATCH 19/59] check pypy versions --- scripts/check_versions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check_versions.sh b/scripts/check_versions.sh index d08ad6476..0aee9ccb7 100755 --- a/scripts/check_versions.sh +++ b/scripts/check_versions.sh @@ -14,3 +14,4 @@ conda search 'numba[channel=conda-forge]>=0.56.4' conda search 'pyyaml[channel=conda-forge]>=6.0' conda search 'flake8-bugbear[channel=conda-forge]>=23.3.12' conda search 'flake8-simplify[channel=conda-forge]>=0.19.3' +conda search 'python[channel=conda-forge]>=3.8 *pypy*' From 70e27ffee6ab26d9b4a6ba2a2a6a5f3f6c39a9be Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 18:55:30 -0500 Subject: [PATCH 20/59] Forgot defaults channel! --- .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 92aa3ec3a..87e151503 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -138,7 +138,7 @@ jobs: # use-mamba: true auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} - channels: conda-forge${{ contains(steps.pyver.outputs.selected, 'pypy') && '' || ',nodefaults' }} + channels: conda-forge,${{ contains(steps.pyver.outputs.selected, 'pypy') && 'defaults' || 'nodefaults' }} channel-priority: strict activate-environment: graphblas auto-activate-base: false From d12c2f38f9d95da4b818947ccd31dc7803cd7c96 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 19:00:52 -0500 Subject: [PATCH 21/59] and flexible channel priority for pypy --- .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 87e151503..c2cb7f046 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -139,7 +139,7 @@ jobs: auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} channels: conda-forge,${{ contains(steps.pyver.outputs.selected, 'pypy') && 'defaults' || 'nodefaults' }} - channel-priority: strict + channel-priority: ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'flexible' || 'strict' }} activate-environment: graphblas auto-activate-base: false - name: Update env From 1010c4d71a048ad15642ec0d08e5daf06ac754f3 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 19:03:00 -0500 Subject: [PATCH 22/59] Gather more data --- .github/workflows/test_and_build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index c2cb7f046..b11a68cf7 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -185,13 +185,13 @@ jobs: # Not available with PyPy fmmver="" # XXX: temporary! - npver="" - spver="" - pdver="" - akver="" - nxver="" - yamlver="" - sparsever="" + # npver="" + # spver="" + # pdver="" + # akver="" + # nxver="" + # yamlver="" + # sparsever="" fi # We can have a tight coupling with python-suitesparse-graphblas. # That is, we don't need to support versions of it that are two years old. From 551963c633340f07ea88503431031e2b2fec8bbb Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 19:12:02 -0500 Subject: [PATCH 23/59] Try to pip install fast-matrix-market on PyPy --- .github/workflows/test_and_build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index b11a68cf7..90ba51404 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -152,7 +152,7 @@ jobs: nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", ""]))') yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))') sparsever=$(python -c 'import random ; print(random.choice(["=0.12", "=0.13", "=0.14", ""]))') - fmmver=fast_matrix_market$(python -c 'import random ; print(random.choice(["=1.4", ""]))') + fmmver=$(python -c 'import random ; print(random.choice(["=1.4", ""]))') if [[ ${{ startsWith(steps.pyver.outputs.selected, '3.8') }} == true ]]; then npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", ""]))') spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", ""]))') @@ -182,7 +182,12 @@ jobs: pdver="" fi if [[ ${{ contains(steps.pyver.outputs.selected, 'pypy') }} == true ]]; then - # Not available with PyPy + # Not available from conda-forge for PyPy + if [[ $(fmmver) ]]; then + python -m pip install fast-matrix-market=$(fmmver) --no-deps --only-binary ":all:" + else + python -m pip install fast-matrix-market --no-deps --only-binary ":all:" + fi fmmver="" # XXX: temporary! # npver="" @@ -192,6 +197,8 @@ jobs: # nxver="" # yamlver="" # sparsever="" + else + fmmver=fast_matrix_market$(fmmver) fi # We can have a tight coupling with python-suitesparse-graphblas. # That is, we don't need to support versions of it that are two years old. From d22368c080774ad011ffb30ea602bf4e7a24927c Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 19:14:32 -0500 Subject: [PATCH 24/59] is mamba working yet? --- .github/workflows/test_and_build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 90ba51404..374cfd6f0 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -133,10 +133,10 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: - # miniforge-variant: Mambaforge - # miniforge-version: latest - # use-mamba: true - auto-update-conda: true + miniforge-variant: Mambaforge + miniforge-version: latest + use-mamba: true + # auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} channels: conda-forge,${{ contains(steps.pyver.outputs.selected, 'pypy') && 'defaults' || 'nodefaults' }} channel-priority: ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'flexible' || 'strict' }} @@ -215,7 +215,7 @@ jobs: fi echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" - conda install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ + mamba install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} ${fmmver} \ ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ From 6387eb1d24cdba57ba1593e35b06e44839683b3e Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 19:52:14 -0500 Subject: [PATCH 25/59] undo pypy experimentation --- .github/workflows/test_and_build.yml | 46 ++++++++-------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 374cfd6f0..0157a7552 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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: false + fail-fast: true # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -91,7 +91,7 @@ jobs: env: # Wheels on OS X come with an OpenMP that conflicts with OpenMP from conda-forge. # Setting this is a workaround. - KMP_DUPLICATE_LIB_OK: True + KMP_DUPLICATE_LIB_OK: ${{ contains(matrix.os, 'macos') && 'True' || '' }} steps: - name: Checkout uses: actions/checkout@v3 @@ -102,18 +102,17 @@ jobs: id: pyver with: # We should support major Python versions for at least 36-42 months + # We could probably support pypy if numba were optional + # 3.8.16 0_73_pypy + # 3.9.16 0_73_pypy contents: | 3.8 3.9 3.10 - 3.8.16 0_73_pypy - 3.9.16 0_73_pypy weights: | 1 1 1 - 100 - 100 - name: RNG for source of python-suitesparse-graphblas uses: ddradar/choose-random-action@v2.0.2 id: sourcetype @@ -133,13 +132,13 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: - miniforge-variant: Mambaforge - miniforge-version: latest - use-mamba: true - # auto-update-conda: true + # miniforge-variant: Mambaforge + # miniforge-version: latest + # use-mamba: true + auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} - channels: conda-forge,${{ contains(steps.pyver.outputs.selected, 'pypy') && 'defaults' || 'nodefaults' }} - channel-priority: ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'flexible' || 'strict' }} + channels: conda-forge,nodefaults + channel-priority: strict activate-environment: graphblas auto-activate-base: false - name: Update env @@ -181,25 +180,6 @@ jobs: spver="" pdver="" fi - if [[ ${{ contains(steps.pyver.outputs.selected, 'pypy') }} == true ]]; then - # Not available from conda-forge for PyPy - if [[ $(fmmver) ]]; then - python -m pip install fast-matrix-market=$(fmmver) --no-deps --only-binary ":all:" - else - python -m pip install fast-matrix-market --no-deps --only-binary ":all:" - fi - fmmver="" - # XXX: temporary! - # npver="" - # spver="" - # pdver="" - # akver="" - # nxver="" - # yamlver="" - # sparsever="" - else - fmmver=fast_matrix_market$(fmmver) - fi # We can have a tight coupling with python-suitesparse-graphblas. # That is, we don't need to support versions of it that are two years old. # But, it's still useful for us to test with different versions! @@ -215,8 +195,8 @@ jobs: fi echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" - mamba install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ - pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} ${fmmver} \ + conda install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ + pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ From 351eaaffac393b65bcfe6095d78f2a92b42e3d9d Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 20:00:19 -0500 Subject: [PATCH 26/59] is mamba working yet? --- .github/workflows/test_and_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 0157a7552..fc44394df 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -132,10 +132,10 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: - # miniforge-variant: Mambaforge - # miniforge-version: latest - # use-mamba: true - auto-update-conda: true + miniforge-variant: Mambaforge + miniforge-version: latest + use-mamba: true + # auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} channels: conda-forge,nodefaults channel-priority: strict From 2e9d794f12a1dcb74e9e0559daf844795134723c Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 20:08:51 -0500 Subject: [PATCH 27/59] Use mamba or conda, b/c it's no fun when one fails to install --- .github/workflows/test_and_build.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index fc44394df..e1d81ea75 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -129,13 +129,26 @@ jobs: 1 1 1 - - name: Setup conda + - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 + id: setup_mamba + continue-on-error: true with: miniforge-variant: Mambaforge miniforge-version: latest use-mamba: true - # auto-update-conda: true + python-version: ${{ steps.pyver.outputs.selected }} + channels: conda-forge,nodefaults + channel-priority: strict + activate-environment: graphblas + auto-activate-base: false + - name: Setup conda + uses: conda-incubator/setup-miniconda@v2 + id: setup_conda + if: steps.setup_mamba.outcome == 'failure' + continue-on-error: false + with: + auto-update-conda: true python-version: ${{ steps.pyver.outputs.selected }} channels: conda-forge,nodefaults channel-priority: strict @@ -195,8 +208,9 @@ jobs: fi echo "versions: np${npver} sp${spver} pd${pdver} ak${akver} nx${nxver} numba${numbaver} yaml${yamlver} sparse${sparsever} psgver${psgver}" - conda install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig pyyaml${yamlver} sparse${sparsever} \ - pandas${pdver} scipy${spver} numpy${npver} awkward${akver} networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ + $(command -v mamba || command -v conda) install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig \ + pyyaml${yamlver} sparse${sparsever} pandas${pdver} scipy${spver} numpy${npver} awkward${akver} \ + networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ ${{ matrix.slowtask == 'pytest_bizarro' && 'black' || '' }} \ ${{ matrix.slowtask == 'notebooks' && 'matplotlib nbconvert jupyter "ipython>=7"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ From f4c40ebac3b078649e613caeaebad801f129893b Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 20:11:27 -0500 Subject: [PATCH 28/59] Is this still needed? --- .github/workflows/test_and_build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index e1d81ea75..98f277644 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -88,10 +88,6 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] slowtask: ["pytest_normal", "pytest_bizarro", "notebooks"] - env: - # Wheels on OS X come with an OpenMP that conflicts with OpenMP from conda-forge. - # Setting this is a workaround. - KMP_DUPLICATE_LIB_OK: ${{ contains(matrix.os, 'macos') && 'True' || '' }} steps: - name: Checkout uses: actions/checkout@v3 From 57ffe4a09fad64d2b80c2658a35d66e3c60e935c Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 20:11:54 -0500 Subject: [PATCH 29/59] And does this work as expected? --- .github/workflows/test_and_build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 98f277644..96bde6e81 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -88,6 +88,10 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] slowtask: ["pytest_normal", "pytest_bizarro", "notebooks"] + env: + # Wheels on OS X come with an OpenMP that conflicts with OpenMP from conda-forge. + # Setting this is a workaround. + KMP_DUPLICATE_LIB_OK: ${{ contains(matrix.os, 'macXXXos') && 'True' || '' }} steps: - name: Checkout uses: actions/checkout@v3 From 2ba6cad76f48284c24316dcfb6443eb8c6e25154 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 24 Mar 2023 20:26:22 -0500 Subject: [PATCH 30/59] better --- .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 96bde6e81..468ad0a0e 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -91,7 +91,7 @@ jobs: env: # Wheels on OS X come with an OpenMP that conflicts with OpenMP from conda-forge. # Setting this is a workaround. - KMP_DUPLICATE_LIB_OK: ${{ contains(matrix.os, 'macXXXos') && 'True' || '' }} + KMP_DUPLICATE_LIB_OK: ${{ contains(matrix.os, 'macos') && 'TRUE' || 'FALSE' }} steps: - name: Checkout uses: actions/checkout@v3 From 738ae4724389f39b0920c5c37c824363ffd0acb7 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Tue, 28 Mar 2023 09:21:30 -0500 Subject: [PATCH 31/59] Check test wheels 7.4.3.2 --- .github/workflows/test_and_build.yml | 6 +++--- graphblas/tests/test_dtype.py | 15 +++++++-------- scripts/check_versions.sh | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 468ad0a0e..1c8769045 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -221,13 +221,13 @@ jobs: run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==0.0.9 + pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.2 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==0.0.9 + pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.2 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash - pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@7ced0a308168764cf8f9bad0f40b6630d4e5f04b#egg=suitesparse-graphblas + pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@884de67687d0af18ec7c3ad1ecf5b9b8bfdb9ff3#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests diff --git a/graphblas/tests/test_dtype.py b/graphblas/tests/test_dtype.py index d81a19756..64e6d69ab 100644 --- a/graphblas/tests/test_dtype.py +++ b/graphblas/tests/test_dtype.py @@ -249,11 +249,10 @@ def test_has_complex(): assert dtypes._supports_complex return - # import suitesparse_graphblas as ssgb - # from packaging.version import parse - - # if parse(ssgb.__version__) < parse("7.4.3.1"): - # assert not dtypes._supports_complex - # else: - # assert dtypes._supports_complex - assert dtypes._supports_complex # XXX + import suitesparse_graphblas as ssgb + from packaging.version import parse + + if parse(ssgb.__version__) < parse("7.4.3.1"): + assert not dtypes._supports_complex + else: + assert dtypes._supports_complex diff --git a/scripts/check_versions.sh b/scripts/check_versions.sh index 0aee9ccb7..c4a868197 100755 --- a/scripts/check_versions.sh +++ b/scripts/check_versions.sh @@ -14,4 +14,4 @@ conda search 'numba[channel=conda-forge]>=0.56.4' conda search 'pyyaml[channel=conda-forge]>=6.0' conda search 'flake8-bugbear[channel=conda-forge]>=23.3.12' conda search 'flake8-simplify[channel=conda-forge]>=0.19.3' -conda search 'python[channel=conda-forge]>=3.8 *pypy*' +# conda search 'python[channel=conda-forge]>=3.8 *pypy*' From 0672b3544892048db7bf235244bb678ee8127743 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Tue, 28 Mar 2023 09:27:59 -0500 Subject: [PATCH 32/59] Test wheels --- .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 1c8769045..53b52c758 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -126,7 +126,7 @@ jobs: upstream weights: | 1 - 1 + 10 1 1 - name: Setup mamba From fea1d4c1d42f32231c78948c54034c324fbc42f5 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Tue, 28 Mar 2023 09:28:16 -0500 Subject: [PATCH 33/59] equal weights again --- .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 53b52c758..1c8769045 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -126,7 +126,7 @@ jobs: upstream weights: | 1 - 10 + 1 1 1 - name: Setup mamba From 81afe89dc869347406d78015ec322c815a58bf0a Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 Mar 2023 15:17:58 -0500 Subject: [PATCH 34/59] Check test wheels 7.4.3.3 --- .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 1c8769045..79e4d24b2 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -221,13 +221,13 @@ jobs: run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.2 + pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.2 + pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash - pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@884de67687d0af18ec7c3ad1ecf5b9b8bfdb9ff3#egg=suitesparse-graphblas + pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From 2fc39933235572db8d150b3d77f80065a3d72010 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 Mar 2023 15:27:24 -0500 Subject: [PATCH 35/59] Do we need to install setuptools? --- .github/workflows/test_and_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 79e4d24b2..4992365ac 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -216,6 +216,7 @@ jobs: ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} \ + ${{ steps.sourcetype.outputs.selected != 'conda-forge' && 'setuptools' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | From e472da607cc017c1cb7287af534b850d20c77be1 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 09:59:15 -0500 Subject: [PATCH 36/59] Try --no-build-isolation --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 4992365ac..91718bbb3 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -225,10 +225,10 @@ jobs: pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash - pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas + pip install --no-deps --no-build-isolation git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From f27798e78b2eac1851a18e6535abc812389ea982 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 10:23:37 -0500 Subject: [PATCH 37/59] Try --extra-index-url for source build of psg --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 91718bbb3..3337edfae 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -225,10 +225,10 @@ jobs: pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash - pip install --no-deps --no-build-isolation git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas + pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From 1c2006329edc5b0c5c62c76db03d7f04df238566 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 10:49:59 -0500 Subject: [PATCH 38/59] Try --no-build-isolation again --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 3337edfae..bdc303811 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -216,7 +216,7 @@ jobs: ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} \ - ${{ steps.sourcetype.outputs.selected != 'conda-forge' && 'setuptools' || '' }} \ + ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | @@ -225,7 +225,7 @@ jobs: pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI - pip install --no-deps --no-binary=all --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple suitesparse-graphblas==7.4.3.3 + pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas From 273a297013ff56f304cb468747451dbf6d0b2619 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:04:16 -0500 Subject: [PATCH 39/59] Prepare for installing from main pypi repo --- .github/workflows/test_and_build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index bdc303811..1f4de745b 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -198,6 +198,10 @@ jobs: # But, it's still useful for us to test with different versions! if [[ ${{ steps.sourcetype.outputs.selected}} == "conda-forge" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", ""]))') + elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then + psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') + elif [[ ${{ steps.sourcetype.outputs.selected}} == "source" ]] ; then + psgver=$(python -c 'import random ; print(random.choice(["==7.4.0", "==7.4.1", "==7.4.2", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') else psgver="" fi @@ -222,9 +226,11 @@ jobs: run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI + # pip install --no-deps suitesparse-graphblas${psgver} pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI + # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash From 04bddb4288ce9884a9275decee5909659228aa86 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:16:31 -0500 Subject: [PATCH 40/59] oops --- .github/workflows/test_and_build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 1f4de745b..7379959d4 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -196,8 +196,10 @@ jobs: # We can have a tight coupling with python-suitesparse-graphblas. # That is, we don't need to support versions of it that are two years old. # But, it's still useful for us to test with different versions! + psg="" if [[ ${{ steps.sourcetype.outputs.selected}} == "conda-forge" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", ""]))') + psg=python-suitesparse-graphblas${psgver} elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') elif [[ ${{ steps.sourcetype.outputs.selected}} == "source" ]] ; then @@ -214,12 +216,11 @@ jobs: $(command -v mamba || command -v conda) install packaging pytest coverage coveralls=3.3.1 pytest-randomly cffi donfig \ pyyaml${yamlver} sparse${sparsever} pandas${pdver} scipy${spver} numpy${npver} awkward${akver} \ - networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} \ + networkx${nxver} numba${numbaver} fast_matrix_market${fmmver} ${psg} \ ${{ 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 == 'conda-forge' && 'python-suitesparse-graphblas' || '' }}${psgver} \ ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module From 4d6e7cbfe42fddfcabdfd4927de0604ca2fce1bd Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:21:39 -0500 Subject: [PATCH 41/59] Come on! --- .github/workflows/test_and_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 7379959d4..7be241b00 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -222,13 +222,14 @@ jobs: ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0"' || '' }} \ ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ + ${{ steps.sourcetype.outputs.selected == 'wheel' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - name: Build extension module run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI # pip install --no-deps suitesparse-graphblas${psgver} - pip install --no-deps --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + pip install --no-deps --no-build-isolation --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} From d840a98b661d141061f987053c280af8a168e938 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:28:32 -0500 Subject: [PATCH 42/59] use --extra-index-url instead for test.pypi --- .github/workflows/test_and_build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 7be241b00..16c423534 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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 + fail-fast: false # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -229,13 +229,15 @@ jobs: if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI # pip install --no-deps suitesparse-graphblas${psgver} - pip install --no-deps --no-build-isolation --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + # pip install --no-deps --no-build-isolation --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + pip install --no-deps --extra-index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then # TODO: get from main, not from a specific hash + # pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas fi pip install --no-deps -e . From 141f56fa80c86b40ca6c618109b9baa9d4ded17e Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:43:35 -0500 Subject: [PATCH 43/59] test wheels --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 16c423534..e1019e0c9 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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: false + fail-fast: true # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -126,7 +126,7 @@ jobs: upstream weights: | 1 - 1 + 100 1 1 - name: Setup mamba From 2b566f34893bf1039a5bec082c7df7ff08a37b34 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:57:37 -0500 Subject: [PATCH 44/59] Use `--only-binary ":all:"` when installing wheels --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index e1019e0c9..99b897823 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -228,9 +228,9 @@ jobs: run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # TODO: get this from regular PyPI - # pip install --no-deps suitesparse-graphblas${psgver} + # pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} # pip install --no-deps --no-build-isolation --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 - pip install --no-deps --extra-index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} From 2e1aa1aabb195d42684ac2e48ef06fe1e7dd3752 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 11:59:40 -0500 Subject: [PATCH 45/59] oops --- .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 99b897823..3450ab543 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -230,7 +230,7 @@ jobs: # TODO: get this from regular PyPI # pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} # pip install --no-deps --no-build-isolation --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 - pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3 + pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # TODO: get this from regular PyPI # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} From 886ba808b3e1eb9f9073438e6b5e8390b2384ad0 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 12:07:44 -0500 Subject: [PATCH 46/59] install from everywhere --- .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 3450ab543..4335d7f3e 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -126,7 +126,7 @@ jobs: upstream weights: | 1 - 100 + 1 1 1 - name: Setup mamba From 87344c614e93795497522413d6611ffab64f759d Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 14:07:41 -0500 Subject: [PATCH 47/59] Try pre-release --- .github/workflows/test_and_build.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 4335d7f3e..6441aa94a 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -126,9 +126,9 @@ jobs: upstream weights: | 1 - 1 - 1 - 1 + 1000 + 1000 + 1000 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 id: setup_mamba @@ -221,24 +221,21 @@ jobs: ${{ 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 == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ - ${{ steps.sourcetype.outputs.selected == 'wheel' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} + # ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ - name: Build extension module run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then - # TODO: get this from regular PyPI # pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} - # pip install --no-deps --no-build-isolation --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 - pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" + pip install --no-deps --pre --only-binary ":all:" suitesparse-graphblas=7.4.3.2a0 + # pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then - # TODO: get this from regular PyPI # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} - pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + pip install --no-deps --pre --no-binary=all suitesparse-graphblas=7.4.3.2a0 + # pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then - # TODO: get from main, not from a specific hash - # pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas - pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas + pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas + # pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From 96e3685c53cbcdfdd03a87bf2c2cecbfe9013518 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 14:38:04 -0500 Subject: [PATCH 48/59] oops --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 6441aa94a..5d1a663f0 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -227,11 +227,11 @@ jobs: run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} - pip install --no-deps --pre --only-binary ":all:" suitesparse-graphblas=7.4.3.2a0 + pip install --no-deps --pre --only-binary ":all:" suitesparse-graphblas==7.4.3.2a0 # pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} - pip install --no-deps --pre --no-binary=all suitesparse-graphblas=7.4.3.2a0 + pip install --no-deps --pre --no-binary=all suitesparse-graphblas==7.4.3.2a0 # pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas From 19e755f6568ac454150996821ad30c7f135517fe Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 14:47:47 -0500 Subject: [PATCH 49/59] Also test suitesparse_graphblas (it's super-fast, so why not?) --- .github/workflows/test_and_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 5d1a663f0..d611d41a5 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -265,6 +265,7 @@ jobs: if [[ $H && $normal ]] ; then if [[ $macos ]] ; then echo " $vanilla" ; elif [[ $windows ]] ; then echo " $suitesparse" ; fi ; fi)$( \ if [[ $H && $bizarro ]] ; then if [[ $macos ]] ; then echo " $suitesparse" ; elif [[ $windows ]] ; then echo " $vanilla" ; fi ; fi) echo $args + pytest -v --pyargs suitesparse_graphblas coverage run -m pytest --color=yes --randomly -v $args \ ${{ matrix.slowtask == 'pytest_normal' && '--runslow' || '' }} - name: Unit tests (bizarro scalars) From 0e47fae18cc5bbfa7a4a3e9d79e06b82af11fe25 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 30 Mar 2023 21:21:40 -0500 Subject: [PATCH 50/59] Test 7.4.3.2a1 --- .github/workflows/test_and_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index d611d41a5..b77532fd4 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -127,8 +127,8 @@ jobs: weights: | 1 1000 - 1000 - 1000 + 500 + 250 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 id: setup_mamba @@ -227,11 +227,11 @@ jobs: run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then # pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} - pip install --no-deps --pre --only-binary ":all:" suitesparse-graphblas==7.4.3.2a0 + pip install --no-deps --pre --only-binary ":all:" suitesparse-graphblas==7.4.3.2a1 # pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} - pip install --no-deps --pre --no-binary=all suitesparse-graphblas==7.4.3.2a0 + pip install --no-deps --pre --no-binary=all suitesparse-graphblas==7.4.3.2a1 # pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas From 049a68faee167a508c9e0a99b74742b4d7018907 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 11:24:02 -0500 Subject: [PATCH 51/59] Test with python-suitesparse-graphblas 7.4.3.2 --- .github/workflows/test_and_build.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index b77532fd4..5c81cba23 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -203,7 +203,8 @@ jobs: elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') elif [[ ${{ steps.sourcetype.outputs.selected}} == "source" ]] ; then - psgver=$(python -c 'import random ; print(random.choice(["==7.4.0", "==7.4.1", "==7.4.2", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') + psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') + # psgver=$(python -c 'import random ; print(random.choice(["==7.4.0", "==7.4.1", "==7.4.2", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') else psgver="" fi @@ -222,20 +223,24 @@ jobs: ${{ steps.sourcetype.outputs.selected == 'upstream' && 'cython' || '' }} \ ${{ steps.sourcetype.outputs.selected != 'wheel' && '"graphblas>=7.4.0"' || '' }} \ ${{ contains(steps.pyver.outputs.selected, 'pypy') && 'pypy' || '' }} - # ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ - name: Build extension module run: | if [[ ${{ steps.sourcetype.outputs.selected }} == "wheel" ]]; then - # pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} - pip install --no-deps --pre --only-binary ":all:" suitesparse-graphblas==7.4.3.2a1 + # Add --pre if installing a pre-release + pip install --no-deps --only-binary ":all:" suitesparse-graphblas${psgver} + + # Add the below line to the conda install command above if installing from test.pypi.org + # ${{ steps.sourcetype.outputs.selected == 'wheel' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ # pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then - # pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} - pip install --no-deps --pre --no-binary=all suitesparse-graphblas==7.4.3.2a1 + # Add --pre if installing a pre-release + pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} + + # Add the below line to the conda install command above if installing from test.pypi.org + # ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ # pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas - # pip install --no-deps git+https://github.com/jim22k/python-suitesparse-graphblas.git@dd89007ca750a4d2da352ddff3c12437b86d5946#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests From 7030218896c385d236f43af4282cd2e15507f325 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 11:34:47 -0500 Subject: [PATCH 52/59] Make source weights for psg equal --- .github/workflows/test_and_build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 5c81cba23..56f98a22d 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -126,9 +126,9 @@ jobs: upstream weights: | 1 - 1000 - 500 - 250 + 1 + 1 + 1 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 id: setup_mamba @@ -203,8 +203,7 @@ jobs: elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') elif [[ ${{ steps.sourcetype.outputs.selected}} == "source" ]] ; then - psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') - # psgver=$(python -c 'import random ; print(random.choice(["==7.4.0", "==7.4.1", "==7.4.2", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') + psgver=$(python -c 'import random ; print(random.choice(["==7.4.0", "==7.4.1", "==7.4.2", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') else psgver="" fi @@ -234,7 +233,7 @@ jobs: # pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # Add --pre if installing a pre-release - pip install --no-deps --no-binary=all suitesparse-graphblas${psgver} + pip install --no-deps --no-binary ":all:" suitesparse-graphblas${psgver} # Add the below line to the conda install command above if installing from test.pypi.org # ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ From cffe6d10145153e0236f13dd870ffa0539632fa4 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 11:54:50 -0500 Subject: [PATCH 53/59] Oops. Fix pip install version of psg --- .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 56f98a22d..4ba9aca97 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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 + fail-fast: false # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -127,7 +127,7 @@ jobs: weights: | 1 1 - 1 + 1000 1 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 @@ -203,7 +203,7 @@ jobs: elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') elif [[ ${{ steps.sourcetype.outputs.selected}} == "source" ]] ; then - psgver=$(python -c 'import random ; print(random.choice(["==7.4.0", "==7.4.1", "==7.4.2", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') + psgver=$(python -c 'import random ; print(random.choice(["==7.4.0.0", "==7.4.1.0", "==7.4.2.0", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') else psgver="" fi From 439bfe4bf92a0486e524071083abc005030e9f17 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 11:55:52 -0500 Subject: [PATCH 54/59] clean up --- .github/workflows/test_and_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 4ba9aca97..f1b1b830e 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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: false + fail-fast: true # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -127,7 +127,7 @@ jobs: weights: | 1 1 - 1000 + 1 1 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 From 5add383a170dda41de23706120914c392fa97d0c Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 12:14:35 -0500 Subject: [PATCH 55/59] Testing source install of psg --- .github/workflows/test_and_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index f1b1b830e..5f42ca40b 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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 + fail-fast: false # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -127,7 +127,7 @@ jobs: weights: | 1 1 - 1 + 1000 1 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 @@ -233,11 +233,11 @@ jobs: # pip install --no-deps --only-binary ":all:" --index-url https://test.pypi.org/simple/ "suitesparse-graphblas>=7.4.3" elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then # Add --pre if installing a pre-release - pip install --no-deps --no-binary ":all:" suitesparse-graphblas${psgver} + pip install --no-deps --no-binary suitesparse-graphblas suitesparse-graphblas${psgver} # Add the below line to the conda install command above if installing from test.pypi.org # ${{ steps.sourcetype.outputs.selected == 'source' && 'setuptools setuptools-git-versioning wheel cython' || '' }} \ - # pip install --no-deps --no-build-isolation --no-binary=all --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 + # pip install --no-deps --no-build-isolation --no-binary suitesparse-graphblas --index-url https://test.pypi.org/simple/ suitesparse-graphblas==7.4.3.3 elif [[ ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas fi From 48292f8b989b4f57d24a19ac479dd72bf9403aa7 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 12:25:13 -0500 Subject: [PATCH 56/59] bump --- .pre-commit-config.yaml | 2 +- graphblas/core/operator/base.py | 2 +- scripts/check_versions.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8eb2bf10b..13caf89e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ repos: # These versions need updated manually - flake8==6.0.0 - flake8-bugbear==23.3.23 - - flake8-simplify==0.19.3 + - flake8-simplify==0.20.0 - repo: https://github.com/asottile/yesqa rev: v1.4.0 hooks: diff --git a/graphblas/core/operator/base.py b/graphblas/core/operator/base.py index ef92b41a4..38a76cbcf 100644 --- a/graphblas/core/operator/base.py +++ b/graphblas/core/operator/base.py @@ -426,7 +426,7 @@ def _initialize(cls, include_in_ops=True): return # Read in the parse configs trim_from_front = cls._parse_config.get("trim_from_front", 0) - delete_exact = cls._parse_config.get("delete_exact", None) + delete_exact = cls._parse_config.get("delete_exact") num_underscores = cls._parse_config["num_underscores"] for re_str, return_prefix in [ diff --git a/scripts/check_versions.sh b/scripts/check_versions.sh index 632db9568..54b02d1f9 100755 --- a/scripts/check_versions.sh +++ b/scripts/check_versions.sh @@ -13,5 +13,5 @@ conda search 'fast_matrix_market[channel=conda-forge]>=1.4.5' conda search 'numba[channel=conda-forge]>=0.56.4' conda search 'pyyaml[channel=conda-forge]>=6.0' conda search 'flake8-bugbear[channel=conda-forge]>=23.3.23' -conda search 'flake8-simplify[channel=conda-forge]>=0.19.3' +conda search 'flake8-simplify[channel=conda-forge]>=0.20.0' # conda search 'python[channel=conda-forge]>=3.8 *pypy*' From be8b68f9107aecd00f4d4deed7d345564f16fa4e Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 12:35:18 -0500 Subject: [PATCH 57/59] Almost there... --- .github/workflows/test_and_build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index bd77a9b29..3672de0d5 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: 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: false + fail-fast: true # The build matrix is [os]x[slowtask] and then randomly chooses [pyver] and [sourcetype]. # This should ensure we'll have full code coverage (i.e., no chance of getting unlucky), # since we need to run all slow tests on Windows and non-Windoes OSes. @@ -127,7 +127,7 @@ jobs: weights: | 1 1 - 1000 + 1 1 - name: Setup mamba uses: conda-incubator/setup-miniconda@v2 @@ -198,6 +198,7 @@ jobs: # But, it's still useful for us to test with different versions! psg="" if [[ ${{ steps.sourcetype.outputs.selected}} == "conda-forge" ]] ; then + # psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", "=7.4.3.2", ""]))') psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", ""]))') psg=python-suitesparse-graphblas${psgver} elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then From 806646c9b11f3ef2b49e60fbc3a574189a50e7ad Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 13:11:12 -0500 Subject: [PATCH 58/59] Install psg 7.4.3.2 from conda-forge --- .github/workflows/test_and_build.yml | 4 ++-- graphblas/tests/test_numpyops.py | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 3672de0d5..8a5483bba 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -198,12 +198,12 @@ jobs: # But, it's still useful for us to test with different versions! psg="" if [[ ${{ steps.sourcetype.outputs.selected}} == "conda-forge" ]] ; then - # psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", "=7.4.3.2", ""]))') - psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", ""]))') + psgver=$(python -c 'import random ; print(random.choice(["=7.4.0", "=7.4.1", "=7.4.2", "=7.4.3.0", "=7.4.3.1", "=7.4.3.2", ""]))') psg=python-suitesparse-graphblas${psgver} elif [[ ${{ steps.sourcetype.outputs.selected}} == "wheel" ]] ; then psgver=$(python -c 'import random ; print(random.choice(["==7.4.3.2", ""]))') elif [[ ${{ steps.sourcetype.outputs.selected}} == "source" ]] ; then + # These should be exact versions psgver=$(python -c 'import random ; print(random.choice(["==7.4.0.0", "==7.4.1.0", "==7.4.2.0", "==7.4.3.0", "==7.4.3.1", "==7.4.3.2", ""]))') else psgver="" diff --git a/graphblas/tests/test_numpyops.py b/graphblas/tests/test_numpyops.py index c528d4051..5b7e797f3 100644 --- a/graphblas/tests/test_numpyops.py +++ b/graphblas/tests/test_numpyops.py @@ -168,7 +168,10 @@ def test_npbinary(): compare_op = isclose else: np_result = getattr(np, binary_name)(np_left, np_right) - compare_op = npbinary.equal + if binary_name in {"arctan2"}: + compare_op = isclose + else: + compare_op = npbinary.equal except Exception: # pragma: no cover (debug) print(f"Error computing numpy result for {binary_name}") print(f"dtypes: ({gb_left.dtype}, {gb_right.dtype}) -> {gb_result.dtype}") @@ -184,11 +187,13 @@ def test_npbinary(): match(accum=gb.binary.lor) << gb_result.apply(npunary.isinf) compare = match.reduce(gb.monoid.land).new() if not compare: # pragma: no cover (debug) + print(compare_op) print(binary_name) print(compute(gb_left)) print(compute(gb_right)) print(compute(gb_result)) print(np_result) + print((np_result - compute(gb_result)).new().to_coo()[1]) assert compare From def70fabf2779e50491c8dae5d0308bc5336ce60 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Fri, 31 Mar 2023 13:45:47 -0500 Subject: [PATCH 59/59] Try coveralls upload twice (it sometimes fails) --- .github/workflows/test_and_build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 8a5483bba..04ffd3eb5 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -336,7 +336,9 @@ jobs: coverage run -a -m graphblas.core.automethods coverage run -a -m graphblas.core.infixmethods git diff --exit-code - - name: Coverage + - name: Coverage1 + id: coverageAttempt1 + continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_FLAG_NAME: ${{ matrix.os }}/${{ matrix.slowtask }} @@ -345,6 +347,19 @@ jobs: coverage xml coverage report --show-missing coveralls --service=github + # Retry upload if first attempt failed. + # This happens somewhat randomly and for irregular reasons. + # Logic is a duplicate of previous step. + - name: Coverage2 + id: coverageAttempt2 + if: steps.coverageAttempt1.outcome == 'failure' + continue-on-error: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_FLAG_NAME: ${{ matrix.os }}/${{ matrix.slowtask }} + COVERALLS_PARALLEL: true + run: | + coveralls --service=github - name: codecov uses: codecov/codecov-action@v3 - name: Notebooks Execution check