-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for YML files in conda create --file
(WIP)
#14113
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #14113 will degrade performances by 14.78%Comparing Summary
Benchmarks breakdown
|
conda environment modification UXThere are four main commands:
All of these can be tackled as the same type of input if expressed as a single input file. Let's assume that file is
name: env
channels:
- conda-forge
dependencies:
- python=3.10
name: env
channels:
- conda-forge
dependencies:
- python=3.10
- numpy=* #
name: env
channels:
- conda-forge
dependencies:
- python=* # would become python=3.12
- numpy=*
name: env
channels:
- conda-forge
dependencies:
- python=* # would become python=3.12 However name: env
channels:
- conda-forge
dependencies:
- python=* # would become python=3.12
constraints:
- mkl <0 # removes or prevents installation of mkl
|
I'm curious why you see the need to eventually support multiple Another thing that we could do to make the CLI even more simplified would be to either accept a |
To support @travishathaway, I've mentioned this to @jaimergp in person already, I also think multiple Could we achieve the end goals of this ticket basically in multiple steps, to reduce the code churn? Deprecation of existing flags and code paths need to be accounted for as well. |
Because it's already supported with Eventually it doesn't matter as long as we are able to construct "The Source Of Truth File" from all those input files, and dump it in the conda-meta.
Absolutely. I don't intend this PR to be merged. It's mostly a conversation driver so we can discuss code challenges with good technical context (e.g. how the diff looks like). When we have a decision, we can create an epic/meta with the smaller items and work on them one by one. Maybe the first step is a quick prototype of the dreamt CLI plus the draft implementation of the new explicit-state environment file, which maybe I drop here in this PR. |
Hello @conda/conda-core! This PR is still in draft but we have reached a milestone here. Let me recap what I've done here:
There's still some more work to do (like a smarter file format detector that doesn't have to deal with the now deprecated Anaconda.org environments), but you get the idea. |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Excited to see this! I need to specify my optional test/docs dependencies in a separate file from my core dependencies. It would be great to be able to use the yml format instead of the txt format for specifying multiple files 💜 |
Description
Looking into parts of #11633 (
conda env create
->conda create
).This is the minimum effort required to have YML support in
conda create
. It has a few problems UX-wise, though:This is just here to see what breaks and inform of the challenges in
conda.cli.install
to make a case for a bigger refactor.What I would like to have instead
I envision a new
Environment
class that CLIs need to fulfill with details such as packages, channels or solver settings, and then this class delegates to the adequate install backends (solver, explicit...). This starts to build up a homogeneized Environment schema that could look like a potentialconda.toml
orenvironment.yml
v2. That's a big change so I'll draft a roadmap to get there if interested. My idea would be to have a single file that represents the input state of the environment, and then operating on the environment would mean editing that file (on disk or virtually), and then applying the changes to disk. Again, borrowing a few concepts from the Pixi model.Edit: I went ahead and implemented parts of the
details
dropdown. See this comment: #14113 (comment)Checklist - did you ...
news
directory (using the template) for the next release's release notes?