Please open a Discussion, Issue, or email the maintainers to talk over any major changes before submitting a pull request.
If you use VSCode, install recommended extensions (press F1 → Show Recommended Extensions):
ms-python.pythonms-python.mypy-type-checkercharliermarsh.ruffusernamehw.errorlensfill-labs.dependi
-
Fork the repository and clone your fork:
git clone https://github.com/{your_profile}/ddgs cd ddgs -
Create and activate a virtual environment, then install development dependencies:
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -e .[dev]
-
Install pre-commit hooks (automates formatting, linting, typing):
prek install
- Hooks run
ruffandmypyautomatically on each commit. - To run them manually:
prek.
- Hooks run
-
Create a feature branch:
git checkout -b feat/new-feature
-
Implement your changes.
-
Run tests locally:
pytest
-
Commit changes (follow Conventional Commits):
git add . git commit -m "feat: add feature description"
-
Push your branch to your fork
git push origin feat/new-feature
-
Open a pull request against the upstream repository and reference any related Discussion/Issue.
- Formatting and linting are enforced with ruff.
- Static typing is checked with mypy.
- Tests pass:
pytest - prek checks pass:
prek - Commit messages follow Conventional Commits
- PR references related Issue/Discussion and describes changes
- Add tests for new behavior where applicable