The core library lives in sdiff/ (parser, comparer, renderer, and models). Tests are in tests/, with shared fixtures in tests/fixtures/. Reference PDFs sit in docs/. Packaging and tooling are defined in setup.py, setup.cfg, and the Makefile; CHANGELOG tracks releases.
make envcreates the localvenv/(Python 3.11+).make devinstalls the package plus test/dev extras (.[tests,devtools]) into the venv.make testruns linting and the full pytest suite with coverage.make vtestruns pytest verbosely.make flakeruns the autopep8 format check and flake8 onsdiff/andtests/.make formatapplies autopep8 formatting tosdiff/andtests/.make covprints the coverage report.make cleanremoves build artifacts and the venv.make hooksinstalls Husky git hooks (requires Node/npm;make devruns this).
Lint parity: CI and the Husky pre-commit hook both run the same checks as make flake (autopep8 check + flake8). Run make flake or make test locally to mirror CI.
Example flow:
make dev
make testUse standard Python conventions: 4-space indentation, snake_case for modules/functions/variables, and PascalCase for classes. Flake8 enforces a 120-character line limit (see setup.cfg). autopep8 is available for formatting. Keep new modules in sdiff/ and new tests in tests/ with filenames like test_<area>.py.
The suite uses pytest with coverage. Coverage is expected to stay high (current config fails under 96%). Add or update tests for behavior changes, and prefer small, focused unit tests. Place reusable data in tests/fixtures/. Run make test before submitting changes.
Commit messages in this repo are short and often use a type prefix (e.g., chore: ..., fixes: ..., hotfix: ..., refactors: ...). Follow that pattern where practical, and keep the summary concise. For PRs, include a brief description, list tests run (e.g., make test), and link related issues or tickets when available.