Skip to content

feat: add --as-is as a shorthand for --no-install --frozen#4357

Merged
ruben-arts merged 4 commits intoprefix-dev:mainfrom
tdejager:feat/as-is
Aug 15, 2025
Merged

feat: add --as-is as a shorthand for --no-install --frozen#4357
ruben-arts merged 4 commits intoprefix-dev:mainfrom
tdejager:feat/as-is

Conversation

@tdejager
Copy link
Copy Markdown
Contributor

This is dependent on #4322, that should be merged first. This PR adds the --as-is flag to the run, shell, shell-hook commands. Because of #4322 this should basically serve as an alias for --frozen --no-install. There does not seem to be a really good clap way of doing this, so I decided to basically use a new struct that is used in the command that includes the structs that we already use.

So now you can do pixi run --as-is python and it will just execute that in the prefix w/o doing any locking and updating. I feel this is pretty ergonomic.

I've decided to only add the alias to a couple of commands, basically because it feels strange to me that you can do pixi workspace channel add --as-is bioconda. But I'd be happy to add it there if you feel differently.

Testing

I basically tested the thing by hand, and there are some unit tests that check if the aliasing works as expected.

@tdejager tdejager requested a review from ruben-arts August 15, 2025 08:32
@tdejager tdejager marked this pull request as draft August 15, 2025 08:33
@tdejager tdejager force-pushed the feat/as-is branch 2 times, most recently from cbdcedb to 7d6237b Compare August 15, 2025 11:22
@tdejager tdejager marked this pull request as ready for review August 15, 2025 11:37
Copy link
Copy Markdown
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small request, but works and looks good!

Co-authored-by: Ruben Arts <ruben@prefix.dev>
Copy link
Copy Markdown
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to use this daily! 🙏

@ruben-arts ruben-arts enabled auto-merge (squash) August 15, 2025 12:41
@ruben-arts ruben-arts merged commit 2ff52af into prefix-dev:main Aug 15, 2025
41 checks passed
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

Successfully merging this pull request may close these issues.

2 participants