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

Open
#730 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
fastapi, python
Domain
backend, cli

Research direction

Start with the CLI command registration and help overview, then read nx info and the generated pyproject.toml.jinja2 files at nexy/modules/cli/templates/_shared/web/pyproject.toml.jinja2 and the API variant. Check how the project detects its package manager and how CLI tests stub external responses and use temporary projects. Done when nx upgrade handles stable versions, prereleases, downgrades, --check and --dry-run, and the CLI docs and translations are updated.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
11
Forks
6
Avg merge
2h 14m
Merged PRs (30d)
265

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NexyPy/nexy

All issues in NexyPy/nexy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.