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
68 changes: 68 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -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@v7

- uses: actions/setup-python@v7
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@v7

- uses: actions/setup-python@v7
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
8 changes: 8 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.