Add .gitignore for Python build artifacts and local state#4
Open
megative wants to merge 1 commit into
Open
Conversation
The repository previously had no .gitignore, which meant local __pycache__/, virtualenvs, pytest cache, coverage reports, log files, SQLite databases under tests/.tmp/ and operator-local incidentrelay.conf with secrets all showed up in git status and risked being accidentally committed or copied into Docker images via COPY . . The ignore list covers: - Python bytecode and import cache - venv/, .venv/, env/, .env - pytest, coverage and tests/.tmp/ artifacts - runtime logs and SQLite databases - local config files (incidentrelay.conf, *.local.conf) - common IDE/editor and OS files - packaging build/ and dist/ output No tracked files are matched by the new patterns, so nothing disappears silently from git status.
1e39034 to
8124ba7
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
.gitignore, so local__pycache__/, virtualenvs, pytest/coverage caches, log files, SQLite databases undertests/.tmp/and operator-localincidentrelay.conf(with secrets) all show up ingit statusand risk being committed or copied into Docker images viaCOPY . ...gitignorecovering Python bytecode, venvs, pytest/coverage artifacts, runtime logs, local SQLite/config files, common IDE/editor noise and packaging output.git status.Test plan
git ls-files | git check-ignore --stdinreturns no tracked files (i.e. the new ignore patterns don't mask anything already in the repo).python -m compileall appandpytest --collect-only,git statusshows only the.gitignoreitself, not dozens of__pycache__/directories.Testsworkflow still passes on this PR.This is an AI-assisted PR.