-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Checklist
- I added a descriptive title
- I searched open requests and couldn't find a duplicate
What is the idea?
Transform the conda migrate command into a subcommand-based system where different types of migrations can be performed. The current functionality of migrating the base environment would become conda migrate base, and new migration tasks could be added over time.
Users would be able to:
- Run
conda migrate --listto see all available migration tasks - Execute specific migrations using
conda migrate <task-name> - Get help for each migration task individually
Why is this needed?
Currently, conda migrate can only perform one type of migration: protecting the base environment and creating a working copy. However, as conda evolves, there are likely to be other one-time migration tasks that users need to perform, such as:
- Migrating configuration files to new formats
- Converting old package cache structures to new ones
- Updating environment metadata to newer standards
- Transitioning from deprecated features to recommended alternatives
By making conda migrate support multiple tasks through subcommands, we create a consistent, discoverable interface for all conda migration needs. This benefits:
- New users who can easily discover what migrations are available and what they do
- Experienced users who get a predictable command structure similar to other conda commands like
conda env - Plugin developers who could potentially contribute their own migration tasks
- The conda ecosystem by providing a standard location for one-time setup/transition tasks
This solves the problem of where to put future migration functionality and provides a clear user experience for occasional but important maintenance tasks.
What should happen?
User experience flow:
1. Discovering available migrations:
$ conda migrate --list
Available migration tasks:
base Protect the `base` environment from accidental modifications and
provide a modifiable copy that will be configured as default.
2. Getting help on the command:
$ conda migrate --help
usage: conda migrate [-h] [--list] [--json] {base} ...
Perform migration tasks for conda environments and configuration.
The migrate command helps you transition your conda setup to follow best
practices. Each migration task is a one-time operation that improves your
conda workflow.
Use `conda migrate --list` to see available migration tasks.
3. Running a specific migration:
$ conda migrate base
[Interactive prompts and migration process...]
4. Getting help on a specific migration task:
$ conda migrate base --help
[Detailed help for the base migration task]
5. Programmatic access (JSON output):
$ conda migrate --list --json
[
{
"name": "base",
"help": "Protect the `base` environment from accidental modifications..."
}
]
The command structure follows familiar patterns from git, conda env, and other tools with subcommands, making it intuitive for users already familiar with conda's CLI.
Additional Context
No response