Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor cli layer: use the plugin system to read input files#14911

Closed
soapy1 wants to merge 20 commits intoconda:mainfrom
soapy1:refactor-cli-layer
Closed

Refactor cli layer: use the plugin system to read input files#14911
soapy1 wants to merge 20 commits intoconda:mainfrom
soapy1:refactor-cli-layer

Conversation

@soapy1
Copy link
Contributor

@soapy1 soapy1 commented Jun 5, 2025

Description

This PR refactors the CLI layer to:

  • merge all environment specification coming from cli args and environemt specs into a common model.environment.Environment object
  • creates a transaction object from the final Environment

This refactor is a big change to how conda's cli layer. In order to ensure that we are not changing functionality in unexpected ways. I've outlined all the ways conda package installing related commands work, including noting some bugs (this includes conda install, conda env create, conda remove, etc.).

Some important changes in this PR:

  • conda install/update commands can now read environment.yaml files: Previsouly, only conda env commands could read environment.yaml files. This PR introduces using the plugin system to detect the type of the provided --file source. So, any plugin installed can be used.

Things not included in this PR (can be included in follow up PRs):

  • being able to select which environment spec plugin to use by a cli flag
  • updating all install paths to use handle_txn to execute the installing transaction

Checklist - did you ...

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Jun 5, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 5, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jun 5, 2025

CodSpeed Instrumentation Performance Report

Merging #14911 will not alter performance

Comparing soapy1:refactor-cli-layer (0ca78d8) with main (e7da0f9)

Summary

✅ 21 untouched benchmarks

Copy link
Contributor

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

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

Loving how this is starting to look!

@soapy1 soapy1 force-pushed the refactor-cli-layer branch 10 times, most recently from b47ebdc to 5560011 Compare July 10, 2025 01:08
@soapy1
Copy link
Contributor Author

soapy1 commented Jul 10, 2025

pre-commit.ci autofix

@soapy1 soapy1 marked this pull request as draft July 24, 2025 17:45
@soapy1 soapy1 changed the title Refactor cli layer part 1: build environment object Refactor cli layer: use the plugin system to read input files Jul 24, 2025
@soapy1 soapy1 force-pushed the refactor-cli-layer branch from 8ac31ec to 2fc85f9 Compare July 24, 2025 19:58
@soapy1
Copy link
Contributor Author

soapy1 commented Jul 24, 2025

pre-commit.ci autofix

@soapy1
Copy link
Contributor Author

soapy1 commented Jul 24, 2025

This PR is getting a little bit confusing to manage with the refactor to use the environment model + the reconciling of the --file backends. Going to break this up some.

@soapy1 soapy1 force-pushed the refactor-cli-layer branch from 02ed39a to 2fc85f9 Compare July 24, 2025 21:12
soapy1 and others added 20 commits July 30, 2025 12:06
Validate that specifications and conda package filenames are not
both specified in install/update/create commands before creating
an Environment object. This is consistent with the behaviour of
the currently released conda.
@soapy1 soapy1 force-pushed the refactor-cli-layer branch from 2fc85f9 to 0ca78d8 Compare July 30, 2025 19:06
@soapy1
Copy link
Contributor Author

soapy1 commented Jan 2, 2026

This is superseded by #15547

@soapy1 soapy1 closed this Jan 2, 2026
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🔎 Review Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA cli pertains to the CLI interface tag::ux related to user experience

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Use new Environment dataclass to refactor conda.cli.install sources

4 participants

Comments