reboot_env

Upgrading venv: full vs partial

A user should be able to specify reboot arg to bootstrap everything from scratch.

To re-create the venv, re-install the deps, and re-pin the versions, run:

./prime reboot
See the difference between full vs partial upgrade:
  • Full (auto): upgrade all dependency versions (respecting version ranges specified in pyproject.toml).

    The reboot sub command automates the removal of the old constraints.txt file (to repopulate it).

    A missing constraints.txt allows re-capturing a new outcome of the dependency resolution for all dependencies.

    NOTE: This approach also destroys the old venv (any manual changes to the venv will be lost).

  • Partial (manual): upgrade a version only for one specific dependency.

    • Remove only the line for that dependency from the constraints.txt file.

    • Re-run the normal bootstrap:

      ./prime
      

    NOTE: This approach re-uses the old venv (and retains any manual changes).

Implementation

  • Remove local_env_link to re-select the env.

    TODO: TODO_41_10_50_01.implement_env_selector.md: implement automatic env selection.

  • Re-select python.

    TODO: TODO_41_10_50_01.implement_env_selector.md: create FT (feature_topic) for python selector and reference it here.

  • Remove venv (including the extra one used by uv).

  • Remove constraints.txt to re-compute dependency versions (only via spec in pyproject.toml).

This feature also addresses upgrade_venv.

See also requirements_lock.