Minimal guide for contributing to and developing MoralStack.
pip install -e .[dev]- pytest — Run tests:
pytest - pytest-cov — Coverage reports:
pytest --cov=moralstack --cov-report=xml --cov-report=term - ruff — Linting and formatting:
ruff check ./ruff format . - black — Format check:
black --check .(orblack .to reformat) - mypy — Type checking:
mypy moralstack
Pre-commit hooks run automated checks (format, lint, whitespace, type checks) before every commit.
Setup (one-time):
pip install pre-commit # included in .[dev]
pre-commit installManual run on all files:
pre-commit run --all-filesSkip hooks (discouraged):
git commit --no-verifyActive hooks: trailing-whitespace, end-of-file-fixer, ruff check --fix, black, mypy moralstack.
The workflow in .github/workflows/ci.yml runs on Python 3.11 and 3.12 with pip install -e .[dev,ui], then executes:
ruff check ., black --check ., mypy moralstack --ignore-missing-imports, and pytest --cov=moralstack --cov-report=xml --cov-report=term --maxfail=3.
The logs/, reports/ and .pytest_cache/ folders are generated at runtime and are in .gitignore. They should not
be committed.