# Clone and install
git clone <repo-url>
cd HPC-workload-optimizer
pip install -e ".[dev]"
# Install pre-commit hooks
pip install pre-commit
pre-commit installmake help # Show all available targets
make lint # Run ruff linter
make typecheck # Run mypy type checker
make test # Run full test suite
make coverage # Run tests with coverage (82% gate)
make serve # Start local API server
make docker-build # Build Docker image
make rust-check # Run Rust checks + tests
make verify # Run full CI-equivalent verificationAll code must pass:
- Lint:
ruff check python/ - Type-check:
mypy python/hpcopt/ --ignore-missing-imports - Tests:
pytest tests/ -v(324+ tests, 82% coverage gate) - Security:
bandit -r python/hpcopt/ -ll -ii - Version consistency:
python scripts/verify_version_consistency.py --check-unreleased-link
# Run full test suite
pytest tests/ -v
# Run without slow tests (Rust cross-language parity)
pytest tests/ -v -m "not slow"
# Run specific test categories
pytest tests/unit/ -v
pytest tests/integration/ -v
pytest tests/load/ -v -m loadcd rust
cargo check --workspace
cargo clippy --workspace -- -D warnings
cargo test --workspace
cargo build --releaseDependencies are specified with version ranges in requirements.txt and pinned
to exact versions in requirements.lock (generated via pip-tools).
# Update the lockfile after changing requirements.txt
pip install pip-tools
pip-compile --output-file=requirements.lock requirements.txtNote: Docker builds use
requirements.lockfor reproducible installs. Always regenerate the lockfile before cutting a release.
The CHANGELOG.md is maintained manually. When preparing a release:
- Add entries under an
## [Unreleased]section as you merge PRs - At release time, rename
[Unreleased]to[X.Y.Z] - YYYY-MM-DD - The CI release workflow auto-generates a commit-log changelog for the GitHub release page
pyproject.tomlversion, release tag (vX.Y.Z), and changelog sections must stay aligned.
mainis the primary integration branch- Feature branches should target
main - CI must pass before merge
Use concise, imperative-mood commit messages:
Add retry decorator for model loadingFix race condition in registry writesHarden adapter schema with enum constraints
See docs/02-system-architecture.md for the full architecture overview.
All schemas in schemas/ enforce additionalProperties: false. When modifying schemas:
- Update the schema JSON file
- Verify
pytest tests/unit/test_schema_validation.py -vpasses - Update any corresponding documentation in
docs/08-reproducibility-and-artifacts.md
- Never commit secrets or API keys
- Use file-based secrets loading (see
docs/security/secrets-management.md) - All new code is scanned by Bandit SAST in CI