Skip to content

Migrate Python dependency management from custom scripts to uv#539

Open
kflemin wants to merge 8 commits into
developfrom
python-manager
Open

Migrate Python dependency management from custom scripts to uv#539
kflemin wants to merge 8 commits into
developfrom
python-manager

Conversation

@kflemin
Copy link
Copy Markdown
Contributor

@kflemin kflemin commented Apr 13, 2026

Replaces the custom shell/PowerShell install scripts and JSON-based dependency tracking with uv package manager. Each Python tool now runs in an isolated ephemeral environment via "uv tool run", eliminating shared virtualenv conflicts and simplifying the install story to a single uo install_python command.

Prerequisites
Runners (CI and local) must have uv installed. The CI workflow now handles this automatically. For local development, install uv. The URBANopt installer will ship with uv.

@kflemin kflemin requested a review from Copilot April 13, 2026 21:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR migrates URBANopt CLI Python tool management from bundled Miniconda + pip installs to uv, using uv tool install/run for DISCO/DiTTo/DES/GHE/USG tooling.

Changes:

  • Replace Python/conda install + python_config.json tracking with uv tool installation and execution.
  • Add pyproject.toml dependency groups as a version manifest for Python tools.
  • Update CLI and specs to reflect the new uv-based workflow and remove legacy installer scripts.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spec/uo_cli_spec.rb Updates install_python spec to validate uv presence (but reduces assertion depth).
lib/uo_cli.rb Implements uv check/install/run helpers and updates several commands to invoke tools via uv.
example_files/python_deps/pyproject.toml Adds dependency group manifest for the Python tool packages and pins Python requirement.
example_files/python_deps/.python-version Adds a 3.10 version hint for Python tooling.
example_files/python_deps/install_python.sh Removes legacy Miniconda install script (replaced by uv flow).
example_files/python_deps/install_python.ps1 Removes legacy Windows installer script (replaced by uv flow).
example_files/python_deps/dependencies.json Removes legacy dependency manifest (replaced by pyproject.toml).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/uo_cli.rb Outdated
Comment thread lib/uo_cli.rb
Comment thread lib/uo_cli.rb
Comment thread lib/uo_cli.rb Outdated
Comment thread lib/uo_cli.rb
Comment thread spec/uo_cli_spec.rb
@kflemin kflemin changed the title new uv python management Migrate Python dependency management from custom scripts to uv Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants