Conversation
Add support for specifying a custom Python version when copying environments via the new `--python` flag. If not provided, the command will continue to use the source environment's Python version as before.
Add new options to the `copy` command for more flexible environment copying: - Add `--local` flag to copy environment to `.venv` in current directory - Add `--exclude` option to filter out specific packages (comma-separated) - Add `--include` option to copy only specified packages (comma-separated) - Make `--name` optional and conflict with `--local` flag - Add user confirmation prompt when creating local `.venv` These changes enable more granular control over environment copying, allowing users to create project-local virtual environments and selectively copy packages based on their needs.
Switch from `uv pip sync` to `uv pip install` when copying environments with different Python versions to allow automatic dependency resolution.
- Bump version from 0.1.4 to 0.2.0 in Cargo.toml and Cargo.lock - Refactor copy command to distinguish between local and project environments - Rename `create_environment` to `create_project_environment` and add `create_local_environment` - Use `get_venv_path` helper to correctly locate virtual environment directories - Fix path handling to properly target `.venv` subdirectory for project environments - Improve clarity by tracking environment type with `is_local` flag This refactoring improves the separation of concerns between local (.venv in current directory) and project (managed in envs directory) environments, ensuring correct path resolution for package operations.
Replace pip freeze/sync approach with direct pyproject.toml manipulation: - Read and modify source pyproject.toml instead of using pip freeze - Filter dependencies directly in TOML (including optional dependencies) - Use uv lock + uv sync for dependency resolution - Add --override flag to handle existing pyproject.toml in local mode - Create automatic backups when overriding existing configs - Add toml_edit dependency for TOML manipulation - Remove unused get_venv_path function
Add a `--dry-run` flag to the copy command that allows users to preview changes before applying them.
The copy command had multiple responsibilities and complex flags. Split into two focused commands: - clone: Creates exact 1:1 environment copy (source -> target) - new: Creates project from template with customization options (python version override, package filtering, custom path)
Introduces a new 'sync' command that allows syncing the current project with a template environment. The command supports: - Template environment selection - Python version override - Package exclusion/inclusion filters (comma-separated) - Dry-run mode to preview changes
- Add v0.2.0 release notes to CHANGELOG with complete feature list - Document four-method command architecture (create/clone/new/sync) - Add 570-line COMMANDS.md with complete command reference - Add 489-line USE_CASES.md with real-world usage scenarios - Update README to reflect template-driven workflow - Simplify Core Philosophy to concise bullet points - Add Documentation section with quick help and docs links - Update code examples to use modern `uv add` syntax - Clean up test project files
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.
Description
This PR introduces v0.2.0, a major refactoring that establishes a clear four-method command architecture for uvup. The release replaces the old
copycommand with three new commands (clone,new,sync) that provide clear separation of responsibilities, and migrates from pip freeze to modern pyproject.toml-based dependency management.This is a breaking change release that sets the foundation for uvup's template-driven workflow system.
Changes
New Commands
uvup clone <source> <target>: Create exact 1:1 copy of an environment (no modifications)uvup new <name> --template <template>: Create new projects from templates with modification support--python <version>--exclude <packages>and--include <packages>--path <directory>--dry-runuvup sync --template <template>: Sync current project with templatenewcommandBreaking Changes
uvup copywithuvup clonefor clearer semanticspyproject.tomlinstead ofrequirements.txtuv.locksupport for reproducible builds[project.optional-dependencies]Template System Features
uv lockoruv syncfailuresDocumentation
docs/COMMANDS.md(570 lines) - Complete command referencedocs/USE_CASES.md(489 lines) - Real-world usage scenariosREADME.md:TARGET.mdwith v0.2.0 completion status and v0.3.0 planningCHANGELOG.mdfollowing Keep a Changelog format (all versions from 0.1.0 to 0.2.0)RELEASE.mdwith detailed v0.2.0 release notesTechnical Implementation
commands/new.rswith full template modification supportcommands/sync.rswith backup and rollback mechanismcommands/copy.rstocommands/clone.rssrc/cli.rsfor new commandssrc/main.rsArchitecture Philosophy
The four-method architecture provides clear separation:
Checklist