Source code lives in draftjs_exporter/. Tests are in tests/. Contributor and user docs are in docs/. Type-checking stubs live in stubs/. The root also contains example.py and benchmark.py for local runs and performance checks.
make help: See what commands are available.make init: Install dependencies and initialise for development.make lint: Lint the project.make format: Format project files.make test: Test the project.make test-watch: Restarts the tests whenever a file changes.make test-coverage: Run the tests while generating test coverage data.make test-compatibility: Compatibility-focused test suite.make dev: Restarts the example whenever a file changes.make benchmark: Runs a one-off performance (speed, memory) benchmark.make clean-pyc: Remove Python file artifacts.make build: Builds package for publication.make publish: Publishes a new version to PyPI.
uvfor dependency managementrufffor linting and formattingmypyfor type checkingtyfor additional type checking (experimental)uvfor package publicationGitHub Actionsfor continuous integrationpytestfor unit tests
- Python uses 4-space indentation and type annotations checked with mypy / ty.
- Formatting is enforced by
ruff formatfor Python andprettierfor all other files. - Test modules follow
test_*.py, with test functions namedtest_*.
- Target of 100% test coverage for all improvements.
- Write tests both at the unit level but also integration (
test_exports.py,test_output.py) - Write implementation and language-agnostic test cases in
test_exports.json
- Be concise and to the point. Explain rationales that aren’t obvious.
- No Title Case usage ever. Always use Sentence case.
- Recent commit messages use short, capitalized, imperative summaries (e.g., “Enforce additional mypy check”).
- PRs should include a clear description, relevant test evidence (command + result), links to any related issues.