From 90ae68a2a6a6bf6d923642d4dbee8a6a541deba9 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 11 Feb 2023 23:25:07 -0600 Subject: [PATCH 1/2] Test upstream PR that adds support for complex dtypes on Windows --- .github/workflows/test_and_build.yml | 6 +++--- graphblas/dtypes.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index d3f193c51..69eaa3c41 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. @@ -118,10 +118,10 @@ jobs: source upstream weights: | - 2 1 1 1 + 1000000 - name: Setup conda uses: conda-incubator/setup-miniconda@v2 with: @@ -204,7 +204,7 @@ jobs: elif [[ ${{ steps.sourcetype.outputs.selected }} == "source" ]]; then pip install --no-deps --no-binary=all 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 + pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@b65050921ea71606436f37279c225edaf95fc677#egg=suitesparse-graphblas fi pip install --no-deps -e . - name: Unit tests diff --git a/graphblas/dtypes.py b/graphblas/dtypes.py index e864a412f..b11d1782b 100644 --- a/graphblas/dtypes.py +++ b/graphblas/dtypes.py @@ -12,6 +12,8 @@ # Default assumption unless FC32/FC64 are found in lib _supports_complex = hasattr(_lib, "GrB_FC64") or hasattr(_lib, "GxB_FC64") +if not _supports_complex: + raise RuntimeError("Every OS should support complex dtypes now") class DataType: From 03146574e81bb987f943eb73e7d01622f085a086 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 11 Feb 2023 23:33:21 -0600 Subject: [PATCH 2/2] Force "suitesparse" backend in CI --- graphblas/tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/graphblas/tests/conftest.py b/graphblas/tests/conftest.py index cd66efa6f..f79669fd7 100644 --- a/graphblas/tests/conftest.py +++ b/graphblas/tests/conftest.py @@ -19,6 +19,7 @@ def pytest_configure(config): backend = "suitesparse" if np.random.rand() < 0.5 else "suitesparse-vanilla" else: backend = "suitesparse" + backend = "suitesparse" # XXX quick hack to force it blocking = config.getoption("--blocking", True) if blocking is None: # pragma: no branch blocking = np.random.rand() < 0.5 if randomly else True