Skip to content

Commit

Permalink
feat: Add detached-environments to the config, so users can move th…
Browse files Browse the repository at this point in the history
…e environments out of the project folder. (#1381)

Fixes: #997 

### Todo:
- [x] Fix tests
- [x] Add warning on already local to project installed environments
- [x] Add documentation
- [x] Add symlink from target directory folder to local .pixi folder.
- [x] Find solution to the `deny_unknown_fields`
- [x] Also move `solve-envs`

---------

Co-authored-by: Bas Zalmstra <zalmstra.bas@gmail.com>
  • Loading branch information
ruben-arts and baszalmstra committed May 24, 2024
1 parent 70dd65c commit dc5822a
Show file tree
Hide file tree
Showing 20 changed files with 688 additions and 229 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ reqwest-retry = "0.5.0"
self-replace = "1.3.7"
serde = "1.0.198"
serde-untagged = "0.1.5"
serde_ignored = "0.1.10"
serde_json = "1.0.116"
serde_with = { version = "3.7.0", features = ["indexmap"] }
serde_yaml = "0.9.34"
Expand Down
6 changes: 3 additions & 3 deletions docs/advanced/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ The JSON should follow the following format:

Note: if you use a wildcard in the host, any subdomain will match (e.g. `*.prefix.dev` also matches `repo.prefix.dev`).

Lastly you can set the authentication override file in the [global configuration file](./global_configuration.md).
Lastly you can set the authentication override file in the [global configuration file](./../reference/pixi_configuration.md).

## PyPI authentication
Currently, we support the following methods for authenticating against PyPI:
Expand All @@ -122,7 +122,7 @@ To enable this use the CLI flag `--pypi-keyring-provider` which can either be se
pixi install --pypi-keyring-provider subprocess
```

This option can also be set in the global configuration file under [pypi-config](./global_configuration.md#pypi-configuration).
This option can also be set in the global configuration file under [pypi-config](./../reference/pixi_configuration.md#pypi-configuration).

#### Installing keyring
To install keyring you can use pixi global install:
Expand Down Expand Up @@ -191,7 +191,7 @@ gcloud artifacts print-settings python --project=<project> --repository=<reposit
```

#### Installing your environment
To actually install either configure your [Global Config](./global_configuration.md#pypi-configuration), or use the flag:
To actually install either configure your [Global Config](../reference/pixi_configuration.md#pypi-config), or use the flag:
```shell
pixi install --pypi-keyring-provider subprocess
```
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/explain_info_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ The size of the previously mentioned "Cache dir" in Mebibytes.
## Project info

Everything below `Project` is info about the project you're currently in.
This info is only available if your path has a [manifest file](../reference/configuration.md).
This info is only available if your path has a [manifest file](../reference/project_configuration.md).

### Manifest file

The path to the [manifest file](../reference/configuration.md) that describes the project.
The path to the [manifest file](../reference/project_configuration.md) that describes the project.

### Last updated

Expand Down
155 changes: 0 additions & 155 deletions docs/advanced/global_configuration.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/advanced/pyproject_toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ As pixi takes the conda dependencies over the pypi dependencies.

## Optional dependencies

If your python project includes groups of optional dependencies, pixi will automatically interpret them as [pixi features](../reference/configuration.md#the-feature-table) of the same name with the associated `pypi-dependencies`.
If your python project includes groups of optional dependencies, pixi will automatically interpret them as [pixi features](../reference/project_configuration.md#the-feature-table) of the same name with the associated `pypi-dependencies`.

You can add them to pixi environments manually, or use `pixi init` to setup the project, which will create one environment per feature. Self-references to other groups of optional dependencies are also handled.

Expand Down
2 changes: 1 addition & 1 deletion docs/features/advanced_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ To add a task to run the `bar.py` file, use:
pixi task add bar "python bar.py" --cwd scripts
```

This will add the following line to [manifest file](../reference/configuration.md):
This will add the following line to [manifest file](../reference/project_configuration.md):

```toml title="pixi.toml"
[tasks]
Expand Down
4 changes: 2 additions & 2 deletions docs/features/lockfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Running the following commands will check and automatically update the lock file

All the commands that support the interaction with the lock file also include some lock file usage options:

- `--frozen`: install the environment as defined in the lock file, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](../reference/configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`).
- `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](../reference/configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`.
- `--frozen`: install the environment as defined in the lock file, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](../reference/project_configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`).
- `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](../reference/project_configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`.

!!! Note "Syncing the lock file with the manifest file"
The lock file is always matched with the whole configuration in the manifest file.
Expand Down

0 comments on commit dc5822a

Please sign in to comment.