Skip to content

chore: untrack compiled bytecode and add a .gitignore - #121

Merged
imran-siddique merged 1 commit into
mainfrom
chore/untrack-pyc
Aug 4, 2026
Merged

chore: untrack compiled bytecode and add a .gitignore#121
imran-siddique merged 1 commit into
mainfrom
chore/untrack-pyc

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

What

13 .pyc files are committed to this repository, and there is no .gitignore at all:

src/agentrust_trace/__pycache__/           4 files
src/agentrust_trace/adapters/__pycache__/  2 files
tests/__pycache__/                         7 files

So any local pytest run rewrites tracked files and they show up as modified on every branch. I hit this while working in this clone: git status showed seven modified .pyc files I had not touched, which is exactly the kind of noise that ends up in an unrelated commit by accident.

Two of the test artifacts are stale in a way that shows the problem: test_models is committed twice, once built by pytest 9.0.3 and once by 9.1.1.

What this does

  • git rm --cached on all 13. Nothing is deleted from working copies, the files stay on disk and are simply no longer tracked.
  • Adds a .gitignore covering bytecode, build artifacts, and tool caches. Three of the cache directories it lists (.mypy_cache, .pytest_cache, .ruff_cache) are already sitting untracked in this repo.

No source, spec, or test content is touched.

Deliberately separate from #120 so a docs amendment under a 14-day comment period does not carry unrelated hygiene with it.

🤖 Generated with Claude Code

13 .pyc files were committed, and the repo had no .gitignore at all, so
every local test run showed them as modified. That is noise on every
branch, and it caused stray diffs while working in this clone.

git rm --cached only, so nothing is deleted from working copies. The
.gitignore covers bytecode plus the usual build and tool-cache
directories, three of which (.mypy_cache, .pytest_cache, .ruff_cache) are
already present untracked here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit cb83c36 into main Aug 4, 2026
6 checks passed
@imran-siddique
imran-siddique deleted the chore/untrack-pyc branch August 4, 2026 17:05
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.

1 participant