2026-09-08 02:12:15 -04:00
|
|
|
# Contributing
|
|
|
|
|
|
2026-09-08 02:41:03 -04:00
|
|
|
Early-stage project. The bar is architecture cleanliness, not feature
|
|
|
|
|
count. If your change breaks a layering rule below, it won't merge —
|
|
|
|
|
no matter how useful the feature.
|
2026-09-08 02:12:15 -04:00
|
|
|
|
|
|
|
|
## Dev setup
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
python -m venv .venv
|
|
|
|
|
source .venv/bin/activate
|
|
|
|
|
pip install -e ".[dev]"
|
|
|
|
|
pre-commit install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Before opening a PR
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
ruff check src tests
|
|
|
|
|
ruff format src tests
|
|
|
|
|
mypy src/otko/core src/otko/services
|
|
|
|
|
pytest -m "not slow"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Architectural rules (enforced in review)
|
|
|
|
|
|
|
|
|
|
1. `core/` may not import Qt or `openseespy`. Period.
|
|
|
|
|
2. `services/` may not import Qt.
|
|
|
|
|
3. `views/` may not import `openseespy` directly — go through a service.
|
|
|
|
|
4. Public functions and methods need type hints and a docstring.
|
|
|
|
|
5. New domain entities go through Pydantic validation.
|
|
|
|
|
6. Long-running operations (>50 ms) run off the GUI thread.
|
|
|
|
|
|
|
|
|
|
## Commit style
|
|
|
|
|
|
|
|
|
|
Conventional Commits — `feat:`, `fix:`, `refactor:`, `docs:`, `test:`,
|
|
|
|
|
`chore:`, `ci:`.
|