From 9a9202057e4c10c17acc1717d856cf6273d6e3c4 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Sat, 6 Jun 2026 22:32:41 +0200 Subject: [PATCH 1/5] ci: add backend-aware issue templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 53 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 24 ++++++++++ 3 files changed, 78 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..2d2f692 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,53 @@ +name: Bug report +description: Report incorrect behavior or a crash in scoringrules +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting! scoringrules runs the same scoring code across + multiple array backends, so the backend and versions below are essential. + - type: textarea + id: what-happened + attributes: + label: What happened? + description: What did you observe, and what did you expect instead? + placeholder: "crps_ensemble returns NaN where a finite score is expected…" + validations: + required: true + - type: textarea + id: reproducer + attributes: + label: Minimal reproducer + description: A self-contained snippet that triggers the bug. + render: python + validations: + required: true + - type: dropdown + id: backend + attributes: + label: Backend + description: Which array backend exhibits the bug? + multiple: true + options: + - numpy + - numba + - jax + - torch + validations: + required: true + - type: input + id: python-version + attributes: + label: Python version + placeholder: "3.13" + validations: + required: true + - type: input + id: sr-version + attributes: + label: scoringrules version + description: "Output of `python -c 'import scoringrules; print(scoringrules.__version__)'`" + placeholder: "0.10.0" + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..751e651 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,24 @@ +name: Feature request +description: Suggest a new score, backend, or capability +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: Problem / motivation + description: What are you trying to do that scoringrules doesn't support today? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed solution + description: What would the API or behavior look like? Cite a reference if it's a known scoring rule. + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + validations: + required: false From 8c349f6299fbde488e319bd40755bedbafbcbbf5 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Sat, 6 Jun 2026 22:32:41 +0200 Subject: [PATCH 2/5] ci: add pull request template with cross-backend checklist --- .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..26d4a12 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +## Summary + + + +## Checklist + +- [ ] Tests pass across all backends (`uv run pytest tests/` — numpy, numba, jax, torch) +- [ ] New/changed numerics touch both the array-API and numba paths where applicable +- [ ] Docs / docstrings updated if public behavior changed +- [ ] A release-note label is applied (`feature`, `fix`, `backend`, `docs`, or `ci`) From 86c84aa69ff0ee2f0a20aad79ed53fca0b8e2d4a Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Sat, 6 Jun 2026 22:32:42 +0200 Subject: [PATCH 3/5] ci: categorize auto-generated release notes by label --- .github/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..1fe9176 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,27 @@ +changelog: + categories: + - title: Breaking changes + labels: + - breaking + - title: New features + labels: + - feature + - enhancement + - title: Bug fixes + labels: + - fix + - bug + - title: Backend-specific + labels: + - backend + - "backend:jax" + - "backend:torch" + - title: Documentation + labels: + - docs + - title: CI / tooling + labels: + - ci + - title: Other changes + labels: + - "*" From d049fca5c6f982a854abef0df0553f05d1492122 Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Sat, 6 Jun 2026 22:32:42 +0200 Subject: [PATCH 4/5] ci: auto-label PRs by changed path --- .github/labeler.yml | 26 ++++++++++++++++++++++++++ .github/workflows/labeler.yml | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..03994b2 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,26 @@ +core: + - changed-files: + - any-glob-to-any-file: + - "scoringrules/_*.py" + - "scoringrules/core/**" + +docs: + - changed-files: + - any-glob-to-any-file: + - "docs/**" + - "**/*.md" + +"backend:jax": + - changed-files: + - any-glob-to-any-file: + - "scoringrules/backend/jax.py" + +"backend:torch": + - changed-files: + - any-glob-to-any-file: + - "scoringrules/backend/torch.py" + +ci: + - changed-files: + - any-glob-to-any-file: + - ".github/**" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..4711abd --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,13 @@ +name: Labeler + +on: [pull_request_target] + +permissions: + contents: read + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 From 374d7441b448d7936ddd5ada4a187b873305281b Mon Sep 17 00:00:00 2001 From: Francesco Zanetta Date: Sat, 6 Jun 2026 22:42:51 +0200 Subject: [PATCH 5/5] =?UTF-8?q?ci:=20clarify=20PR=20checklist=20=E2=80=94?= =?UTF-8?q?=20install=20extras=20for=20full=20backend=20coverage,=20add=20?= =?UTF-8?q?breaking=20label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 26d4a12..79dc1e0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ ## Checklist -- [ ] Tests pass across all backends (`uv run pytest tests/` — numpy, numba, jax, torch) +- [ ] Tests pass across all backends — `uv sync --all-extras --dev` then `uv run pytest tests/` (exercises every installed backend: numpy, numba, jax, torch) - [ ] New/changed numerics touch both the array-API and numba paths where applicable - [ ] Docs / docstrings updated if public behavior changed -- [ ] A release-note label is applied (`feature`, `fix`, `backend`, `docs`, or `ci`) +- [ ] A release-note label is applied (`breaking`, `feature`, `fix`, `backend`, `docs`, or `ci`)