From d5cfe7cae80d050ac8f4aeadae57d9ad700098a6 Mon Sep 17 00:00:00 2001 From: Philipp Rouast Date: Mon, 16 Mar 2026 19:26:54 +1100 Subject: [PATCH 1/3] Add release instructions --- CONTRIBUTING.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 645ee5f..0169e0c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,3 +66,57 @@ python -m build ``` The artifacts will be generated in the `dist/` directory. + +Since this is a Python project using `setuptools_scm`, versioning is handled automatically based on git tags. I've adapted the workflow from your JS library to Python conventions while maintaining the same straightforward structure. + +Add this section to the end of your `CONTRIBUTING.md`: + +--- + +## Releases + +Releases are automated via GitHub Actions and triggered by pushing git tags. The project uses `setuptools_scm`, so the version is derived directly from the tag name. + +### Prerelease (Beta) + +Use this to test new features without affecting stable users on PyPI. + +1. Ensure your changes are merged into `main`. +2. Switch to `main` locally and pull the latest: + ```bash + git switch main + git pull origin main + ``` +3. Create and push a beta tag (e.g., `v1.2.0-beta.1`): + ```bash + git tag -a v1.2.0-beta.1 -m "v1.2.0-beta.1" + git push origin v1.2.0-beta.1 + ``` + +The CI will automatically publish to PyPI and create a GitHub prerelease. + +### Production Release + +1. Ensure the `main` branch is ready for production. +2. Switch to `main` locally and pull the latest: + ```bash + git switch main + git pull origin main + ``` +3. Create and push a production tag (must start with `v`): + ```bash + git tag -a v1.2.0 -m "v1.2.0" + git push origin v1.2.0 + ``` + +The CI will build the distribution archives, publish to PyPI, and create a stable GitHub Release with generated release notes. + +### Syncing back to Dev + +After any release, ensure the tags are available in your development branch to keep `setuptools_scm` versions in sync: + +```bash +git switch dev +git merge main +git push origin dev +``` From 4ab20697536b13aedc2961811896b0f4c1e3d6e8 Mon Sep 17 00:00:00 2001 From: Philipp Rouast Date: Fri, 4 Sep 2026 16:55:34 +1000 Subject: [PATCH 2/3] Reduce test load --- tests/test_vitallens.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_vitallens.py b/tests/test_vitallens.py index 65ceba5..8d483c2 100644 --- a/tests/test_vitallens.py +++ b/tests/test_vitallens.py @@ -121,7 +121,7 @@ def create_mock_api_response( @pytest.mark.parametrize("override_fps_target", [None, 15, 10]) @pytest.mark.parametrize("override_global_parse", [False, True]) -@pytest.mark.parametrize("requested_model", ["vitallens", "vitallens-2.0"]) +@pytest.mark.parametrize("requested_model", ["vitallens-2.0"]) @patch('requests.post', side_effect=create_mock_api_response) def test_VitalLensRPPGMethod_file_mock(mock_post, mock_resolve_config, request, override_fps_target, override_global_parse, requested_model): api_key = request.getfixturevalue('test_dev_api_key') @@ -146,7 +146,7 @@ def test_VitalLensRPPGMethod_file_mock(mock_post, mock_resolve_config, request, assert live.shape == (test_video_ndarray.shape[0],) @pytest.mark.parametrize("override_fps_target", [None, 15, 10]) -@pytest.mark.parametrize("long", [False, True]) +@pytest.mark.parametrize("long", [True]) @pytest.mark.parametrize("override_global_parse", [False, True]) @pytest.mark.parametrize("requested_model", ["vitallens"]) @patch('requests.post', side_effect=create_mock_api_response) From 401fe2d6a4e71534b8ee8f5e51f2fbf7ac4754d2 Mon Sep 17 00:00:00 2001 From: Philipp Rouast Date: Fri, 4 Sep 2026 16:57:08 +1000 Subject: [PATCH 3/3] =?UTF-8?q?Skip=20redundant=20CI=20run=20on=20dev?= =?UTF-8?q?=E2=86=92main=20promotion=20PRs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b13b15..17a2aa0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,10 @@ on: jobs: linux: - + # Skip only a same-repo PR whose head branch is dev -- that exact commit + # was already tested by the push trigger above. Everything else + # (external PRs, Dependabot) still runs normally. + if: github.event_name != 'pull_request' || github.head_ref != 'dev' runs-on: ubuntu-latest strategy: matrix: @@ -58,7 +61,7 @@ jobs: pytest windows: - + if: github.event_name != 'pull_request' || github.head_ref != 'dev' runs-on: windows-latest steps: - name: Checkout vitallens-python