Skip to content

Commit

Permalink
Update min required graphblas version
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknw committed Apr 10, 2022
1 parent a54b47b commit 62e8fbd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
if [[ ${{ matrix.cfg.sourcetype }} == "wheel" ]]; then
pip install suitesparse-graphblas
else
conda install -c conda-forge "graphblas>=6"
conda install -c conda-forge "graphblas>=7.0.2"
fi
if [[ ${{ matrix.cfg.sourcetype }} == "source" ]]; then
pip install --no-binary=all suitesparse-graphblas
Expand Down
1 change: 1 addition & 0 deletions grblas/_ss/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ def is_iso(self):
@property
def iso_value(self):
if self.is_iso:
# This may not be thread-safe if the parent is being modified in another thread
return next(self.itervalues())
raise ValueError("Matrix is not iso-valued")

Expand Down
1 change: 1 addition & 0 deletions grblas/_ss/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def is_iso(self):
@property
def iso_value(self):
if self.is_iso:
# This may not be thread-safe if the parent is being modified in another thread
return next(self.itervalues())
raise ValueError("Vector is not iso-valued")

Expand Down
15 changes: 3 additions & 12 deletions grblas/tests/test_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1836,18 +1836,9 @@ def test_iteration(v):

indices, values = v.to_values()
# This is what I would expect
with pytest.raises(Exception):
assert sorted(indices) == sorted(v.ss.iterkeys())
with pytest.raises(Exception):
assert sorted(values) == sorted(v.ss.itervalues())
with pytest.raises(Exception):
assert sorted(zip(indices, values)) == sorted(v.ss.iteritems())

# But apparently bitmap give us everything (?)
# See https://github.com/DrTimothyAldenDavis/GraphBLAS/issues/129
assert len(indices) < len(list(v.ss.iterkeys()))
assert len(values) < len(list(v.ss.itervalues()))
assert len(values) < len(list(v.ss.iteritems()))
assert sorted(indices) == sorted(v.ss.iterkeys())
assert sorted(values) == sorted(v.ss.itervalues())
assert sorted(zip(indices, values)) == sorted(v.ss.iteritems())


def test_broadcasting(A, v):
Expand Down
4 changes: 2 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "grblas" %}
{% set version = "2022.3.0" %}
{% set version = "2022.4.1" %}

package:
name: "{{ name|lower }}"
Expand All @@ -21,7 +21,7 @@ requirements:
run:
- python
- numba
- python-suitesparse-graphblas >=6.0,<6.3
- python-suitesparse-graphblas >=7.0.2,<7.1
- pytest-runner

about:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
url="https://github.com/metagraph-dev/grblas",
packages=find_packages(),
python_requires=">=3.8",
install_requires=["suitesparse-graphblas >=6.0, <6.3", "numba", "donfig", "pyyaml"],
install_requires=["suitesparse-graphblas >=7.0.2, <7.1", "numba", "donfig", "pyyaml"],
tests_require=["pytest", "pandas"],
extras_require=extras_require,
include_package_data=True,
Expand Down

0 comments on commit 62e8fbd

Please sign in to comment.