Skip to content

Relax constraint on NumPy version#686

Merged
joamatab merged 1 commit into
gdsfactory:mainfrom
abdelq:abdelq/xrtxyspwptyx
Apr 10, 2026
Merged

Relax constraint on NumPy version#686
joamatab merged 1 commit into
gdsfactory:mainfrom
abdelq:abdelq/xrtxyspwptyx

Conversation

@abdelq
Copy link
Copy Markdown
Contributor

@abdelq abdelq commented Apr 7, 2026

Don't understand the pinning of the NumPy version. It's undesirable, especially when the Numba range is wide.

$ curl -s https://pypi.org/pypi/numba/json | jq -r '.info.requires_dist[] | select(contains("numpy"))'
numpy>=1.22
numpy<2.5,>=1.22

Summary by Sourcery

Build:

  • Update pyproject dependency specification to allow NumPy versions in the >=2.0,<3 range instead of pinning to 2.2.

@abdelq abdelq requested a review from joamatab as a code owner April 7, 2026 16:11
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 7, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Relaxes the NumPy dependency from an exact version pin to a compatible version range aligned with Numba’s supported NumPy versions, and updates the lockfile accordingly.

File-Level Changes

Change Details Files
Relax NumPy dependency from an exact pin to a version range compatible with Numba.
  • Change numpy dependency from an exact 2.2 pin to a semver range allowing NumPy >=2.0 and <3.
  • Remove the misleading comment that NumPy 2.2 is strictly required for Numba, relying instead on the declared version range.
pyproject.toml
Regenerate dependency lockfile to reflect the new NumPy constraint.
  • Update resolved NumPy version and any transitive dependencies affected by the broader NumPy version range.
  • Refresh lock metadata (hashes, markers, or resolution data) consistent with the new dependency graph.
uv.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The inline comment about NumPy being "required for numba" is now misleading; either drop it or update it to reflect the actual compatibility range you’re targeting (e.g., constrained by numba’s numpy>=1.22,<2.5 requirement).
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The inline comment about NumPy being "required for numba" is now misleading; either drop it or update it to reflect the actual compatibility range you’re targeting (e.g., constrained by numba’s `numpy>=1.22,<2.5` requirement).

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@joamatab joamatab merged commit 0d0fc60 into gdsfactory:main Apr 10, 2026
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