|
| 1 | +# Contributing to CODES Benchmark |
| 2 | + |
| 3 | +Thanks for helping improve CODES Benchmark. Contributions of all sizes are welcome, including bug fixes, new features, documentation updates, and benchmark extensions. |
| 4 | + |
| 5 | +## What to contribute |
| 6 | + |
| 7 | +Common contribution types in this repository are: |
| 8 | + |
| 9 | +- Adding a new dataset |
| 10 | +- Adding a new surrogate model |
| 11 | +- Adding or improving benchmark evaluations and modalities |
| 12 | + |
| 13 | +For extension-specific implementation details, follow the dedicated guide: |
| 14 | + |
| 15 | +- https://astroai-lab.de/CODES-Benchmark/guides/extending-benchmark.html |
| 16 | + |
| 17 | +## Development setup |
| 18 | + |
| 19 | +Use either `uv` (recommended) or a standard `venv` + `pip` setup. |
| 20 | + |
| 21 | +### Option A: uv (recommended) |
| 22 | + |
| 23 | +```bash |
| 24 | +git clone https://github.com/robin-janssen/CODES-Benchmark.git |
| 25 | +cd CODES-Benchmark |
| 26 | +uv sync |
| 27 | +source .venv/bin/activate |
| 28 | +uv pip install --group dev |
| 29 | +``` |
| 30 | + |
| 31 | +### Option B: venv + pip |
| 32 | + |
| 33 | +```bash |
| 34 | +git clone https://github.com/robin-janssen/CODES-Benchmark.git |
| 35 | +cd CODES-Benchmark |
| 36 | +python -m venv .venv |
| 37 | +source .venv/bin/activate |
| 38 | +pip install -e . |
| 39 | +pip install -r requirements.txt |
| 40 | +pip install black isort pytest sphinx |
| 41 | +``` |
| 42 | + |
| 43 | +## Code style and formatting |
| 44 | + |
| 45 | +This repository uses: |
| 46 | + |
| 47 | +- [Black](https://black.readthedocs.io/en/stable/) for formatting |
| 48 | +- [isort](https://pycqa.github.io/isort/) for import sorting |
| 49 | + |
| 50 | +The CI pipeline auto-applies both tools on contributions. Running them locally is still recommended so you get fast feedback before opening or updating a pull request. |
| 51 | + |
| 52 | +Run both locally with: |
| 53 | + |
| 54 | +```bash |
| 55 | +black . |
| 56 | +isort . |
| 57 | +``` |
| 58 | + |
| 59 | +If you use pre-commit, install hooks once and run them across the repository: |
| 60 | + |
| 61 | +```bash |
| 62 | +pre-commit install |
| 63 | +pre-commit run --all-files |
| 64 | +``` |
| 65 | + |
| 66 | +## Tests and documentation checks |
| 67 | + |
| 68 | +Before submitting a PR, run: |
| 69 | + |
| 70 | +```bash |
| 71 | +pytest |
| 72 | +sphinx-build -b html docs/source docs/_build/html |
| 73 | +``` |
| 74 | + |
| 75 | +If your change affects user-facing behavior, update the relevant docs in `docs/source/`. |
| 76 | + |
| 77 | +## Standard contribution workflow |
| 78 | + |
| 79 | +1. Create an issue (bug report, feature request, or extension proposal), or choose an open issue to work on. |
| 80 | +2. Create a branch from `main` with a clear name. |
| 81 | +3. Implement your changes and include tests/docs updates where relevant. |
| 82 | +4. Run formatting, tests, and docs build locally. |
| 83 | +5. Open a pull request and link the issue. |
| 84 | +6. Address review feedback and keep your branch up to date. |
| 85 | + |
| 86 | +## Pull request expectations |
| 87 | + |
| 88 | +Please keep PRs focused and easy to review. |
| 89 | + |
| 90 | +- Explain what changed and why. |
| 91 | +- Link related issues. |
| 92 | +- Include tests for behavior changes. |
| 93 | +- Include documentation updates for new datasets, surrogates, modalities, or config options. |
| 94 | + |
| 95 | +## Need help? |
| 96 | + |
| 97 | +If you are unsure where to start, open an issue with your proposal or question. |
0 commit comments