Contributing¶
Contributions are welcome! We are excited to see the community help improve and grow DuoORM.
Getting Started¶
If you're interested in contributing, here's how you can get started:
- Fork the repository on GitHub.
- Clone your fork to your local machine.
- Set up a virtual environment and install the development dependencies:
- Make your changes. Please add tests for any new features or bug fixes.
- Run the test suite to ensure everything is working correctly.
Testing architecture (fixtures-first)¶
The test suite is organized around fixtures in tests/conftest.py and a single shared model registry in tests/models.py.
tests/models.pydefines the canonical test models and exposesregistry(db)plusschema_tables(...). Prefer adding new test models there instead of creating ad-hoc models inside tests.db_session(sync) andasync_db_session(async) fixtures provide a clean, isolated database state per test using a transaction + savepoint strategy.model_registrygives you access to the shared models;core_modelsandasync_core_modelsreturn common(User, Post, db)tuples for convenience.
Adding a new isolated test¶
- Add or extend models in
tests/models.pyif the test needs new tables. - Use
db_sessionorasync_db_sessionto get an isolated database context. - Fetch models via
model_registry(orcore_models/async_core_models) instead of re-defining them in the test. - Submit a pull request with a clear description of your changes.
Areas for Contribution¶
We are looking for help in several areas:
- Bug Fixes: If you find a bug, please open an issue first, and then feel free to submit a pull request with a fix.
- New Features: If you have an idea for a new feature, please open an issue to discuss it.
- Documentation: Improvements to the documentation are always welcome.
- Dialect Support: Expanding and improving support for different database backends (MySQL, Oracle, MSSQL) is a high priority.
Thank you for your interest in contributing to DuoORM!