Skip to content

chore(git): stop ignoring every path that starts with an underscore - #331

Merged
HugoFara merged 1 commit into
developfrom
fix/gitignore-python-packages
Nov 4, 2026
Merged

HugoFara merged 1 commit into
developfrom
fix/gitignore-python-packages

Conversation

@HugoFara

@HugoFara HugoFara commented Nov 4, 2026

Copy link
Copy Markdown
Owner

.gitignore had a bare _*, which matches any file or folder starting with an underscore, anywhere in the repo. It matched no tracked file, but it hid these six files:

  • parsers/__init__.py
  • services/nlp/app/__init__.py
  • services/nlp/app/routers/__init__.py
  • services/nlp/app/services/__init__.py
  • services/nlp/app/services/lemmatizers/__init__.py
  • services/nlp/app/services/parsers/__init__.py

They exist in working trees but never reached clones, tags or CI-built images, where those folders load as namespace packages. It came to light when a clean export of 3.8.0 for deployment would have deleted them from the server. Nothing broke, because main.py imports submodules explicitly, but a future __init__.py with real logic would have vanished silently.

Change

  • .gitignore: _* is replaced with __pycache__/, *.py[cod] and /coverage_report/. I compared the full ignored-file list before and after: coverage_report/ also relied on _* for its _css, _icons and _js folders, hence its own rule. The six files above are now the only paths that stop being ignored.
  • The six files are committed unchanged. They contain comments and re-exports only, and they matched what ran in production before 3.8.0.

No application code changes.

🤖 Generated with Claude Code

The bare _* rule matched no tracked file and hid six Python __init__.py
files, so they existed in working trees but never in clones, tags or the
images built from them. Those packages only loaded as namespace packages.
Found when a clean export of 3.8.0 would have deleted them from the server.

Replace it with what it was catching on purpose: __pycache__, bytecode and
the PHPUnit coverage report. The six files are committed as they were.

Co-Authored-By: Claude <noreply@anthropic.com>
@HugoFara
HugoFara merged commit 8a0601d into develop Nov 4, 2026
14 checks passed
@HugoFara
HugoFara deleted the fix/gitignore-python-packages branch November 4, 2026 11:35
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