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

Best practice for pinning min version in anaconda-project.yml #275

Closed
sandhujasmine opened this issue Jun 5, 2023 · 4 comments
Closed

Comments

@sandhujasmine
Copy link
Collaborator

Benefit
Adding a lower bound on package versions in the anaconda-project.yml makes it easy to see min requirement at the time of lock file generation without actually looking at the lock file. This is convenient and nice for sure.

Cost
We already have a lock file with this info even if it's not convenient for a human to read/parse.

Is this nice to have for all packages in anaconda-project.yml? If so, should we consider writing a script to automatically get the min versions for packages that are unpinned from reading the lock file? I did this in a quick way and while the min versions look correct, I'm not sure the solver will resolve to the same lock file.

Curious to know if:

  • this has already been suggested and tried? Or discounted for technical or other reasons.
  • Is it worthwhile to pursue?

Thanks!

@jbednar
Copy link
Contributor

jbednar commented Jun 5, 2023

It's great to have this info when a notebook is first contributed to this repo. And if we had a feature in conda to "install like it's April 2021" or similar (which I think I requested years ago), it would be great to have this info recorded retroactively for the existing notebooks. It's a bit confusing when it's a notebook from 2016 with a solve done in 2023, since those are not the minimum versions this notebook should work with. So I'm not sure whether it's helpful or confusing to add this info for existing older notebooks.

@maximlt
Copy link
Contributor

maximlt commented Jun 5, 2023

Having the information on the minimum set of pins would be useful in many ways I'm sure but:

  1. Reporting back the pins in the anaconda-project.yml file is cumbersome, to say the least
  2. I'm not sure we can enforce it, i.e. force all the projects to have a minimum pin to all their direct dependencies, and if we don't enforce it I don't think it's going to happen (mostly because of 1.)
  3. I wouldn't invest too much time in scripting that as I hope that some time hopefully not too far ahead we'll migrate from anaconda-project to conda-project

@sandhujasmine
Copy link
Collaborator Author

sandhujasmine commented Jun 5, 2023

Yep - makes sense and agree that it is cumbersome to do this.
Take-away: No need to pin in anaconda-project.yml when the lock file is being updated; unless there is a strict requirement like on jupyter_client because 8.0 currently has issues, see holoviz/holoviews#5699

@sandhujasmine
Copy link
Collaborator Author

Sorry - accidentally closed it. But I think this is resolved as above and can be closed.

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

3 participants