From 7cf7afd8a4ef6fab3050bf9d03a352771be36381 Mon Sep 17 00:00:00 2001 From: Joris Blaak Date: Wed, 2 Sep 2026 13:25:06 +0200 Subject: [PATCH 1/2] CI: GitHub Actions workflow for the Python sample MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One workflow per sample implementation, named after the sample, so another language sample lands as a sibling file rather than a new matrix dimension. .github/workflows/python.yml runs the two commands python/README.md already documents — ruff check src tests, and pytest — with pytest across Python 3.11, 3.12 and 3.13 (pyproject requires >= 3.11). Path filters keep it to changes under python/, so spec, registry and proposal edits do not start a run. Concurrency cancels superseded pull request runs but never main. ruff format is deliberately not a gate: four existing files would be reformatted, and the documented check is ruff check alone. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/python.yml | 68 ++++++++++++++++++++++++++++++++++++ python/README.md | 8 +++++ 2 files changed, 76 insertions(+) create mode 100644 .github/workflows/python.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..ed911a8 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,68 @@ +# CI for the Python sample in python/. One workflow per sample implementation: +# add a sibling workflow (e.g. dotnet.yml) when another language sample lands. +name: Python sample + +on: + push: + branches: [main] + paths: + - 'python/**' + - '.github/workflows/python.yml' + pull_request: + paths: + - 'python/**' + - '.github/workflows/python.yml' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: python-sample-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +defaults: + run: + working-directory: python + +jobs: + lint: + name: ruff + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pip + cache-dependency-path: python/pyproject.toml + + - name: Install + run: pip install -e ".[dev]" + + - name: Lint + run: ruff check src tests + + test: + name: pytest (${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # pyproject sets requires-python >= 3.11. + python-version: ['3.11', '3.12', '3.13'] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: python/pyproject.toml + + - name: Install + run: pip install -e ".[dev]" + + - name: Test + run: pytest -v diff --git a/python/README.md b/python/README.md index ea0c801..2d4bfaa 100644 --- a/python/README.md +++ b/python/README.md @@ -1,5 +1,7 @@ # rowing-data (Python) +[![Python sample](https://github.com/MoveLab-Studio/rowing-data-standard/actions/workflows/python.yml/badge.svg)](https://github.com/MoveLab-Studio/rowing-data-standard/actions/workflows/python.yml) + A **draft** Python implementation of the [Rowing Data Standard](../spec/FIT_STANDARD.md). This package implements **Draft v0.1**, which is not ratified. Field IDs, scales @@ -59,3 +61,9 @@ cd python pytest ruff check src tests ``` + +CI runs exactly these two commands on Python 3.11, 3.12 and 3.13 +([`.github/workflows/python.yml`](../.github/workflows/python.yml)), and only +when something under `python/` changes. The interop test against the +`rowingdata` golden FIT file skips on CI, since that file is not in this +repository. From f1f57835f5bf5edc3b30136740869d222068de23 Mon Sep 17 00:00:00 2001 From: Joris Blaak Date: Wed, 2 Sep 2026 13:39:15 +0200 Subject: [PATCH 2/2] Pin actions to their Node 24 releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first run annotated every job: actions/checkout@v4 and actions/setup-python@v5 target Node.js 20 and were being forced onto Node 24. checkout v5+ and setup-python v6+ declare node24; going to v7 of each clears the annotation. Neither bump touches inputs used here — setup-python v7 only removes the pip-install input, and checkout v7 only restricts pull_request_target and workflow_run checkouts. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index ed911a8..1811d3c 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -30,9 +30,9 @@ jobs: name: ruff runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.12' cache: pip @@ -53,9 +53,9 @@ jobs: # pyproject sets requires-python >= 3.11. python-version: ['3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} cache: pip