Contributing to DS01 Infrastructure
Development Setup
# Clone the repository
git clone git@github.com:hertie-data-science-lab/ds01-infra.git
cd ds01-infra
# Install development tools
pip install pre-commit ruff
pip install shellcheck-py # optional, for local shellcheck
# Install git hooks
pre-commit install --hook-type commit-msg
Local CI
The Makefile mirrors the CI pipeline. Run before pushing:
make check # Full CI locally (lint + test)
make fmt # Auto-format all code (ruff + shfmt)
make lint # Check without fixing
make test # Unit + integration tests
Requires ruff, shfmt, and shellcheck on PATH. See make help for all targets.
Commit Messages
This project uses Conventional Commits.
Format
<type>(<scope>): <subject>
Types
| Type | Use for |
|---|---|
feat | New features |
fix | Bug fixes |
docs | Documentation |
refactor | Code restructuring |
test | Tests |
chore | Maintenance |
ci | CI/CD changes |
Examples
feat: add GPU utilisation dashboard
fix(gpu): resolve allocation race condition
docs: update installation guide
feat!: new container API # breaking change
Pull Requests
- Create a feature branch from
main - Make changes with conventional commits
- Run
make checklocally - Push and open a PR
- CI must pass (the
CIgate check) - Squash merge to main
Code Style
Bash Scripts
- Formatted with shfmt (
-i 4 -ci -s— 4-space indent, case indent, simplify) - Linted with shellcheck (
-x -S warning) - Use
set -efor error handling, include usage functions
Python Scripts
- Formatted with Ruff (100 char line length, target py310)
- Use type hints for public functions
- Use
pathlib.Pathoveros.path
Testing
make test # Unit + integration (excludes system tests)
make test-all # All tests including system (requires sudo + GPU)
See the test suite README for test structure and markers.
Releases
Releases are manual, tag-triggered. See the CI & release process for the full process.
# Update VERSION, commit, tag, push
echo "1.5.0" > VERSION
git add VERSION && git commit -m "chore: bump version to 1.5.0"
git tag v1.5.0 && git push --tags