Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub workflows: Test with Python 3.13 and use Python 3.11.9 by default #1061

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions .github/workflows/Publish_NIMS.yml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This poetry.lock is out of date due to the nimi-python <-> grpcio-tools <-> protobuf version conflict.

Run poetry check --lock
  poetry check --lock
  shell: /usr/bin/bash -e {0}
  env:
    POETRY_VERSION: 1.8.[2](https://github.com/ni/measurement-plugin-python/actions/runs/13020781477/job/36320812060#step:5:2)
    PYTHON_VERSION: [3](https://github.com/ni/measurement-plugin-python/actions/runs/13020781477/job/36320812060#step:5:3).11.9
    pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x6[4](https://github.com/ni/measurement-plugin-python/actions/runs/13020781477/job/36320812060#step:5:4)
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.9/x[6](https://github.com/ni/measurement-plugin-python/actions/runs/13020781477/job/36320812060#step:5:6)4/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.[9](https://github.com/ni/measurement-plugin-python/actions/runs/13020781477/job/36320812060#step:5:9)/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
Error: pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.
Error: Process completed with exit code 1.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency: publish_to_pypi
env:
# Versions are also listed in PR.yml
POETRY_VERSION: 1.8.2
PYTHON_VERSION: 3.9
PYTHON_VERSION: 3.11.9

jobs:
check_nims:
Expand All @@ -22,7 +22,7 @@ jobs:
# package version that doesn't exist yet.
build:
name: Build
runs-on : ubuntu-latest
runs-on : ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand All @@ -48,12 +48,12 @@ jobs:
run: |
poetry version ${{ steps.vars.outputs.tag }}
working-directory: ./packages/service

- name: Update NIMG package version based on tag name.
run: |
poetry version ${{ steps.vars.outputs.tag }}
working-directory: ./packages/generator

- name: Update SDK package version based on tag name.
run: |
poetry version ${{ steps.vars.outputs.tag }}
Expand All @@ -71,13 +71,13 @@ jobs:
git commit -m "Promote NIMS and NIMG package version" -a
echo "version_changed=true" >> $GITHUB_OUTPUT
fi

- name: Push changes to the appropriate branch
if: ${{ steps.commit.outputs.version_changed && (startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/')) }}
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.ADMIN_PAT }}
branch: ${{ github.event.release.target_commitish }}
branch: ${{ github.event.release.target_commitish }}
unprotect_reviews: true

# To Test the Publish use : poetry publish --build --username __token__ --password ${{ secrets.TEST_PYPI_TOKEN }} -r test-pypi
Expand All @@ -86,7 +86,7 @@ jobs:
run: |
poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}
working-directory: ./packages/service

- name: Build NIMG Python package and publish to PyPI
if: ${{ startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/') }}
run: |
Expand All @@ -101,7 +101,7 @@ jobs:

- name: Create archives of the examples
env:
EXAMPLE_ARCHIVE: measurement-plugin-python-examples-${{ steps.vars.outputs.tag }}
EXAMPLE_ARCHIVE: measurement-plugin-python-examples-${{ steps.vars.outputs.tag }}
run: |
# Use --prefix for the tarball but not the zip file. Windows zip tools often create a directory automatically.
rm -rf dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
POETRY_VERSION: 1.8.2
PYTHON_VERSION: 3.9
PYTHON_VERSION: 3.11.9

jobs:
check_examples:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_nimg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
POETRY_VERSION: 1.8.2
PYTHON_VERSION: 3.9
PYTHON_VERSION: 3.11.9

jobs:
check_nimg:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_nims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
POETRY_VERSION: 1.8.2
PYTHON_VERSION: 3.9
PYTHON_VERSION: 3.11.9

jobs:
check_nims:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12, 3.13]
# Fail-fast skews the pass/fail ratio and seems to make pytest produce
# incomplete JUnit XML results.
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.9"
python: "3.11"
jobs:
post_create_environment:
- pip install poetry==1.8.2
Expand Down
2 changes: 1 addition & 1 deletion packages/generator/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[tox]
isolated_build = true
envlist = clean, py{38,39,310,311,312}
envlist = clean, py{38,39,310,311,312,313}

[testenv]
skip_install = true
Expand Down
11 changes: 6 additions & 5 deletions packages/service/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python = "^3.8"
# below. Please keep the minimum grpcio version in sync with the grpcio-tools version. Otherwise,
# the generated gRPC stubs may not work with the minimum grpcio version.
grpcio = "^1.49.1"
protobuf = "^4.21"
protobuf = ">=4.21"
pywin32 = {version = ">=303", platform = "win32"}
deprecation = ">=2.1"
# https://github.com/microsoft/tracelogging/issues/58 - traceloggingdynamic raises TypeError with Python 3.8
Expand Down Expand Up @@ -62,14 +62,15 @@ ni-python-styleguide = ">=0.4.1"
# and regenerate gRPC stubs.
grpcio-tools = [
{version = "1.49.1", python = ">=3.8,<3.12"},
{version = "1.59.0", python = "^3.12"},
{version = "1.59.0", python = ">=3.12,<3.13"},
{version = "1.67.0", python = "^3.13"},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incompatible with nimi-python's protobuf version constraint: ni/nimi-python#2075

]
pytest-cov = ">=3.0.0"
pytest-mock = ">=3.0"
tox = ">=4.0"
mypy = ">=1.0"
mypy-protobuf = ">=3.4"
types-protobuf = "^4.21"
types-protobuf = ">=4.21"
types-setuptools = "*"
types-pywin32 = ">=304"
grpc-stubs = "^1.53"
Expand All @@ -79,7 +80,7 @@ types-psutil = ">=6.0"
# we need to include multiple NumPy versions in poetry.lock.
numpy = [
{version = ">=1.22", python = ">=3.8,<3.12"},
{version = ">=1.26", python = ">=3.12,<3.13"},
{version = ">=1.26", python = "^3.12"},
]
bandit = { version = ">=1.7", extras = ["toml"] }

Expand All @@ -89,7 +90,7 @@ optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = [
{version = ">=7.1.2", python = ">=3.8,<3.9"},
{version = ">=7.2.0", python = ">=3.9,<3.13"},
{version = ">=7.2.0", python = "^3.9"},
]
sphinx-rtd-theme = ">=1.0.0"
sphinx-autoapi = ">=1.8.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/service/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[tox]
isolated_build = true
envlist = clean, py{38,39,310,311,312}-all-extras
envlist = clean, py{38,39,310,311,312,313}-all-extras

[testenv]
skip_install = true
Expand Down
Loading