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

set locked in config.toml or pyproject.toml #2628

Open
adrinjalali opened this issue Dec 3, 2024 · 6 comments
Open

set locked in config.toml or pyproject.toml #2628

adrinjalali opened this issue Dec 3, 2024 · 6 comments

Comments

@adrinjalali
Copy link

I'd like to be able to set locked=true on the repo so that the lock file only gets updated when intended. Right now one can only pass that as an argument to the commands like pixi run -e ci-sklearn15 --locked tests (context: skops-dev/skops#451).

Also, right now when passing --locked and the env config is changed, it says

$ pixi run -e ci-sklearn15 --locked tests
  × lock-file not up-to-date with the project

It'd be nice to either have an option which only updates the lock file when the environment info is changed, or to ask the user for confirmation.

@ruben-arts
Copy link
Contributor

Hey @adrinjalali,

I assume what you're looking for is --frozen that will not try to update the lockfile and will continue as previously installed.

@adrinjalali
Copy link
Author

Yes, but it still cannot be set in a configuration file, which I'd need if I'm to share a project with new collaborators.

@ruben-arts
Copy link
Contributor

Right, we're thinking more and more about how to make pixi a more flexible for this use-case. You think configuring something in the in manifest to skip solving would be the fix for your issues? Should it also stop locking on pixi add and pixi install or should it still lock on those in your opinion?

@adrinjalali
Copy link
Author

I'd like to have a setting which would only touch my lock file if I explicitly tell it to, otherwise I'd like it to be such that no command has a side effect of changing the lock file. I can then have a bot or manually update the lock file at desired intervals.

@adrinjalali
Copy link
Author

As an example of why this is needed: sklearn-compat/sklearn-compat#15

That PR should have been very few lines of diff, and the pixi version in the GH action shouldn't have needed updating. But since I use a newer pixi, the lock file was massively updated, and I had to update the version in the GH action at the same time. That makes very irrelevant changes to that PR.

@ruben-arts
Copy link
Contributor

I found some more issues with the workflow you are using, we're looking into how we can make pixi more workable with this use case. There is a conversation about the lockfile going on internally, we've not found a good solution yet, but we'll share some ideas soon.

One of the biggest problems with your workflow and pixi is that fact that we depend on the pyproject.toml to validate the lockfile which can change if you make a rc release often without really requiring a rebuild for the code.

More info about this later!

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