Skip to content

Commit 43c1731

Browse files
authored
Support Python 3.12 and update pre-commit versions (#79)
1 parent 86cca31 commit 43c1731

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

Diff for: .github/workflows/publish_pypi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.8"
23+
python-version: "3.9"
2424
- name: Install build dependencies
2525
run: |
2626
python -m pip install --upgrade pip

Diff for: .github/workflows/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
auto-activate-base: false
4949
- name: Install dependencies
5050
run: |
51-
$(command -v mamba || command -v conda) install python-graphblas scipy pandas pytest-cov pytest-randomly pytest-mpl
51+
$(command -v mamba || command -v conda) install python-suitesparse-graphblas scipy pandas donfig pyyaml numpy python-graphblas \
52+
pytest-cov pytest-randomly pytest-mpl
5253
# matplotlib lxml pygraphviz pydot sympy # Extra networkx deps we don't need yet
5354
pip install git+https://github.com/networkx/networkx.git@main --no-deps
5455
pip install -e . --no-deps

Diff for: .pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
- id: name-tests-test
3434
args: ["--pytest-test-first"]
3535
- repo: https://github.com/abravalheri/validate-pyproject
36-
rev: v0.14
36+
rev: v0.15
3737
hooks:
3838
- id: validate-pyproject
3939
name: Validate pyproject.toml
@@ -58,12 +58,12 @@ repos:
5858
- id: auto-walrus
5959
args: [--line-length, "100"]
6060
- repo: https://github.com/psf/black
61-
rev: 23.9.1
61+
rev: 23.10.0
6262
hooks:
6363
- id: black
6464
# - id: black-jupyter
6565
- repo: https://github.com/astral-sh/ruff-pre-commit
66-
rev: v0.0.292
66+
rev: v0.1.0
6767
hooks:
6868
- id: ruff
6969
args: [--fix-only, --show-fixes]
@@ -89,7 +89,7 @@ repos:
8989
additional_dependencies: [tomli]
9090
files: ^(graphblas_algorithms|docs)/
9191
- repo: https://github.com/astral-sh/ruff-pre-commit
92-
rev: v0.0.292
92+
rev: v0.1.0
9393
hooks:
9494
- id: ruff
9595
# `pyroma` may help keep our package standards up to date if best practices change.

Diff for: graphblas_algorithms/algorithms/shortest_paths/weighted.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _bellman_ford_path_length(G, source, target=None, *, cutoff=None, name):
2727
is_negative, iso_value = G.get_properties("has_negative_edges+ iso_value")
2828
if not is_negative:
2929
if cutoff is not None:
30-
cutoff = int(cutoff // iso_value)
30+
cutoff = int(cutoff // iso_value.get())
3131
d = _bfs_level(G, source, target, cutoff=cutoff, dtype=iso_value.dtype)
3232
if dst_id is not None:
3333
d = d.get(dst_id)

Diff for: pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ classifiers = [
4646
"Programming Language :: Python :: 3.9",
4747
"Programming Language :: Python :: 3.10",
4848
"Programming Language :: Python :: 3.11",
49+
"Programming Language :: Python :: 3.12",
4950
"Programming Language :: Python :: 3 :: Only",
5051
"Intended Audience :: Developers",
5152
"Intended Audience :: Other Audience",
@@ -80,7 +81,7 @@ changelog = "https://github.com/python-graphblas/graphblas-algorithms/releases"
8081
test = [
8182
"pytest",
8283
"networkx >=3.0",
83-
"scipy >=1.8",
84+
"scipy >=1.9",
8485
"setuptools",
8586
"tomli",
8687
]
@@ -133,7 +134,7 @@ dirty_template = "{tag}+{ccount}.g{sha}.dirty"
133134

134135
[tool.black]
135136
line-length = 100
136-
target-version = ["py39", "py310", "py311"]
137+
target-version = ["py39", "py310", "py311", "py312"]
137138

138139
[tool.isort]
139140
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]

0 commit comments

Comments
 (0)