Repository navigation
fix(dev): exclude pytest cache from the uv workspace - #48
Merged
Merged
Conversation
Deploying shepherd-agents-docs with
|
| Latest commit: |
4671a62
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bc539d0e.shepherd-agents-docs.pages.dev |
| Branch Preview URL: | https://fix-uv-workspace-pycache.shepherd-agents-docs.pages.dev |
Exclude the bytecode cache generated beside shepherd/packages/conftest.py so uv does not treat it as a wildcard workspace member missing pyproject.toml.
ananjan-nandi-9
force-pushed
the
fix/uv-workspace-pycache
branch
from
August 9, 2026 20:36
c5533d5 to
4671a62
Compare
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.
Summary
shepherd/packages/__pycache__from wildcard workspace-member discovery.uv run,uv sync, anduv lockcommands usable after package-wide pytest collection.Motivation / Context
The workspace declares
shepherd/packages/*as members. Package-wide pytest collection importsshepherd/packages/conftest.py, creatingshepherd/packages/__pycache__. On the next command,uvmatches that generated directory as a workspace member and refuses to continue because it has nopyproject.toml.uvsupports exclusion globs specifically for directories that should not be treated as members. This PR adds the narrow generated-directory exclusion without changing any real package membership.Delta Breakdown
exclude = ["shepherd/packages/__pycache__"]. Reviewers should verify the exclusion is exact and leaves package globs unchanged.uvcommands.Entry Point
Root
pyproject.tomlworkspace discovery → pytest createsshepherd/packages/__pycache__→ subsequentuvproject discovery ignores that directory.There is no runtime API entrypoint; this affects repository development commands.
Review Guide
The main risk is accidentally excluding a real workspace member. The path is the exact Python bytecode-cache directory created beside the aggregate conftest, and no package is located there. The existing member patterns and lock contents are unchanged.
Validation
uv lock --checkvalidates the workspace configuration;git diff --checkpassed.uv lock --checkanduv run pytestboth succeeded while the cache directory remained present.Documentation / Changelog / Decisions
Added an Unreleased Fixed entry. No decision record is needed for the narrow workspace exclusion.
Risk / Rollback / Migration
Risk is very low and limited to workspace discovery. Rollback is removal of the one exclusion entry and changelog bullet. No migration is required.
Follow-ups
None.