-
Notifications
You must be signed in to change notification settings - Fork 12
PHEP 3: PyHC Python & Upstream Package Support Policy #29
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
Conversation
|
For Python versions that age out of the proposed support window -- how firm is the expectation that package maintainers will drop support for the old Python release, in the case where there are no known incompatibilities? Could that take the form of documentation stating "Recommended Python version >= 3.X, but still works under Python 3.Y as of this writing", or would you want us to take more definitive action (bump python_requires to 3.X)? For example, if someone depends on a non-PyHC package that wants an older Python release, it could be a problem for them to upgrade Python to continue using PyHC packages. I've read some of the discussion around NEP 29, and I see the merit in the arguments about "who's going to take the plunge first and bump their package requirements?", and general community cohesion and predictability. Just wondering what the repercussions might be, in the event one of these messy real-world edge cases collides with what is otherwise sound policy. |
|
@jameswilburlewis that's an important question I'm wrestling with myself. I know some core packages like PlasmaPy and SunPy already go as far as bumping |
|
Just commenting and not formal review yet, since I think we're a bit more in a "discussion" phase than wordsmithing. As far as I can tell, PHEP 1 doesn't explicitly require the editor be distinct from the author, but I'd think it would generally be a good idea. I'd like to suggest expanding the scope to close #21: packages probably should be able to think about Python and other dependencies in the same context even if the principles are slightly different. I appreciate trying to keep scope reasonable but these seem interconnected to me. I really dislike the "everything not compulsory is forbidden" nature of SPEC 0. I don't think forcing our users to upgrade dependencies is a good idea. And given the difficulties with HelioCloud, we should probably err on being looser with "permitted" versions than tighter. This isn't something like Python 2 where a dedicated "kill the beast" plan was in order. So here's the sort of thing I'd like to see:
I can make edit suggestions to flow into Shawn's writing, but figured kicking the ideas around for a bit first would make sense. If any of these prove really controversial, we can just drop it out of the scope. tldr: support for a reasonable about of time. Be clear to your users. Don't leave your package uninstallable. |
SPEC 0 is the high level plan from the broader scientific python community, I don't see the need to be seperate from that push, we rely on all of their packages. Reducing the scope of what we need to support reduces the burden on all package maintainers within PyHC. We should also be telling users to create separate environments for each piece of work and that way can avoid pitfalls of updates breaking or messing with their current code or environment.
Typically for sunpy since we test with upstream on a cron job schedule, we don't need to worry about at least a smaller subset of package updates. We don't test the full suite so package updates that do break, will and do slip through, so we still have to patch and release at times for those. The main bottleneck is typically new python versions since we have a large dependency stack and we need to wait for those to explicitly support that python version but we try to push towards 3-6 months after release. Thankfully more core packages are testing sooner with python versions and their RCs so that timeframe is getting shorter.
I am hesitant to suggest max pinning of packages unless the package it self suggests it. In the numpy case due to their massive set of changes in the coming 2.0 release, it makes sense and it's pretty common in the sphinx world due how often they can break items in a release. But in my view, pinning either a max or a specific version should be discouraged unless you have really specific requirements in your package.
Ideally packages should add something like weekly or monthly cron job to test with "main" version of the core set of dependencies they use. Won't need to be all of them but it should at least cover the install dependencies. I don't think that adhoc testing is good enough for this, especially with how fast the python ecosystem moves. |
|
Thank you for the thoughtful comments, @jtniehof. And I appreciate the view from SunPy, @nabobalis! To what @jtniehof said, I definitely think it's best for PyHC's long-term success if we adopt the dependency version policy from SPEC 0. I was gonna push for it eventually, so I started questioning now whether it should be in scope for this PHEP. If people are game I'd like to include it here, but if it'll be a point of contention I'm more on the fence. I like your ideas though, especially having packages explicitly document their version policies. I plan to lead a discussion about this at Monday's telecon where hopefully I can start to get a sense of community consensus. If people seem onboard, I'd welcome and appreciate your edit suggestions. Let's see how people feel in the telecon then go from there? UPDATE: there ended up not being time to discuss this PHEP last telecon, so we'll have that discussion next telecon in two weeks instead. |
pheps/phep-0003.md
Outdated
| This new policy replaces the current standard [#11](https://github.com/heliophysicsPy/standards/blob/main/standards.md#standards) in the PyHC standards document with the following new text: | ||
|
|
||
| > **11. Python and Upstream Package Support:** All packages should support minor Python versions released within the last 36 months (3 years) and upstream core Scientific Python packages released within the last 24 months (2 years). | ||
| Additionally, packages should support new versions within 6 months of their release (see [PHEP 3](https://github.com/heliophysicsPy/standards/pull/29)). |
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.
Do we need this? This PHEP replaces standard 11, it doesn't create new text for it. 11 would just go away and people just need to comply with PHEP3 instead of Standard 11.
This is an excellent summary text for a potential summary document, though.
(Sorry I missed this earlier.)
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.
I'm gonna say yes we need this. For now, the old standards doc is still PyHC's official standards and I will replace the text of standard 11 in that doc with what's written here.
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.
Let's discuss in the morning how we want to handle this; fortunately that's before the PHEP3 vote :)
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.
@sapols I like referencing the PHEP from the standards, but do we want the link to be to the PR discussion, to the PHEPs page on the website, to the .md blob in the repo, or to the Zenodo DOI?
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.
Probably the Zenodo DOI for maximum stability. I just put the PR link there first since it's all we have currently.
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.
One of us can start the Zenodo record and reserve the DOI. Since I did that process for 1 and 2, maybe we should work together (on a Zoom maybe?) so we're more than one deep, and can make sure the instructions are clear?
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.
@jtniehof I should be more familiar with that process than I am; a Zoom would be handy. Are you saying it's possible to "start" the Zenodo record and reserve the DOI before we have an official document to upload?
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.
Yep, you can reserve a DOI. I'll loop in on scheduling a time to tag up.
|
We should also note: passed first vote at the fall meeting. |
|
Note: per this comment in issue 39, we should add to the top of the Standards Doc: "Updates to this document are managed via the PHEP process" when we merge this. |
|
Note to self: staged the updates we'll have to make once this gets accepted to this file here and started a draft Zenodo record. |
Merge pull request #49 from heliophysicsPy/phep-3-edit
|
I've been working on a side project ( The tool is mostly working but but needs some cleaning up, more tests, and better docs before doing a I'd also like this to be put under the umbrella of a GitHub organization so that I'm not the only maintainer. Perhaps this one? 🤔 @sapols This tool needn't be mentioned in PHEP 3, but would simplify the process of making SPEC 0 & PHEP 3 updates. Important Once again, behold the power of procrastination-driven development! 🎉🎂💖🎆🪩🌌🥦😹 |
|
W> I've been working on a side project (
Yeah Scientific Python also just created an action for this https://github.com/scientific-python/spec0-action/tree/v1 and so did mne-tools/mne-python#13451 Hopefully we can come to one solution in the future. |
jibarnum
left a comment
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.
I approve PHEP 3's second vote!
jtniehof
left a comment
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.
Approved! The pre commit CI requires some trailing whitespace trimmed, but that is not substantive.
|
pre-commit.ci autofix ← didn't work since I don't have write access |
FreddyCruz
left a comment
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.
Looks reasonable to me.
jvandegriff
left a comment
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.
this seems good to keep us in line with common dependency expectations
|
One abstain from the meeting |
Overview
This is the initial draft of PHEP 3, which proposes adopting a Python version & upstream package support policy for the PyHC ecosystem, inspired by SPEC 0. The goal is to standardize the support duration for Python versions and popular packages across all PyHC packages, ensuring a balance between stability and the incorporation of new features.
Specifically, this PHEP recommend that projects:
The upstream core Scientific Python packages are:
numpy, scipy, matplotlib, pandas, scikit-image, networkx, scikit-learn, xarray, ipython, zarr.This policy aims to replace the current standard #11, which mandates only Python 3 support, with a more structured timeline that supports consistent and predictable maintenance across the community.
This closes #21.
This closes #20.
Renders
Rendered current text of the PHEP
Render of PHEP before scope was expanded to include upstream packages
Inspiration
This PHEP was inspired by the Python version support policies listed in:
Open questions and comments
Resolved questions and comments
python_requiresto3.X) in favor of softer language that allows packages to support older dependencies for longer if they want.