Thank you for your interest in contributing! This document covers the essential setup and workflows.
Requires Python >= 3.11.
pip install -e ".[dev]"This installs the package in editable mode along with dev dependencies: pytest, mypy, and ruff.
pytestAll tests live under tests/. Tests are organized by module:
test_translator.py-- core translation logictest_mapper.py--DynamicMapperandMapperRegistrytest_response.py-- response builder and helperstest_behaviors.py-- individual behavior classestest_behaviors_integration.py-- end-to-end behavior + translation tests
ruff check .
mypy optimadetosqlPlease run both before submitting changes.
- Python 3.11+ features are welcome (e.g.,
X | Yunion syntax,type[X]generics). - Avoid legacy
typingmodule aliases (Dict,Optional,Tuple) -- use built-in generics. - All
Rule.apply()methods must have full type annotations matching the base class signature. - Private names start with
_; only public names should appear in__all__.
- Fork the repository and create a branch from
master. - Make focused changes with clear commit messages.
- Add or update tests as needed.
- Run
pytest,ruff check ., andmypy optimadetosqlbefore pushing. - Open a PR with a description of the change and its motivation.
Please include:
- Python version
- Steps to reproduce
- Expected vs actual behavior
- Relevant code snippets or error output