-
Notifications
You must be signed in to change notification settings - Fork 126
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(manifest): change pypi-options to function more like channels and platforms #1405
base: main
Are you sure you want to change the base?
Conversation
channels, platforms
On 2/, for me, it makes sense that the default feature works as closely as possible as other named features. So in my mind, defining pypi-options on the default feature should override the project level ones, as it would on other features. |
On 1/ I think the nested structure as you propose makes sense |
Makes sense! Except currently you cannot define channels and platforms on the default feature level. I think what you are suggesting makes sense though. That these project settings are inherited by default but can be overidden on a feature level, even the default (because they can be overriden in non-defaults). So that would need to change for Currently doing something like: [project]
name = "bar"
version = "0.1.0"
description = "Add a short description here"
authors = ["Tim de Jager <[email protected]>"]
channels = ["conda-forge"]
platforms = ["osx-arm64"]
[feature.default]
channels = ["bioconda"] Gives you: × failed to parse project manifest
╭─[pixi.toml:9:10]
8 │
9 │ [feature.default]
· ───┬───
· ╰── The name 'default' is reserved for the default feature
10 │ channels = ["bioconda"]
╰──── |
I just don't know how to specify that nicely though. This: [project]
name = "bar"
version = "0.1.0"
description = "Add a short description here"
authors = ["Tim de Jager <[email protected]>"]
channels = ["conda-forge"]
platforms = ["osx-arm64"]
# Would fall under project again
channels = ["bioconda"] will not work. |
just my 1 cent - I also think that nested structure look more appropriate and intuitive for me |
It may be more appropriate to rename the default env as the base env. The config under project is the default config. In this way, there will be no semantic conflict with the base env. |
Sure, we can talk about it but might be for a different PR :) |
We should use, the sub-fields directly indeed. I was already doing that in a seperate PR, adding pre-release support, which I will get back to after his. I would like to support |
@olivier-lacroix I've made the change backwards compatible like you've suggested. So you can also add it to the default feature still. |
I create issue in #1416 |
I'll re-add the |
About the logic, what should happen with this case?: [project.pypi-options]
index-url = "https://pypi.org/simple"
extra-urls = ["https://pypi.com/simple/extra"]
find-links = [{url = "https://pypi.bla/simple/flat"}, {path = "/path/to/flat"}]
[feature.test.pypi-options]
index-url = "https://prefix.pypi.com/test"
extra-urls = ["https://pypi.com/simple/test"]
find-links = [{url = "https://pypi.bla/simple/test"}, {path = "/path/to/test"}]
[feature.test1.pypi-options]
index-url = "https://prefix.pypi.com/test1"
extra-urls = ["https://pypi.com/simple/test1"]
find-links = [{url = "https://pypi.bla/simple/test1"}, {path = "/path/to/test1"}]
[environments]
env = ["test", "test1"] What would the |
I think only |
I don't know... I kind of like the ability to make an environment based on an alternative index, although I must agree with you I do not see a direct use-case for it. What do you think about the |
The uv document said
|
@ruben-arts I think in your example, your project level pypi option should be ignored at feature level (like channels and platform are today). |
I don’t think it should be deprecated. It should allow one to override the project level option s for the default feature. |
The plan in my head, let's see what @olivier-lacroix and @ruben-arts thinks:
|
In the #1385 we've decided to give this a try.
This PR makes
pypi-options
work more like channels and platforms. They can now not be specified for the default feature so it's more like:They are now still inherited by features even when
no-default-feature
is enabled. Couple of things we need to decidepypi-index-url
or something.