Skip to content

Handle numpy 1.21 and pandas 2.1 incompatibility (& more maint) #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ jobs:
#
# First let's randomly get versions of dependencies to install.
# Consider removing old versions when they become problematic or very old (>=2 years).
nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", "=3.1", ""]))')
nxver=$(python -c 'import random ; print(random.choice(["=2.7", "=2.8", "=3.0", "=3.1", "=3.2", ""]))')
yamlver=$(python -c 'import random ; print(random.choice(["=5.4", "=6.0", ""]))')
sparsever=$(python -c 'import random ; print(random.choice(["=0.13", "=0.14", ""]))')
fmmver=$(python -c 'import random ; print(random.choice(["=1.4", "=1.5", "=1.6", "=1.7", ""]))')
# Randomly choosing versions of dependencies based on Python version works surprisingly well...
if [[ ${{ startsWith(steps.pyver.outputs.selected, '3.9') }} == true ]]; then
npver=$(python -c 'import random ; print(random.choice(["=1.21", "=1.22", "=1.23", "=1.24", "=1.25", "=1.26", ""]))')
spver=$(python -c 'import random ; print(random.choice(["=1.8", "=1.9", "=1.10", "=1.11", ""]))')
Expand All @@ -191,6 +192,10 @@ jobs:
pdver=$(python -c 'import random ; print(random.choice(["=2.1", ""]))')
akver=$(python -c 'import random ; print(random.choice(["=2.4", ""]))')
fi
# But there may be edge cases of incompatibility we need to handle (more handled below)
if [[ ${pdver} == "=2.1" && ${npver} == "=1.21" ]]; then
pdver="=2.0"
fi
if [[ ${{ steps.sourcetype.outputs.selected }} == "source" || ${{ steps.sourcetype.outputs.selected }} == "upstream" ]]; then
# TODO: there are currently issues with some numpy versions when
# installing python-suitesparse-grphblas from source or upstream.
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ repos:
- id: auto-walrus
args: [--line-length, "100"]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.10.0
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.1
hooks:
- id: ruff
args: [--fix-only, --show-fixes]
Expand Down Expand Up @@ -94,11 +94,11 @@ repos:
additional_dependencies: [tomli]
files: ^(graphblas|docs)/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.1
hooks:
- id: ruff
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.8.0
rev: v0.8.1
hooks:
- id: sphinx-lint
args: [--enable, all, "--disable=line-too-long,leaked-markup"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pandas = [
"pandas >=1.2",
]
scipy = [
"scipy >=1.8",
"scipy >=1.9",
]
suitesparse-udf = [ # udf requires numba
"python-graphblas[suitesparse,numba]",
Expand Down
4 changes: 2 additions & 2 deletions scripts/check_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ conda search 'flake8-simplify[channel=conda-forge]>=0.21.0'
conda search 'numpy[channel=conda-forge]>=1.26.0'
conda search 'pandas[channel=conda-forge]>=2.1.1'
conda search 'scipy[channel=conda-forge]>=1.11.3'
conda search 'networkx[channel=conda-forge]>=3.1'
conda search 'networkx[channel=conda-forge]>=3.2'
conda search 'awkward[channel=conda-forge]>=2.4.6'
conda search 'sparse[channel=conda-forge]>=0.14.0'
conda search 'fast_matrix_market[channel=conda-forge]>=1.7.3'
conda search 'fast_matrix_market[channel=conda-forge]>=1.7.4'
conda search 'numba[channel=conda-forge]>=0.57.1'
conda search 'pyyaml[channel=conda-forge]>=6.0.1'
# conda search 'python[channel=conda-forge]>=3.9 *pypy*'