From d32b54c5cd28fe7afd7be3c850a6550217dbc54c Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 16:28:41 -0600 Subject: [PATCH 01/21] add publishing workflow for test pypi and fix semantic release config --- .github/workflows/python-package.yml | 38 +++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index cc0161c0..3d5f3d37 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -25,4 +25,40 @@ jobs: - run: poetry run poe test - run: poetry run poe check - run: poetry run poe lint - - run: poetry run poe types \ No newline at end of file + - run: poetry run poe types + release: + runs-on: ubuntu-latest + needs: [build-lint-unit-test, integration-test] + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) + environment: + name: testpypi + url: https://test.pypi.org/p/nisystemlink-demo + permissions: + id-token: write + contents: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.GH_TOKEN }} + - name: Install poetry + run: pipx install poetry + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + cache: "poetry" + - run: poetry install + - name: Semantic release + run: | + pip install python-semantic-release==7.34.6 + git config --global user.name "github-actions" + git config --global user.email "action@github.com" + semantic-release publish --noop + env: + GH_TOKEN: ${{secrets.GH_TOKEN}} + - name: Build package + run: poetry build + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From a62c6343a4980d88fd25bfc61ae830a52d5d61b5 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 16:30:17 -0600 Subject: [PATCH 02/21] remove dependency on integration tests that don't exist --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3d5f3d37..3afdb789 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,7 +28,7 @@ jobs: - run: poetry run poe types release: runs-on: ubuntu-latest - needs: [build-lint-unit-test, integration-test] + needs: [build-lint-unit-test] if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) environment: name: testpypi From 5eab0f87edfab8b4b081b181c62d385b54a5f192 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 16:38:08 -0600 Subject: [PATCH 03/21] update token name --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3afdb789..a60487bc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - token: ${{ secrets.GH_TOKEN }} + token: ${{ secrets.GH_REPO_TOKEN }} - name: Install poetry run: pipx install poetry - uses: actions/setup-python@v4 @@ -55,7 +55,7 @@ jobs: git config --global user.email "action@github.com" semantic-release publish --noop env: - GH_TOKEN: ${{secrets.GH_TOKEN}} + GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package run: poetry build - name: Publish to TestPyPI From 4b13cd4369a911258863ed52b1f3c809855fdd91 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 16:41:07 -0600 Subject: [PATCH 04/21] allow non master branch for testing --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a60487bc..78fe17f1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -53,7 +53,7 @@ jobs: pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" git config --global user.email "action@github.com" - semantic-release publish --noop + semantic-release publish --noop --define=branch=${{ github.ref_name }} env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package From e9db430f8719cf58ff23f64f2819ee71a8e35523 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 16:53:14 -0600 Subject: [PATCH 05/21] turn off semantic versioning for now so we can test on real pypi --- .github/workflows/python-package.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 78fe17f1..401fcd4f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -31,8 +31,8 @@ jobs: needs: [build-lint-unit-test] if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) environment: - name: testpypi - url: https://test.pypi.org/p/nisystemlink-demo + name: pypi + url: https://pypi.org/p/nisystemlink-demo permissions: id-token: write contents: write @@ -48,14 +48,15 @@ jobs: python-version: 3.9 cache: "poetry" - run: poetry install - - name: Semantic release - run: | - pip install python-semantic-release==7.34.6 - git config --global user.name "github-actions" - git config --global user.email "action@github.com" - semantic-release publish --noop --define=branch=${{ github.ref_name }} - env: - GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} + # Uncomment when ready to start versioning + # - name: Semantic release + # run: | + # pip install python-semantic-release==7.34.6 + # git config --global user.name "github-actions" + # git config --global user.email "action@github.com" + # semantic-release version --define=branch=${{ github.ref_name }} + # env: + # GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package run: poetry build - name: Publish to TestPyPI From 1aa67b5469966ddadb11caf3ad3e2912f8538df3 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 16:57:43 -0600 Subject: [PATCH 06/21] publish to real pypi --- .github/workflows/python-package.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 401fcd4f..b10d617e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -59,7 +59,5 @@ jobs: # GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package run: poetry build - - name: Publish to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From 9ab4b70191e84e1d1fae449018d2d18a22deb774 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 17:06:25 -0600 Subject: [PATCH 07/21] only run the actions when we're working on the python library not on the examples folder --- .github/workflows/python-package.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b10d617e..c69a88a2 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -3,8 +3,18 @@ name: Python package on: push: branches: [master, main] + paths: + - 'nisystemlink_demo/**' + - 'tests/**' + - 'pyproject.toml' + - '.github/workflows/python-package.yml' pull_request: branches: [master, main] + paths: + - 'nisystemlink_demo/**' + - 'tests/**' + - 'pyproject.toml' + - '.github/workflows/python-package.yml' workflow_dispatch: jobs: From 967868c749a04c7a8b805c931387bb2939b41ac9 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 17:10:56 -0600 Subject: [PATCH 08/21] test versioning --- .github/workflows/python-package.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c69a88a2..48454ac7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -58,15 +58,14 @@ jobs: python-version: 3.9 cache: "poetry" - run: poetry install - # Uncomment when ready to start versioning - # - name: Semantic release - # run: | - # pip install python-semantic-release==7.34.6 - # git config --global user.name "github-actions" - # git config --global user.email "action@github.com" - # semantic-release version --define=branch=${{ github.ref_name }} - # env: - # GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} + - name: Semantic release + run: | + pip install python-semantic-release==7.34.6 + git config --global user.name "github-actions" + git config --global user.email "action@github.com" + semantic-release version --define=branch=${{ github.ref_name }} + env: + GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package run: poetry build - name: Publish to PyPI From 93eee20a1e32c74f9fa4de86380629c28eabe585 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 17:19:17 -0600 Subject: [PATCH 09/21] remove testing bits --- .github/workflows/python-package.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 48454ac7..521e31d9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,6 @@ on: - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' - workflow_dispatch: jobs: build-lint-unit-test: @@ -39,7 +38,7 @@ jobs: release: runs-on: ubuntu-latest needs: [build-lint-unit-test] - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') environment: name: pypi url: https://pypi.org/p/nisystemlink-demo @@ -63,7 +62,7 @@ jobs: pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" git config --global user.email "action@github.com" - semantic-release version --define=branch=${{ github.ref_name }} + semantic-release version env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package From 6e8be969ce93ceda1946825dbbde6a8d24ac928a Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Wed, 3 Dec 2025 17:23:18 -0600 Subject: [PATCH 10/21] update contributing --- CONTRIBUTING.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56502d2b..24a2e60c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -80,6 +80,72 @@ You can also run all checks at once: poetry run poe format && poetry run poe lint && poetry run poe types && poetry run poe test ``` +## Commit Message Convention + +This project uses [Conventional Commits](https://www.conventionalcommits.org/) +for automated versioning and changelog generation. When contributing to the +`nisystemlink_demo` package, please format your commit messages according to +this specification. + +### Commit Message Format + +```md +: + +[optional body] + +[optional footer(s)] +``` + +### Common Types and Version Bumps + +- **`fix:`** - A bug fix (triggers a **PATCH** version bump: 0.1.0 → 0.1.1) + + ```md + fix: correct calculation error in test result processing + ``` + +- **`feat:`** - A new feature (triggers a **MINOR** version bump: 0.1.0 → 0.2.0) + + ```md + feat: add support for querying test results by date range + ``` + +- **`feat!:`** or **`BREAKING CHANGE:`** - A breaking change (triggers a + **MAJOR** version bump: 0.1.0 → 1.0.0) + + ```md + feat!: remove deprecated create_result method + + BREAKING CHANGE: The create_result method has been removed. Use + create_results_and_steps instead. + ``` + +### Other Common Types (no version bump) + +- **`docs:`** - Documentation changes only +- **`style:`** - Code style changes (formatting, whitespace, etc.) +- **`refactor:`** - Code refactoring without changing functionality +- **`test:`** - Adding or updating tests +- **`chore:`** - Maintenance tasks, dependency updates, etc. +- **`ci:`** - CI/CD configuration changes + +### Examples + +```bash +# Patch release (0.1.0 → 0.1.1) +git commit -m "fix: handle empty response from API endpoint" + +# Minor release (0.1.0 → 0.2.0) +git commit -m "feat: add batch delete functionality for test results" + +# Major release (1.0.0 → 2.0.0) +git commit -m "feat!: redesign simulator API with new parameter structure" +``` + +**Note:** Only commits that affect the `nisystemlink_demo/` package, tests, or +configuration files will trigger a release. + ## Security scanning with Snyk This repository uses [Snyk](https://snyk.io/) for security scanning to identify From f20f8fe9a9a2406c639d1953f5b0814e6158ef2f Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:16:22 -0600 Subject: [PATCH 11/21] Update .github/workflows/python-package.yml make python versions consistent Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 521e31d9..c8199263 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -54,7 +54,7 @@ jobs: run: pipx install poetry - uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 cache: "poetry" - run: poetry install - name: Semantic release From a1d22ab73c64bbf6ec68400d98aef71c5b955138 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:17:29 -0600 Subject: [PATCH 12/21] Update .github/workflows/python-package.yml Make step versions consistent Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c8199263..6cc3a315 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -46,13 +46,13 @@ jobs: id-token: write contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.GH_REPO_TOKEN }} - name: Install poetry run: pipx install poetry - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.10 cache: "poetry" From 0cdb146c4d108e3e30dcd0353220de258c6ed12f Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:18:17 -0600 Subject: [PATCH 13/21] Update .github/workflows/python-package.yml use the right action bot email Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6cc3a315..5d76efd3 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -61,7 +61,7 @@ jobs: run: | pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" - git config --global user.email "action@github.com" + git config --global user.email "github-actions[bot]@users.noreply.github.com" semantic-release version env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} From cf3df64f57124e05e99b19e3fa5cefd7888da0f5 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:20:32 -0600 Subject: [PATCH 14/21] put testing back in after a few changes --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5d76efd3..bd7ae171 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -38,7 +38,7 @@ jobs: release: runs-on: ubuntu-latest needs: [build-lint-unit-test] - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) environment: name: pypi url: https://pypi.org/p/nisystemlink-demo @@ -62,7 +62,7 @@ jobs: pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" git config --global user.email "github-actions[bot]@users.noreply.github.com" - semantic-release version + semantic-release version --define=branch=${{ github.ref_name }} env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package From 598609eef74519cd1c567b021ba0720505462014 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:26:23 -0600 Subject: [PATCH 15/21] clarify when we release in CONTRIBUTING --- CONTRIBUTING.md | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 24a2e60c..1d1d9c2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,14 +83,22 @@ poetry run poe format && poetry run poe lint && poetry run poe types && poetry r ## Commit Message Convention This project uses [Conventional Commits](https://www.conventionalcommits.org/) -for automated versioning and changelog generation. When contributing to the -`nisystemlink_demo` package, please format your commit messages according to -this specification. +for automated versioning and changelog generation of the `nisystemlink_demo` +Python package. + +**When conventional commits matter:** + +- Commits to the `nisystemlink_demo/` package code +- Changes to `tests/`, `pyproject.toml`, or the CI workflow +- When merged to the `main` branch + +For other contributions (examples, documentation, etc.), conventional commit +format is optional but still encouraged for consistency. ### Commit Message Format ```md -: +[optional scope]: [optional body] @@ -102,13 +110,15 @@ this specification. - **`fix:`** - A bug fix (triggers a **PATCH** version bump: 0.1.0 → 0.1.1) ```md - fix: correct calculation error in test result processing + fix: correct calculation error in test result processing fix(simulator): + handle empty response from API endpoint ``` - **`feat:`** - A new feature (triggers a **MINOR** version bump: 0.1.0 → 0.2.0) ```md - feat: add support for querying test results by date range + feat: add support for querying test results by date range feat(testdata): add + batch delete functionality for test results ``` - **`feat!:`** or **`BREAKING CHANGE:`** - A breaking change (triggers a @@ -116,6 +126,12 @@ this specification. ```md feat!: remove deprecated create_result method + ``` + + Or with a footer: + + ```md + feat: redesign simulator API BREAKING CHANGE: The create_result method has been removed. Use create_results_and_steps instead. @@ -139,12 +155,24 @@ git commit -m "fix: handle empty response from API endpoint" # Minor release (0.1.0 → 0.2.0) git commit -m "feat: add batch delete functionality for test results" -# Major release (1.0.0 → 2.0.0) -git commit -m "feat!: redesign simulator API with new parameter structure" +# Major release (1.0.0 → 2.0.0) - use commit editor for multi-line +git commit +# Then in the editor: +# feat!: redesign simulator API with new parameter structure +# +# BREAKING CHANGE: Removed create_result(), use create_results_and_steps() ``` -**Note:** Only commits that affect the `nisystemlink_demo/` package, tests, or -configuration files will trigger a release. +**What triggers an automated release:** + +When commits following the conventional format are merged to `main` and affect: + +- `nisystemlink_demo/**` (package source code) +- `tests/**` (test files) +- `pyproject.toml` (package configuration) +- `.github/workflows/python-package.yml` (CI/CD workflow) + +The package will be automatically versioned, tagged, and published to PyPI. ## Security scanning with Snyk From 43ab49fbdac7146478bdf2595ac5ec90e76a84db Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:28:35 -0600 Subject: [PATCH 16/21] add dispatch back to triggers --- .github/workflows/python-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bd7ae171..ac6352a7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,6 +15,7 @@ on: - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' + workflow_dispatch: jobs: build-lint-unit-test: From c66712d9f056a1e3492cbf2e7bbdebd124e14b69 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:33:29 -0600 Subject: [PATCH 17/21] put python version in quotes --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ac6352a7..75bb10df 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -55,7 +55,7 @@ jobs: run: pipx install poetry - uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: '3.10' cache: "poetry" - run: poetry install - name: Semantic release From 0f51cf5a02499a0c23da48ee4987fe38b46e9f9a Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Thu, 4 Dec 2025 15:37:00 -0600 Subject: [PATCH 18/21] remove debug/test code --- .github/workflows/python-package.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 75bb10df..10625a41 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,6 @@ on: - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' - workflow_dispatch: jobs: build-lint-unit-test: @@ -39,7 +38,7 @@ jobs: release: runs-on: ubuntu-latest needs: [build-lint-unit-test] - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') environment: name: pypi url: https://pypi.org/p/nisystemlink-demo @@ -63,7 +62,7 @@ jobs: pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" git config --global user.email "github-actions[bot]@users.noreply.github.com" - semantic-release version --define=branch=${{ github.ref_name }} + semantic-release version env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package From 76507015b36a0308c8f2f4fa133879090aa2a0df Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Mon, 8 Dec 2025 15:53:27 -0600 Subject: [PATCH 19/21] rename package to `nisystemlink-examples` instead of `-demo` --- .github/workflows/python-package.yml | 6 +++--- .vscode/settings.json | 5 +++++ CONTRIBUTING.md | 6 +++--- .../__init__.py | 0 .../testdata/__init__.py | 0 .../testdata/simulator.py | 0 pyproject.toml | 12 ++++++------ tests/testdata/test_simulator.py | 2 +- 8 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 .vscode/settings.json rename {nisystemlink_demo => nisystemlink_examples}/__init__.py (100%) rename {nisystemlink_demo => nisystemlink_examples}/testdata/__init__.py (100%) rename {nisystemlink_demo => nisystemlink_examples}/testdata/simulator.py (100%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 10625a41..b5fbac7a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -4,14 +4,14 @@ on: push: branches: [master, main] paths: - - 'nisystemlink_demo/**' + - 'nisystemlink_examples/**' - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' pull_request: branches: [master, main] paths: - - 'nisystemlink_demo/**' + - 'nisystemlink_examples/**' - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' @@ -41,7 +41,7 @@ jobs: if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') environment: name: pypi - url: https://pypi.org/p/nisystemlink-demo + url: https://pypi.org/p/nisystemlink-examples permissions: id-token: write contents: write diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..d969f962 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.testing.pytestArgs": ["tests"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d1d9c2d..286a51f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,12 +83,12 @@ poetry run poe format && poetry run poe lint && poetry run poe types && poetry r ## Commit Message Convention This project uses [Conventional Commits](https://www.conventionalcommits.org/) -for automated versioning and changelog generation of the `nisystemlink_demo` +for automated versioning and changelog generation of the `nisystemlink_examples` Python package. **When conventional commits matter:** -- Commits to the `nisystemlink_demo/` package code +- Commits to the `nisystemlink_examples/` package code - Changes to `tests/`, `pyproject.toml`, or the CI workflow - When merged to the `main` branch @@ -167,7 +167,7 @@ git commit When commits following the conventional format are merged to `main` and affect: -- `nisystemlink_demo/**` (package source code) +- `nisystemlink_examples/**` (package source code) - `tests/**` (test files) - `pyproject.toml` (package configuration) - `.github/workflows/python-package.yml` (CI/CD workflow) diff --git a/nisystemlink_demo/__init__.py b/nisystemlink_examples/__init__.py similarity index 100% rename from nisystemlink_demo/__init__.py rename to nisystemlink_examples/__init__.py diff --git a/nisystemlink_demo/testdata/__init__.py b/nisystemlink_examples/testdata/__init__.py similarity index 100% rename from nisystemlink_demo/testdata/__init__.py rename to nisystemlink_examples/testdata/__init__.py diff --git a/nisystemlink_demo/testdata/simulator.py b/nisystemlink_examples/testdata/simulator.py similarity index 100% rename from nisystemlink_demo/testdata/simulator.py rename to nisystemlink_examples/testdata/simulator.py diff --git a/pyproject.toml b/pyproject.toml index d0c59eb0..ad567686 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "nisystemlink-demo" +name = "nisystemlink-examples" version = "0.0.0" description = "NI SystemLink examples and demo utilities" authors = ["National Instruments"] @@ -11,7 +11,7 @@ readme = "README.md" keywords = ["nisystemlink", "systemlink"] license = "MIT" packages = [ - {include = "nisystemlink_demo"} + {include = "nisystemlink_examples"} ] [tool.poetry.dependencies] @@ -45,7 +45,7 @@ match = "(main|master)" [tool.poe.tasks] test = "pytest tests" -lint = "flake8 nisystemlink_demo tests" -check = "black --check nisystemlink_demo tests" -format = "black nisystemlink_demo tests" -types = "mypy nisystemlink_demo tests" \ No newline at end of file +lint = "flake8 nisystemlink_examples tests" +check = "black --check nisystemlink_examples tests" +format = "black nisystemlink_examples tests" +types = "mypy nisystemlink_examples tests" \ No newline at end of file diff --git a/tests/testdata/test_simulator.py b/tests/testdata/test_simulator.py index 78447fa4..59ce88d6 100644 --- a/tests/testdata/test_simulator.py +++ b/tests/testdata/test_simulator.py @@ -1,6 +1,6 @@ """Unit tests for the Simulator class.""" -from nisystemlink_demo.testdata.simulator import Simulator +from nisystemlink_examples.testdata.simulator import Simulator class TestSimulator: From 3b69777151f7ceeeb28205f580d46b415f8128f4 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Mon, 8 Dec 2025 15:56:04 -0600 Subject: [PATCH 20/21] add testing back to pipeline --- .github/workflows/python-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b5fbac7a..480505d8 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,6 +15,7 @@ on: - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' + workflow_dispatch: jobs: build-lint-unit-test: @@ -38,7 +39,7 @@ jobs: release: runs-on: ubuntu-latest needs: [build-lint-unit-test] - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) environment: name: pypi url: https://pypi.org/p/nisystemlink-examples @@ -62,7 +63,7 @@ jobs: pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" git config --global user.email "github-actions[bot]@users.noreply.github.com" - semantic-release version + semantic-release version --define=branch=${{ github.ref_name }} env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package From 8c7c956fba32eb3c0056002f6be4fcd65ce99e16 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Mon, 8 Dec 2025 16:02:33 -0600 Subject: [PATCH 21/21] remove testing from pipeline --- .github/workflows/python-package.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 480505d8..9546f901 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,6 @@ on: - 'tests/**' - 'pyproject.toml' - '.github/workflows/python-package.yml' - workflow_dispatch: jobs: build-lint-unit-test: @@ -39,7 +38,7 @@ jobs: release: runs-on: ubuntu-latest needs: [build-lint-unit-test] - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) + if: github.event_name == github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') environment: name: pypi url: https://pypi.org/p/nisystemlink-examples @@ -63,7 +62,7 @@ jobs: pip install python-semantic-release==7.34.6 git config --global user.name "github-actions" git config --global user.email "github-actions[bot]@users.noreply.github.com" - semantic-release version --define=branch=${{ github.ref_name }} + semantic-release version env: GH_TOKEN: ${{secrets.GH_REPO_TOKEN}} - name: Build package