Skip to content

Commit 64b8d36

Browse files
committed
Add contributing.md and update readme accordingly
1 parent 77a36a2 commit 64b8d36

2 files changed

Lines changed: 99 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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.

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,9 @@ The GitHub Pages site now hosts the narrative guides, configuration reference, a
6464

6565
## Contributing
6666

67-
Pull requests are welcome! Please include documentation updates, add or update tests when you touch executable code, and run:
67+
Contribution guidelines are documented in [CONTRIBUTING.md](CONTRIBUTING.md).
6868

69-
```bash
70-
uv pip install --group dev
71-
pytest
72-
sphinx-build -b html docs/source/ docs/_build/html
73-
```
74-
75-
If you publish a new surrogate or dataset, document it under `docs/guides` / `docs/reference` so users can adopt it quickly. For questions, open an issue on GitHub.
69+
In short: open or pick an issue, make your changes in a branch, and submit a pull request with tests/docs updates as needed.
7670

7771
## Contributors
7872

0 commit comments

Comments
 (0)