-
Notifications
You must be signed in to change notification settings - Fork 10
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
build: update install constraints on numpy and qt packages #1157
Conversation
🧙 Sourcery has finished reviewing your pull request! Tips
|
WalkthroughThe recent changes primarily focused on updating dependencies and configurations to align with newer Python versions, primarily moving from Python 3.9 to 3.11 and 3.12. Key modifications were made in Azure Pipelines and GitHub Actions workflows, and conditional dependencies were refined in Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- .azure-pipelines/pyinstaller.yaml (1 hunks)
- .github/workflows/test_prereleases.yml (1 hunks)
- pyproject.toml (2 hunks)
Additional comments not posted (6)
.azure-pipelines/pyinstaller.yaml (2)
8-8
: Update Python version to 3.11.The Python version update to 3.11 is appropriate. Ensure that all dependencies and code are compatible with Python 3.11.
16-16
: Update constraints file to match Python version.The constraints file has been updated to
constraints_py3.11.txt
to match the new Python version. Ensure that this constraints file exists and is correctly configured..github/workflows/test_prereleases.yml (1)
44-45
: Update platform and Python version in matrix configuration.The platform is updated to
macos-14
and the Python version to 3.12. Ensure that all dependencies and code are compatible with these updates.pyproject.toml (3)
57-58
: Introduce conditional dependencies fornumpy
.The conditional dependencies for
numpy
based on Python versions are correctly specified. Ensure that these conditions align with the project's requirements and compatibility.
123-127
: Update dependencies fornapari
with specific extras.The dependencies for
napari
with specific extras likepyqt5
andpyqt6
are correctly specified. Ensure that these updates are consistent with the project's requirements and compatibility.
131-142
: Update dependencies fornapari
with specific extras.The dependencies for
napari
with specific extras likepyside2
andpyside6_experimental
are correctly specified. Ensure that these updates are consistent with the project's requirements and compatibility.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1157 +/- ##
========================================
Coverage 93.05% 93.05%
========================================
Files 208 208
Lines 32763 32763
========================================
Hits 30486 30486
Misses 2277 2277 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- package/tests/conftest.py (1 hunks)
Additional comments not posted (1)
package/tests/conftest.py (1)
45-45
: LGTM! But verify the fixture usage in the test suite.The code changes are approved.
However, ensure that all test cases using the
image
fixture are compatible with the new data type.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- build_utils/pyproject_toml_to_yaml.py (1 hunks)
Additional comments not posted (2)
build_utils/pyproject_toml_to_yaml.py (2)
19-23
: LGTM!The
remove_specifier
function is well-implemented and handles the case where a semicolon is present.
28-28
: LGTM!The modification to the
dependencies
variable assignment correctly integrates the new functions to filter and process the dependencies.
def drop_line(line): | ||
if "python_version < '3.10'" in line: | ||
return False | ||
|
||
if "python_version < '3.11'" in line: # noqa: SIM103 | ||
return False | ||
|
||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimize the conditional statements in drop_line
.
You can combine the conditions into a single statement for better readability and performance.
- def drop_line(line):
- if "python_version < '3.10'" in line:
- return False
- if "python_version < '3.11'" in line: # noqa: SIM103
- return False
- return True
+ def drop_line(line):
+ if "python_version < '3.10'" in line or "python_version < '3.11'" in line: # noqa: SIM103
+ return False
+ return True
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def drop_line(line): | |
if "python_version < '3.10'" in line: | |
return False | |
if "python_version < '3.11'" in line: # noqa: SIM103 | |
return False | |
return True | |
def drop_line(line): | |
if "python_version < '3.10'" in line or "python_version < '3.11'" in line: # noqa: SIM103 | |
return False | |
return True |
Bump python version in some CI jobs
Summary by CodeRabbit
New Features
Dependencies
pyproject.toml
to conditionally includenumpy
,napari
, andPartSeg
based on Python versions.Tests
np.uint8
tonp.uint16
for enhanced precision.Refactor