Skip to content

Semantic Versioning updates of environments #3786

@jjerphan

Description

@jjerphan

Feature request specification

Currently, it is possible for mamba to update an entire environment with:

mamba env update -n env_name [--all] [--prune] 

As most package are relying on Semantic Versioning (AKA SemVer), being able to perform updates of packages following this scheme would be useful.

Update of versions following this semantic (namely updates for major, minor, patch, and even build) could be integrated in the env update command so that one could update a set of package easily.

Proposed UX: new flags for each SemVer segment

Each segment of Semantic Versioning (e.g. major, minor, patch, build) could have a new flag to update the set of package accordingly:

# Update all the packages in `env_name` for their last major version
mamba env update -n env_name --major

# Update all the package in `env_name` for their last minor version
mamba env update -n env_name --minor

# Update all the package in `env_name` for their last patch version
mamba env update -n env_name --patch

# Update all the package in `env_name` for the last build of the current version
mamba env update -n env_name --build

Those commands must be composable with the existing flags and arguments, such as --all, --prune, or explicitly specified MatchSpec.

For instance, all the following must work:

mamba env update -n env_name --all
mamba env update -n env_name --major --all
mamba env update -n env_name --minor
mamba env update -n env_name --patch --prune
mamba env update -n env_name --build xtensor    

Per-requisites

A few issues might need to be performed first, such as:

  • Determining the difference between update and env update.
  • Adapting the behavior of --prune
  • Adapting the behavior of --all

See related issues:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions