fix: use minimum version bounds for dependencies instead of exact pins#72
Open
formeo wants to merge 2 commits intodjsilva99:developfrom
Open
fix: use minimum version bounds for dependencies instead of exact pins#72formeo wants to merge 2 commits intodjsilva99:developfrom
formeo wants to merge 2 commits intodjsilva99:developfrom
Conversation
Exact version pins in install_requires break user environments by forcing downgrades or conflicts. Changed to minimum bounds: - numpy>=1.22 (Python 3.10+ support) - matplotlib>=3.5 (numpy 1.22+ compat) Also added python_requires>=3.10 since the code uses union type syntax (int | float). Closes djsilva99#69
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #72 +/- ##
========================================
Coverage 70.66% 70.66%
========================================
Files 21 21
Lines 2335 2335
========================================
Hits 1650 1650
Misses 685 685 🚀 New features to boost your workflow:
|
Owner
|
Nice work on this PR — just one additional suggestion:
This PR will be merged after making conda work properly for the current heatrapy release, which I am addressing now. Thanks again for the solid contribution! |
Author
|
Good point! I've added upper bounds. I went with numpy>=1.22,<3 rather than <2.0 since heatrapy already works with numpy 2.x (the previous Same logic for matplotlib — >=3.5,<4 allows the current 3.10.x while |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #69
Problem
install_requirespins exact versions (numpy==2.4.2,matplotlib==3.10.8).For a library this breaks user environments by forcing downgrades or conflicts
with other packages. The user in #69 had their conda environment broken by this.
Fix
Changed
==to>=with reasonable lower bounds:numpy>=1.22(first version to support Python 3.10, which is requiredby the
int | floattype hints used throughout the codebase)matplotlib>=3.5(first version compatible with numpy 1.22+)Also added
python_requires='>=3.10'since the code uses union type syntax(
int | float) which was introduced in Python 3.10.The
requirements.txtis left unchanged — exact pins there are fine fordevelopment/CI reproducibility.
Note
While looking at this I noticed
packages=['heatrapy']doesn't includesubpackages (
dimension_1,dimension_2,mats, etc.). This meanspip install heatrapyfrom a wheel/sdist might be missing them. Usingfind_packages()would fix this. Happy to open a separate issue/PR for that.