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

docs: Add more documentation on environments #790

Merged
merged 12 commits into from
Feb 8, 2024

Conversation

ruben-arts
Copy link
Contributor

Fixup missing CLI options and did a pass on explaining a pixi environment and how to use it.

docs/cli.md Outdated Show resolved Hide resolved
docs/cli.md Outdated Show resolved Hide resolved
docs/cli.md Outdated Show resolved Hide resolved
@@ -452,7 +452,7 @@ The `environments` table allows you to define environments that are created usin
The environments table is defined using the following fields:

- `features: Vec<Feature>`: The features that are included in the environment set, which is also the default field in the environments.
- `solve-group: String`: **[NOT IMPLEMENTED YET, ONLY DESERIALIZABLE]** The solve group is used to group environments together at the solve stage.
- `solve-group: String`: The solve group is used to group environments together at the solve stage.
This is useful for environments that need to have the same dependencies but might extend them with additional dependencies.
For instance when testing a production environment with additional test dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a sentence that then versions of dependencies are used that work with production and test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added extra info that explains it a little more

This location is **not** configurable as it is a specific design decision to keep the environments in the project directory.
This keeps your machine and your project clean and isolated from each other, and makes it easy to clean up after a project is done.

If you look at the `.pixi/envs` directory, you will see a directory for each environment, the `default` being the one that is used if you only have one environment.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If you look at the `.pixi/envs` directory, you will see a directory for each environment, the `default` being the one that is used if you only have one environment.
If you look at the `.pixi/envs` directory, you will see a directory for each environment, the `default` being the one that is used if you only have one environment, this will also be the case if you do not specify any environments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rewrote the line alittle

docs/environment.md Outdated Show resolved Hide resolved
. "/home/user/development/pixi/.pixi/envs/default/etc/conda/activate.d/libglib_activate.sh"
. "/home/user/development/pixi/.pixi/envs/default/etc/conda/activate.d/rust.sh"
```
It sets the `PATH` and some more environment variables. But more importantly it also runs activation scripts that are presented by the installed packages.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a reference as to what activation scripts are or maybe a link to one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a link to the glib script

docs/environment.md Outdated Show resolved Hide resolved
- [Rip(PyPI) resolver blog](https://prefix.dev/blog/introducing_rip)

Pixi solves both the `conda` and `PyPI` dependencies, where the `PyPI` dependencies use the conda packages as a base, so you can be sure that the packages are compatible with each other.
These solvers are split between the `rattler` and `rip` library, these do the heavy lifting of the solving process.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe link to resolvo as the solver, that is used in both projects?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good one, extended this a with some more info

docs/environment.md Outdated Show resolved Hide resolved
ruben-arts and others added 11 commits February 8, 2024 14:28
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
@ruben-arts ruben-arts enabled auto-merge (squash) February 8, 2024 20:09
@ruben-arts ruben-arts merged commit c2f9e7b into prefix-dev:main Feb 8, 2024
3 checks passed
@ruben-arts ruben-arts deleted the docs/environment_documentation branch February 8, 2024 20:40
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.

3 participants