2 Commits

Author SHA1 Message Date
2001b9ac2a chore: add ruff formatter, .gitignore, and uv convention (#40)
* chore: add ruff formatter, .gitignore, and uv convention

- Add ruff as dev dependency with basic config
- Add PostToolUse hook to auto-run ruff on .py edits
- Create .gitignore to exclude __pycache__ and settings.local.json
- Document uv run convention in CLAUDE.md
- Add CLAUDE.md, .claude/settings.json, and skills
- Apply ruff formatting to existing Python files

* fix: address CR feedback on hooks and uv run convention

- Fix hooks to read file_path from stdin JSON via jq instead of
  nonexistent $CLAUDE_FILE env var
- Update CLAUDE.md commands to use uv run python3 consistently
- Update skills to use uv run for python/dedup commands
2026-03-02 02:57:45 +02:00
a5222ec8fe feat: add pytest unit tests and CI workflow (#38)
* feat: add pytest unit tests and CI workflow

Add 67 tests covering both create_listing.py and dedup.py with shared
Pillow-based image fixtures. Add GitHub Actions workflow to run tests
on Python file changes.

* fix: address PR review feedback

- Use monkeypatch.chdir(tmp_path) so tests write to temp dirs instead
  of polluting the repo's README.md and index.html
- Strengthen unicode filename test to assert URL-encoded form (%C3%A9)
- Move hashlib import to module level in test_dedup.py
- Remove unused _zero_hash helper and Path import
- Prefix unused tuple unpacking variables with underscore

* fix: add docstrings and strengthen degenerate hash test

- Add docstrings to all test classes, methods, and helper functions
  to achieve 100% docstring coverage
- Strengthen test_skips_degenerate_hashes to assert groups == []
  instead of only checking for no-crash

* fix: use hardcoded MD5 digests and add fixture validation

- Replace hashlib.md5() calls with known digest constants to remove
  hashlib import from test module
- Add input validation to _make_gif fixture for clear error messages
  on empty colors or mismatched durations length
2026-03-02 01:03:35 +02:00