Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ Please make sure that introduced changes are consistent with the testing api and

## Updating the versioning

Please add to `changelog.yaml` and then run `make changelog` before committing the results ONCE in this PR.
Add a towncrier fragment under `changelog.d/` with the format
`<short-description>.<type>.md`, where `<type>` is one of `added`,
`changed`, `fixed`, `removed`, or `breaking`.

Do not edit `CHANGELOG.md` directly in feature PRs. After the PR is merged,
the versioning workflow runs `make changelog`, deletes the consumed fragments,
updates `CHANGELOG.md`, bumps `pyproject.toml`, and commits the result as
`Update package version`.
12 changes: 12 additions & 0 deletions .github/fetch_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Note: Action must be run in Python 3.11 or later.
import tomllib


def fetch_version():
with open("pyproject.toml", "rb") as f:
pyproject = tomllib.load(f)
return pyproject["project"]["version"]


if __name__ == "__main__":
print(fetch_version())
16 changes: 8 additions & 8 deletions .github/workflows/changelog_entry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install towncrier
run: pip install towncrier
- name: Check for changelog fragment
run: |
FRAGMENTS=$(find changelog.d -type f ! -name '.gitkeep' | wc -l)
if [ "$FRAGMENTS" -eq 0 ]; then
echo "::error::No changelog fragment found in changelog.d/"
echo "Add one with: echo 'Description.' > changelog.d/\$(git branch --show-current).<type>.md"
echo "Types: added, changed, fixed, removed, breaking"
exit 1
fi
run: towncrier check --compare-with origin/main
17 changes: 8 additions & 9 deletions .github/workflows/versioning.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# Workflow that runs on versioning metadata updates.
# Workflow that bumps the package version after changes land on main.

name: Versioning updates
on:
push:
branches:
- main

paths:
- "changelog.d/**"
- "CHANGELOG.md"
- "!pyproject.toml"
branches:
- main

jobs:
Versioning:
Expand All @@ -32,11 +27,15 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
- name: Bump version and build changelog
run: |
pip install towncrier
python .github/bump_version.py
towncrier build --yes --version $(python -c "import re; print(re.search(r'version = \"(.+?)\"', open('pyproject.toml').read()).group(1))")
towncrier build --yes --version $(python .github/fetch_version.py)
- name: Update lockfile
run: uv lock
- name: Update changelog
uses: EndBug/add-and-commit@v10
with:
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions changelog.d/release-dashboard-compatibility.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed towncrier fragment validation and package versioning workflow triggers, and dashboard CSV compatibility with `metric_std` columns, benchmark-loss error bars, and donor/receiver distribution rows.
Loading