| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- find.rs: resolve_dot_venv returns Option<PathBuf>, use if-let to conditionally insert into search paths vec - environment_locations.rs: fix bug where ? operator on None would short-circuit the function, losing already-collected environments - path.rs: remove trailing whitespace in doc comments (fmt check) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…uation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance Report (Linux) ✅
Legend
|
Sorry, something went wrong.
Performance Report (macOS)
Legend
|
Sorry, something went wrong.
Test Coverage Report (Linux)
Coverage increased! Great work! |
Sorry, something went wrong.
Test Coverage Report (Windows)
Coverage increased! Great work! |
Sorry, something went wrong.
Performance Report (Windows) ✅
Legend
|
Sorry, something went wrong.
There was a problem hiding this comment.
Adds first-class support for project-local .venv discovery across PET, including the PEP 832 convention where .venv is a file pointing to a virtual environment directory, and integrates this resolution into workspace scanning and relevant locators.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| crates/pet-fs/src/path.rs | Adds resolve_dot_venv() plus unit tests for directory- and file-based .venv resolution. |
| crates/pet/src/find.rs | Uses resolve_dot_venv() to prioritize .venv during workspace recursive discovery. |
| crates/pet-uv/src/lib.rs | Uses resolve_dot_venv() when building uv workspace/project environments from .venv. |
| crates/pet-poetry/src/environment_locations.rs | Uses resolve_dot_venv() when considering project-local Poetry environments. |
Sorry, something went wrong.
|
Eduardo Villalpando Mello (@edvilme) Are you still working on this? |
Sorry, something went wrong.
…uracy - Use fs::metadata instead of symlink_metadata to follow symlinks, so .venv symlinks to directories are correctly treated as directories - Add empty-string guard after trimming .venv file content to prevent whitespace-only files from resolving to the project directory - Fix doc comment to accurately describe that relative paths are not canonicalized - Add tests for whitespace-only .venv file and symlink-to-directory cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hello. Yes, I will be updating it as the discussions on the PEP evolve. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This pull request introduces robust support for resolving .venv entries in project directories, following both the traditional convention (where .venv is a directory) and PEP 832 (where .venv is a file pointing to the virtual environment path). The new utility function resolve_dot_venv is added in pet-fs, and is integrated throughout the codebase to ensure consistent and correct detection of virtual environments. Comprehensive tests are also included to validate the new logic.
Core functionality:
Integration into environment discovery: