Skip to content

Update numpy to 2.4.0#438

Merged
jan-janssen merged 1 commit intomainfrom
numpy
Mar 27, 2026
Merged

Update numpy to 2.4.0#438
jan-janssen merged 1 commit intomainfrom
numpy

Conversation

@jan-janssen
Copy link
Copy Markdown
Member

@jan-janssen jan-janssen commented Dec 24, 2025

Summary by CodeRabbit

  • Chores
    • Updated numpy to 2.4.0 across build, development, and project configuration to standardize environments.
    • Added sparse (0.17.0) to the full environment specification.
    • No functional, public API, or behavioral changes introduced.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 24, 2025

Warning

Rate limit exceeded

@jan-janssen has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 4 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 4 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6b936f3c-338c-443a-a5ba-e12af9789f1a

📥 Commits

Reviewing files that changed from the base of the PR and between 854e18b and c40b0b3.

📒 Files selected for processing (3)
  • .ci_support/environment.yml
  • .ci_support/environment_mini.yml
  • pyproject.toml
📝 Walkthrough

Walkthrough

NumPy version updated from 2.3.5 → 2.4.0 in three dependency files; sparse (0.17.0) was added to .ci_support/environment.yml. No code, control-flow, or exported/public-API changes.

Changes

Cohort / File(s) Summary
Dependency spec files
.ci_support/environment.yml, .ci_support/environment_mini.yml, pyproject.toml
NumPy bumped from 2.3.52.4.0 across all three files. In addition, sparse==0.17.0 was added to .ci_support/environment.yml. No other edits to code or public APIs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I nibbled at versions, a tiny delight,
NumPy hopped up to shine a bit bright,
A sparse friend joined the YAML parade,
Three files updated, a tidy crusade,
Hooray for small hops that keep builds light!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update numpy to 2.4.0' directly and clearly describes the main change—a numpy version upgrade from 2.3.5 to 2.4.0 across multiple configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch numpy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jan-janssen
Copy link
Copy Markdown
Member Author

======================================================================
ERROR: test_soap_descriptor_per_atom (test_dscribe.Testdscribe.test_soap_descriptor_per_atom)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/structuretoolkit/structuretoolkit/tests/test_dscribe.py", line 26, in test_soap_descriptor_per_atom
    soap = stk.analyse.soap_descriptor_per_atom(
        structure=structure, r_cut=6.0, n_max=8, l_max=6
    )
  File "/home/runner/work/structuretoolkit/structuretoolkit/structuretoolkit/analyse/dscribe.py", line 49, in soap_descriptor_per_atom
    from dscribe.descriptors import SOAP
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/dscribe/descriptors/__init__.py", line 17, in <module>
    from dscribe.descriptors.acsf import ACSF
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/dscribe/descriptors/acsf.py", line 20, in <module>
    from dscribe.descriptors.descriptorlocal import DescriptorLocal
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/dscribe/descriptors/descriptorlocal.py", line 17, in <module>
    from dscribe.descriptors.descriptor import Descriptor
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/dscribe/descriptors/descriptor.py", line 21, in <module>
    import sparse as sp
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/sparse/__init__.py", line 1, in <module>
    from .coo import COO, elemwise, tensordot, concatenate, stack, dot, triu, tril, where, \
        nansum, nanprod, nanmin, nanmax
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/sparse/coo.py", line 4, in <module>
    from collections import Iterable, defaultdict, deque
ImportError: cannot import name 'Iterable' from 'collections' (/home/runner/miniconda3/envs/test/lib/python3.13/collections/__init__.py)

----------------------------------------------------------------------

@jan-janssen
Copy link
Copy Markdown
Member Author

└─ numba >=0.49 * with the potential options
            ├─ numba [0.56.2|0.56.3|0.56.4] would require
            │  └─ numpy >=1.18,(!=1.22.0,(!=1.22.1,(!=1.22.2,<1.24))) *, which conflicts with any installable versions previously reported;
            ├─ numba [0.57.0|0.57.1] would require
            │  └─ numpy >=1.21,(!=1.22.0,(!=1.22.1,(!=1.22.2,<1.25))) *, which conflicts with any installable versions previously reported;
            ├─ numba [0.58.1|0.59.0|0.59.1] would require
            │  └─ numpy >=1.22.3,<1.27 *, which conflicts with any installable versions previously reported;
            ├─ numba 0.60.0 would require
            │  └─ numpy >=1.22.3,<2.1 *, which conflicts with any installable versions previously reported;
            ├─ numba 0.61.0 would require
            │  └─ numpy >=1.24,<2.2 *, which conflicts with any installable versions previously reported;
            ├─ numba 0.61.2 would require
            │  └─ numpy [>=1.24,<2.3 *|>=1.24,<2.3.0a0 *], which conflicts with any installable versions previously reported;
            ├─ numba [0.62.0|0.62.1] would require
            │  └─ numpy >=1.24,<2.4 * with the potential options
            │     ├─ numpy [1.24.0|1.24.1|...|2.0.2] conflicts with any installable versions previously reported;
            │     ├─ numpy [2.1.0|2.1.1|2.1.2|2.1.3] conflicts with any installable versions previously reported;
            │     ├─ numpy [2.2.0|2.2.1|...|2.2.6] conflicts with any installable versions previously reported;
            │     ├─ numpy [2.3.0|2.3.1|...|2.3.5] conflicts with any installable versions previously reported;
            │     └─ numpy [2.3.2|2.3.3|2.3.4|2.3.5|2.4.0], which can be installed (as previously explained);
            ├─ numba [0.63.0|0.63.1] would require
            │  └─ numpy >=1.22.3,<2.4 * with the potential options
            │     ├─ numpy [1.22.3|1.22.4|...|1.23.5] conflicts with any installable versions previously reported;
            │     ├─ numpy [1.24.0|1.24.1|...|2.0.2] conflicts with any installable versions previously reported;
            │     ├─ numpy [2.1.0|2.1.1|2.1.2|2.1.3] conflicts with any installable versions previously reported;
            │     ├─ numpy [2.2.0|2.2.1|...|2.2.6] conflicts with any installable versions previously reported;
            │     ├─ numpy [2.3.0|2.3.1|...|2.3.5] conflicts with any installable versions previously reported;
            │     └─ numpy [2.3.2|2.3.3|2.3.4|2.3.5|2.4.0], which can be installed (as previously explained);
            ├─ numba [0.63.0|0.63.1] would require
            │  └─ python_abi =3.14 *_cp314, which can be installed (as previously explained);
            ├─ numba [0.49.0|0.49.1] would require
            │  └─ numpy >=1.14.6,<1.18.0 *, which conflicts with any installable versions previously reported;
            ├─ numba 0.50.1 would require
            │  └─ numpy >=1.14.6,<1.21.0a0 *, which conflicts with any installable versions previously reported;
            ├─ numba [0.51.0|0.51.1|0.51.2|0.52.0] would require
            │  └─ numpy >=1.16.5,<1.21.0a0 *, which conflicts with any installable versions previously reported;
            ├─ numba 0.53.0 would require
            │  └─ numpy >=1.16.6,<1.21.0a0 *, which conflicts with any installable versions previously reported;
            ├─ numba [0.53.0|0.53.1] would require
            │  └─ numpy >=1.19.5,<1.21.0a0 *, which conflicts with any installable versions previously reported;
            ├─ numba 0.53.1 would require
            │  └─ numpy >=1.17.5,<1.21.0a0 *, which conflicts with any in

@jan-janssen jan-janssen marked this pull request as draft January 3, 2026 16:05
@jan-janssen
Copy link
Copy Markdown
Member Author

======================================================================
ERROR: test_sqs_structures_no_stats (test_sqs.SQSTestCase.test_sqs_structures_no_stats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/structuretoolkit/structuretoolkit/tests/test_sqs.py", line 21, in test_sqs_structures_no_stats
    structures_lst = stk.build.sqs_structures(
        structure=bulk("Au", cubic=True).repeat([2, 2, 2]),
    ...<15 lines>...
        return_statistics=False,
    )
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/structuretoolkit/build/sqs.py", line 205, in sqs_structures
    from sqsgenerator import sqs_optimize
ImportError: cannot import name 'sqs_optimize' from 'sqsgenerator' (/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/sqsgenerator/__init__.py)
======================================================================
ERROR: test_sqs_structures_with_stats (test_sqs.SQSTestCase.test_sqs_structures_with_stats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/structuretoolkit/structuretoolkit/tests/test_sqs.py", line 49, in test_sqs_structures_with_stats
    stk.build.sqs_structures(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        structure=bulk("Au", cubic=True).repeat([2, 2, 2]),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<15 lines>...
        return_statistics=True,
        ^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/structuretoolkit/build/sqs.py", line 205, in sqs_structures
    from sqsgenerator import sqs_optimize
ImportError: cannot import name 'sqs_optimize' from 'sqsgenerator' (/home/runner/miniconda3/envs/test/lib/python3.13/site-packages/sqsgenerator/__init__.py)
----------------------------------------------------------------------

@jan-janssen jan-janssen marked this pull request as ready for review March 27, 2026 09:28
Copilot AI review requested due to automatic review settings March 27, 2026 09:28
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.69%. Comparing base (684c115) to head (c40b0b3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #438   +/-   ##
=======================================
  Coverage   82.69%   82.69%           
=======================================
  Files          25       25           
  Lines        1832     1832           
=======================================
  Hits         1515     1515           
  Misses        317      317           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s NumPy pin across Python packaging metadata and conda environment specs to standardize the version used in builds/dev/CI.

Changes:

  • Bumped numpy in pyproject.toml to 2.4.3.
  • Bumped numpy in conda environment specs (.ci_support/environment*.yml) to 2.4.3.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Updates the runtime dependency pin for NumPy.
.ci_support/environment_mini.yml Updates the minimal conda environment NumPy pin.
.ci_support/environment.yml Updates the full conda environment NumPy pin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
dependencies = [
"ase==3.28.0",
"numpy==2.3.5",
"numpy==2.4.3",
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title/description says updating NumPy to 2.4.0 (and mentions adding sparse), but the actual pin here is 2.4.3 and there’s no sparse change in this PR. Please align the PR title/description with the actual changes (or adjust the pin if 2.4.0 is the intended target).

Copilot uses AI. Check for mistakes.
@jan-janssen jan-janssen merged commit 2c3f5ea into main Mar 27, 2026
24 checks passed
@jan-janssen jan-janssen deleted the numpy branch March 27, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants