IMPORTANT: Always run CI checks locally before committing to avoid CI failures:
make ci-checkThis runs the exact same checks as GitHub Actions CI:
ruff check muc_one_up/ tests/- Linting (RUF059, etc.)ruff format --check muc_one_up/ tests/- Formatting checkmypy muc_one_up/- Type checking
If formatting issues are found, fix them with:
make formatThen re-run make ci-check to verify.
- Make changes to code/tests
- Run tests:
make testorpytest - Run CI checks:
make ci-check⚠️ DO NOT SKIP THIS - Fix any issues found by CI checks
- Commit your changes
- Push to GitHub
The repository uses pre-commit hooks that run automatically on commit. These hooks will:
- Fix safe issues automatically (like line endings)
- Apply ruff formatting
- Run linting checks
If pre-commit modifies files, you need to re-stage and commit again.
# Install dev environment
make dev
# Run tests
make test
# Run CI checks (BEFORE committing!)
make ci-check
# Format code
make format
# Run linter with auto-fix
make lint-fix
# Type check
make type-check
# Run all checks + tests
make checkThe make ci-check command is designed to exactly match the GitHub Actions CI workflow defined in .github/workflows/test.yml. If make ci-check passes locally, CI will pass on GitHub.
Run make format locally before committing.
Prefix unused variables with _:
# Bad
results, info = some_function() # if info is unused
# Good
results, _info = some_function()Pre-commit hooks handle this automatically. Just re-commit after the hook fixes them.