Skip to content

Commit

Permalink
feat: add import yml flag (#792)
Browse files Browse the repository at this point in the history
Co-authored-by: Bas Zalmstra <[email protected]>
Co-authored-by: Ruben Arts <[email protected]>
  • Loading branch information
3 people authored Feb 22, 2024
1 parent 89e71fb commit c30640e
Show file tree
Hide file tree
Showing 18 changed files with 2,850 additions and 38 deletions.
1 change: 1 addition & 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 @@ -63,6 +63,7 @@ serde-untagged = "0.1.5"
serde_json = "1.0.113"
serde_spanned = "0.6.5"
serde_with = { version = "3.6.1", features = ["indexmap"] }
serde_yaml = "0.9.31"
shlex = "1.3.0"
spdx = "0.10.3"
strsim = "0.10.0"
Expand Down
6 changes: 6 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@ It initializes a `pixi.toml` file and also prepares a `.gitignore` to prevent th

- `--channel <CHANNEL> (-c)`: specify a channel that the project uses. Defaults to `conda-forge`. (Allowed to be used more than once)
- `--platform <PLATFORM> (-p)`: specify a platform that the project supports. (Allowed to be used more than once)
- `--import <ENV_FILE> (-i)`: Import an existing conda environment file, e.g. `environment.yml`.
!!! info "Importing an environment.yml"
When importing an environment, the `pixi.toml` will be created with the dependencies from the environment file.
The `pixi.lock` will be created when you install the environment.
We don't support `git+` urls as dependencies for pip packages and for the `defaults` channel we use `main`, `r` and `msys2` as the default channels.

```shell
pixi init myproject
pixi init ~/myproject
pixi init # Initializes directly in the current directory.
pixi init --channel conda-forge --channel bioconda myproject
pixi init --platform osx-64 --platform linux-64 myproject
pixi init --import environment.yml
```

## `add`
Expand Down
Loading

0 comments on commit c30640e

Please sign in to comment.