-
Notifications
You must be signed in to change notification settings - Fork 43
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
Specify versions in requirements.txt #2177
Comments
While acknowledging that version pinning can make some aspects of the build more reproducible and the release process simpler, I also urge some caution here. We've seen in SasView that not keeping pace with code deprecations is building up technical debt, and that technical debt can become difficult to pay down at some future date. I've seen other projects pin themselves into irrelevance.
Pinning versions can work, but only if there is good discipline in ensuring that the version pins are always reasonable and not accidentally stuck on unrealistic old versions. That means an amount of janitorial work in reviewing the pins and either updating them to match current releases, or filing (then fixing!) bugs if there are compatibility problems. The Dependabot service can help with this, but it is only as good as the test suite. Obviously, the best outcome is to write code that is compatible with broad ranges of versions for each dependency. Many packages like pytest, matplotlib, numpy, scipy, sphinx have quite long and well publicised deprecation schedules meaning that it's possible to write code that works across several years' worth of versions. This is quite important for downstream packagers of SasView — when the SasView package hits Debian (and Ubuntu and other derivatives), it will be using whatever the currently packaged versions of the libraries are, regardless of the pins. |
Yeah, that's why this issue has the |
I wonder if the real issue is the relatively large number of dependencies and the lack of resources for keeping up with all the breaking changes and/or testing thoroughly enough? Not sure there is a fix for that so maybe not a helpful question? |
In fairness, the tests did catch the problem, it's just that it didn't stop it breaking things. Having lots of dependencies isn't a bad thing, as long as they're well chosen. In fact its generally better to use an external package that someone else is maintaining and putting effort into, that try to reinvent the wheel. |
Hybrid solution: peg specific versions for release, but run PR tests on both version=peg (all platforms) and version (one platform). That way we get some warning about future breaking changes. For libraries such as sasmodels and sasdata testing against version=min is also necessary. This strategy works best with good test coverage. At the start of the release cycle peg all packages to the latest version. That way the manual GUI testing will be using relatively up-to-date packages that won't change between test and release. Supporting multiple versions can require additional code, but with a little care we can program to the latest interfaces while still supporting the pegged version. Usually this can be done with a shim at the top of the file implementing the new interface when it detects the old version, marking it as
|
Implementation detail: The For example, some of the conditional installs expressed in ...
PyQt5; sys_platform != "darwin"
PyQt5=1.13; sys_platform == "darwin"
# pyopencl on windows requires "chaco install opencl-intel-cpu-runtime" before(?) pip install
pyopencl; platform_system != "Windows"
pyopencl --only-binary=pyopencl --find-links http://www.silx.org/pub/wheelhouse/ --trusted-host www.silx.org pyopencl; platform_system == "Windows"
... |
What is the plan for transitive dependencies? There's over 100 of them and they are just as likely to change and break things but they're not specified in The complete output of One can imagine
|
Think this has been implicitly decided |
Specify versions in requirements.txt so that new releases of dependencies don't break SasView.
This was mentioned by @pkienzle before as it is an issue with build reproducibility (#1986), but the consequence of not doing this are more severe than this - recently numpy was updated and the main branch stopped working.
We really need to sort this soon.
The text was updated successfully, but these errors were encountered: