Migrate Python dependency management from custom scripts to uv#539
Open
kflemin wants to merge 8 commits into
Open
Migrate Python dependency management from custom scripts to uv#539kflemin wants to merge 8 commits into
kflemin wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
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.jsontracking withuvtool installation and execution. - Add
pyproject.tomldependency 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.