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

Feat: Support constraints #65

Open
notatallshaw opened this issue Oct 23, 2023 · 1 comment
Open

Feat: Support constraints #65

notatallshaw opened this issue Oct 23, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@notatallshaw
Copy link

notatallshaw commented Oct 23, 2023

Constraints are a way of specifying further restrictions on your requirements without requiring the specification be installed. e.g. you might say numpy<2 or urllib3>=2 without actually requiring them to be installed.

There are a lot of possible use cases for them but I beleive the strongest one is that allow that is not easy to replicate by juggling multiple requirements files is keep all your different "groups" of requirements in sync with each other, Apache Airflow uses this as they have many optional dependencies but a single constraints file per release that any user can use to make sure they get a tested version of each dependendy and transitive dependency: https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html#constraints-files

Because constraints directly interact with the resolution of the requirements I suspect it would fit into the low level nate of rip, but maybe you disagree.

Also, I think Pip may have some "lessons learnt" from add constraints that may want to be considered if pursuring this feature.

@wolfv
Copy link
Member

wolfv commented Oct 24, 2023

Interesting. In conda the feature is called run_constrained (and differs from run dependencies) and we do have support for this in resolvo.

In conda, run constraints are "optional" packages (if it's installed, or going to be installed, it has to adhere to the constraint).

Supporting this feature should be doable with rip!

@tdejager tdejager added the enhancement New feature or request label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants