-
Notifications
You must be signed in to change notification settings - Fork 209
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: Create features and environments from extras #1077
Conversation
8baffb7
to
8256293
Compare
8d29abd
to
46532e5
Compare
46532e5
to
46fee3d
Compare
60047b2
to
362f648
Compare
ed05166
to
0d1ee9a
Compare
0d1ee9a
to
551f627
Compare
src/project/manifest/mod.rs
Outdated
}); | ||
environments.by_name.insert(EnvironmentName::Default, 0); | ||
} | ||
|
||
// Add all named environments | ||
// Note: if the default Environment is redefined, but does not specify a solve-group, | ||
// it is not added to the 'default' solve-group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this OK?
Or do we want to add it to the 'default' solve-group? That is, the following
[environments]
default = ["somefeature"]
Would be parsed as if the TOML contained
[environments]
default = { features = ["somefeature"], solve-group = "default" }
@ruben-arts @baszalmstra any thought on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, it relatively simple and small but behaves like the [project.dependencies]
which I am for. The ability to overwrite and extend using the normal pixi feature tables is also nice.
Can you link that comment? I am unable to find it. I dont think I agree with this because it feels weird to me that for all other environments you do always have to be explicit about solve-groups. |
Co-authored-by: Ruben Arts <ruben@prefix.dev>
@baszalmstra there you go: #1077 (comment) |
I'm sorry for the confusement @olivier-lacroix, @baszalmstra kinda convinced me outside of this thread. Lets put the |
… redefined)" This reverts commit 551f627.
54133a7
to
77bcd85
Compare
77bcd85
to
d09885a
Compare
@ruben-arts no worries, I reverted that bit. I also:
|
c397610
to
dce5981
Compare
dce5981
to
0ee0411
Compare
Thanks @olivier-lacroix ! |
- **default** with 'package1' as pypi dependency | ||
- **test** with 'package1' and 'pytest' as pypi dependencies | ||
- **all** with 'package1', 'package2' and 'pytest' as pypi dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the above, is it correct that installing the test
environment with pixi
would install pytest
from pypi
rather than conda-forge
?
If I wanted my pixi
test
environment to only install dependencies from conda-forge
can I specify that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhirschfeld you are correct.
Currently, you would have to manually add them to the tool.pixi.feature.test.dependencies
table. What you want is also on my wishlist :-) #532
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if I did manually specify the test dependencies in [tool.pixi.feature.test.dependencies]
table, then that would be used instead of mapping pypi
dependencies from the [project.optional-dependencies]
table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Pixi currently solves pypi dependencies after the conda ones. And if it detects a package is already provided by one of the conda packages requested, it is skipped.
fixes #1062