Skip to content
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

relaxing version pinning in requirements.txt? #1082

Open
ickc opened this issue Dec 13, 2024 · 2 comments
Open

relaxing version pinning in requirements.txt? #1082

ickc opened this issue Dec 13, 2024 · 2 comments

Comments

@ickc
Copy link

ickc commented Dec 13, 2024

Would you consider relaxing the version pinning in this file:

https://github.com/rhayes777/PyAutoFit/blob/66c7fd2962dc11ce513f652fe9df82eece960ac3/requirements.txt

If pinning is really needed for reproducibility, may be it can be moved to a separate lock file?

Pinning like this can causes issues when solving for an environment with other dependencies resulting in no solution.

@Jammy2211
Copy link
Collaborator

In the past, we did not use pinning, but found it created a different problem which was a new version of Numpy, Scipy, or some other library would be released and via some form of incompatibility mean installation did not work for users.

Pinning was chosen to ensure that a user's pip install is always reliable.

Note that we have a build server which currently runs manually, but the intention is to automatically run. Nevertheless, when it does run, it verifies against all Python versions that the pinning ensures a clean install for a fresh virtual enviroment:

https://github.com/Jammy2211/PyAutoBuild/actions

Pinning like this can causes issues when solving for an environment with other dependencies resulting in no solution.

We are working under the assumption that installation is using a fresh conda of Python virtualenv, I think installing into any enviroment with existing dependencies is going to cause issues irrespective of how requirements.txt is setup.

@ickc
Copy link
Author

ickc commented Dec 13, 2024

Right. But version pinning is more about reproducing an environment that is known to work correctly. So the problem is that end users shouldn't be relying on pip install $PACKAGE to get a reproducible environment.

Version constraining if setup properly per dependencies should work, and if it doesn't, then it is a problem of some of the downstream dependencies that doesn't set it up properly. In that case, ideally, it can be fixed downstream and also have the problematic version(s) excluded.

Version pinning, which can be used to reproduce a known working environment, can be put in a lock file. Other tools has functionality doing this, but a requirements_pinned.txt could do the job, where end users can be directed to use that instead in the doc. Or perhaps we can put the pinning as a feature and do something like pip install autolens[pinned].

The problem of having version pinning directly in requirements.txt where setup.py read and set as requirement, is that it becomes hardcoded and impossible to override, except may be with --no-deps or manually changing that file.

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

No branches or pull requests

2 participants