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

Standardize environment.yml #81

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Jun 4, 2024

Standardizing the popular environment.yml input files.

📝👓 Markdown preview

```yaml
name: test
dependencies:
- numpy >=1.10

Choose a reason for hiding this comment

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

What about conditions if a dependency is used on different platforms, python versions, implementations, etc.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this CEP I only want to document the current state, mostly as available in the original implementation in conda.

There are a number of extensions in community projects that are out of scope (e.g. I think micromamba has a sel(xxxx): numpy syntax for selectors).

Copy link

@marcoesters marcoesters left a comment

Choose a reason for hiding this comment

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

Just a few suggestions (no blockers if you don't agree though) and a question about platform selectors.

cep-??.md Outdated Show resolved Hide resolved
cep-??.md Outdated Show resolved Hide resolved
cep-??.md Outdated Show resolved Hide resolved
cep-??.md Outdated Show resolved Hide resolved
cep-??.md Outdated Show resolved Hide resolved
cep-??.md Outdated Show resolved Hide resolved

Required, `list[str | dict[str, Any]]`.

The simplest form for this section is a list of `str` encoding `MatchSpec`-compatible requirements. These items MUST be processed as conda requirements and submitted to the solver (along with `channels`) to obtain the contents for the resulting conda environment.

Choose a reason for hiding this comment

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

Should platform selectors be mentioned here or is that implied with MatchSpec-compatible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, environment.yml doesn't support platform selectors like meta.yaml, doesn't it?

Choose a reason for hiding this comment

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

You're right, my bad. Would be a nice feature though.

Co-authored-by: Marco Esters <mesters@anaconda.com>
baszalmstra added a commit to conda/rattler that referenced this pull request Jul 23, 2024
Adds a type for representing a `environment.yaml` based on
conda/ceps#81
- `channels`: conda channels that will be used to resolve the dependencies.
- `variables`: Environment variables that SHOULD be added to the `conda-meta/state` file in the resulting environment.

Additional sections can be present, but they MUST be ignored and the user SHOULD receive an informative warning about them.

Choose a reason for hiding this comment

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

conda-lock cannot abide by this CEP because it includes a platforms key and one other. Any ideas on how to make that work?

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.

5 participants