-
Notifications
You must be signed in to change notification settings - Fork 74
enh: Revise Pixi subsection in package dependency section #587
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
base: main
Are you sure you want to change the base?
enh: Revise Pixi subsection in package dependency section #587
Conversation
* Use 'Pixi' to follow the prefix.dev style.
* Clarify Pixi is an environment management tool that is able to treat
conda packages and Python packages with parity, but that it defaults
to conda packages.
- Add links to Pixi documentation.
- Add note that conda environment definition files can be 'imported'
to initialize Pixi workspaces.
* Clarify distinction of conda packages, as 'conda' as term is overloaded.
* In note to conda users, make installation with '--no-deps' its own code block
to highlight behaviors recommended to users and make them easily copyable.
* Remove duplicated section.
* Remove 'todo' item requesting review.
matthewfeickert
left a comment
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.
High level comments for the reviewers.
| system-level dependencies like GDAL. | ||
|
|
||
| **Consider pixi for conda workflows:** | ||
| **Consider Pixi for conda package focused workflows:** |
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.
"conda" -> "conda package focused" as "conda" as a term historically gets overused in ways that are clear to experienced users who know how to fuzzy-match "conda" to whatever term makes sense in context of the ecosystem of conda tooling. To new users having explicit language can be helpful.
(This is an ongoing complaint I have with a lot of the conda — the tool — documentation in general.)
| **Consider pixi for conda workflows:** | ||
| **Consider Pixi for conda package focused workflows:** | ||
|
|
||
| [Pixi](https://pixi.sh) is a modern package manager built on top of both |
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 think this whole subsection is meant to be short, so if I have expanded this too much it should just get squashed back down and then a whole section on Pixi should be added later.
| Pixi is able to treat conda and Python package requirements with parity when | ||
| resolving environments, but uses a "conda-first" approach of using already | ||
| resolved conda packages if possible when resolving Python 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.
As is this might not be clear. What I'm trying to convey is that you do
pixi init example && cd example
pixi add numpy
pixi add --pypi scipy
generating
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"
[tasks]
[dependencies]
numpy = ">=2.3.4,<3"
[pypi-dependencies]
scipy = ">=1.16.3, <2"Pixi will get only scipy from PyPI and will use everything else from conda-forge
$ pixi list | grep 'numpy\|scipy'
numpy 2.3.4 py314h2b28147_0 8.5 MiB conda https://conda.anaconda.org/conda-forge/
scipy 1.16.3 112.9 MiB pypi scipy-1.16.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl| If you already have an existing conda environment definition file, like | ||
| an `environment.yml`, you can | ||
| [import the environment](https://pixi.sh/latest/tutorials/import/) into a new | ||
| Pixi workspace with | ||
|
|
||
| [Pixi](https://pixi.sh) is a modern package manager built on conda that | ||
| uses `pyproject.toml` for configuration. If your project relies heavily | ||
| on conda packages, pixi offers a streamlined workflow with lockfiles and | ||
| faster dependency resolution. | ||
| ``` | ||
| pixi init --import environment.yml | ||
| ``` |
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.
Not sure if this is of interest here, or should be moved to another section to expand out later.
| ``` | ||
| python -m pip install -e . --no-deps | ||
| ``` |
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.
Emphasize the behavior you want users to adopt with a code block, which also gives it a copy button.
|
@lwasser This is ready for review. Let me know if you have any questions. |
Amends PR #584, where a review was requested.