To ensure our scientific code is maintainable and reproducible, all members follow these practices.
mainbranch: Protected primary branch. It must always hold a working version. No direct commits to main.- Feature Branches: Use the pattern
devel-<initials>-<feature>(e.g.,devel-df-schottky-fit). - Pull Requests (PR): When a feature is tested, open a PR into
main. At least one other group member should review the code for major projects. - Legacy Branches: For specific beamtimes, use
run-YYYY-MM(e.g.,run-2025-05).
- Use the Conventional Commits format:
type(scope): description. - Types:
feat(new feature),fix(bug fix),docs(documentation),refactor(code cleanup). - Example:
feat(analysis): add relativistic correction to mass fit
- Python: Follow PEP 8. Use
blackorflake8for auto-formatting. - C++: Follow the Google C++ Style Guide or similar.
- Comments: Write code that is "self-documenting," but use comments to explain the physics logic behind complex formulas.
- Every repository must have a
README.mdwith:- Installation instructions (dependencies).
- A minimal working example (MWE).
- Contact person for the code.
- NEVER commit GSI passwords, private SSH keys, or internal IP addresses to public repositories.
- Use
.gitignoreto exclude large data files (.root,.csv,.dat).
- Find our Git Introduction Slides here.
- Check the Git Deep Dive for handling merge conflicts.