Skip to content

Add nx upgrade to move a project to a newer Nexy release #730

Backlog

Description

@Espoir-Loem

Problem

Generated projects declare nexy>=X.Y.Z in pyproject.toml
(nexy/modules/cli/templates/_shared/web/pyproject.toml.jinja2:6 and the api variant). There is no
CLI command to move a project to a newer Nexy release: nx info reports the installed version, but
the developer has to edit the dependency and run the package manager by hand.

Change to make

Add nx upgrade for the framework. It reads the installed version, queries PyPI for the newest
stable release, prints the current and target versions, updates the nexy>= floor in
pyproject.toml, then installs through the project's detected package manager. Add --check to
only report what would change and --dry-run to print without writing. Pre-release versions are
ignored unless asked for explicitly, and the command never downgrades.

Out of scope

Module updates (nx update), the LTS channel (nx lts upgrade) and Python version constraints.

Checks

Tests use a stubbed PyPI response and a temporary project, and cover the upgrade, an already current
project, a pre-release, a downgrade attempt and both flags. The command appears in the CLI overview
and help. docs/reference/cli.md describes it, with translations regenerated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions