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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write specification for text spec input files #79

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

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Jun 3, 2024

Standardizing our simplest input file. Should not be too controversial :P

馃摑馃憮 Markdown preview

@jezdez
Copy link
Member

jezdez commented Jun 4, 2024

That's a nice surprise!

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.

That was very informative, but I cannot speak to the accuracy of the CEP. Just minor suggestions on the language.

cep-??.md Outdated Show resolved Hide resolved
cep-??.md Outdated Show resolved Hide resolved
Co-authored-by: Marco Esters <mesters@anaconda.com>
Copy link

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

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

Thank you for this!


If the line `@EXPLICIT` is found, the file is considered explicit. The word `@EXPLICIT` can contain whitespace before and after, but it's not recommended.

In explicit files, each package requirement line MUST specify a single, direct URL (as in RFC 3986) to a conda artifact. File paths are also supported, but they SHOULD be preferrably expressed as `file://` URLs. Relative paths are allowed, and will be processed as relative to the working directory, not the input file parent directory. Each URL can be immediately followed by an anchor tag (`#<hash>`) that encodes the expected MD5 checksum of the downloaded artifact. More specifically, whitespace-stripped lines SHOULD be parsable by this regex:

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 used in the wild but can it also be followed by a sha256 hash? E.g. sha256:hash

## Reference

- [Explicit URL regex](https://github.com/conda/conda/blob/841d9d57fd96ad27cda4b7c43549104a96f961ce/conda/misc.py#L50-L54)
- [`explicit()` implementation in `conda`](https://github.com/conda/conda/blob/841d9d57fd96ad27cda4b7c43549104a96f961ce/conda/misc.py#L57-L145)

Choose a reason for hiding this comment

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

For what it's worth this is the implementation in rattler: https://github.com/mamba-org/rattler/blob/main/crates/rattler_conda_types/src/explicit_environment_spec.rs

Although I don't think it follows the specs from this CEP to the letter.

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.

None yet

4 participants