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

Add --prepend option for pixi project channel add #2349

Open
scottamain opened this issue Oct 24, 2024 · 4 comments
Open

Add --prepend option for pixi project channel add #2349

scottamain opened this issue Oct 24, 2024 · 4 comments
Labels
🆘 help wanted Maintainers would like community input 👋 good first issue Good for newcomers

Comments

@scottamain
Copy link
Contributor

Problem description

Using pixi project channel add adds the given channel name to the end of the project channels list, making it the lowest priority channel. That is, pixi project channel add pytorch gives me this:

[project]
channels = ["conda-forge", "pytorch"]

In some cases, it's necessary to make the new channel the highest priority. Currently, the only way to control the channel priority is to manually edit the pixi.toml file.

I think it would be fantastic if I could instead run:

pixi project channel add pytorch --prepend

And then get this:

[project]
channels = ["pytorch", "conda-forge"]

Thank you for your consideration! 🙏

@ruben-arts
Copy link
Contributor

Great request! We're open to PR's this shouldn't be to hard!

@ruben-arts ruben-arts added 👋 good first issue Good for newcomers 🆘 help wanted Maintainers would like community input labels Oct 25, 2024
@mrswastik-robot
Copy link

hey @ruben-arts , can I look into this issue ?

@ruben-arts
Copy link
Contributor

@mrswastik-robot ofcourse!

@scottamain
Copy link
Contributor Author

scottamain commented Oct 29, 2024

Hmm... Could you instead make prepend the default behavior (and add an --append option)?

I find it hard to imagine that most users use pixi project channel add only "just in case" the existing channels don't have a package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆘 help wanted Maintainers would like community input 👋 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants