From 0d7bf214468c3148e9159cd27df82257c0577f50 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 10:06:50 -0500 Subject: [PATCH 1/9] Replace Measurement SDK with DiscoveryClient package --- poetry.lock | 122 +++++----------------- pyproject.toml | 2 +- src/nipanel/_panel_client.py | 4 +- src/nipanel/_streamlit_panel.py | 4 +- src/nipanel/streamlit_refresh/__init__.py | 4 +- 5 files changed, 36 insertions(+), 100 deletions(-) diff --git a/poetry.lock b/poetry.lock index 9e52480..cf341ec 100644 --- a/poetry.lock +++ b/poetry.lock @@ -133,7 +133,7 @@ version = "25.1.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.9" -groups = ["main", "lint"] +groups = ["lint"] files = [ {file = "black-25.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:759e7ec1e050a15f89b770cefbf91ebee8917aac5c20483bc2d80a6c3a04df32"}, {file = "black-25.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e519ecf93120f34243e6b0054db49c00a35f84f195d5bce7e9f5cfc578fc2da"}, @@ -327,27 +327,6 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} -[[package]] -name = "click-option-group" -version = "0.5.7" -description = "Option groups missing in Click" -optional = false -python-versions = ">=3.7" -groups = ["main"] -files = [ - {file = "click_option_group-0.5.7-py3-none-any.whl", hash = "sha256:96b9f52f397ef4d916f81929bd6c1f85e89046c7a401a64e72a61ae74ad35c24"}, - {file = "click_option_group-0.5.7.tar.gz", hash = "sha256:8dc780be038712fc12c9fecb3db4fe49e0d0723f9c171d7cda85c20369be693c"}, -] - -[package.dependencies] -click = ">=7.0" - -[package.extras] -dev = ["pre-commit", "pytest"] -docs = ["m2r2", "pallets-sphinx-themes", "sphinx"] -test = ["pytest"] -test-cov = ["pytest", "pytest-cov"] - [[package]] name = "colorama" version = "0.4.6" @@ -507,7 +486,7 @@ version = "2.1.0" description = "A library to handle automated deprecations" optional = false python-versions = "*" -groups = ["main", "examples"] +groups = ["examples"] files = [ {file = "deprecation-2.1.0-py2.py3-none-any.whl", hash = "sha256:a10811591210e1fb0e768a8c25517cabeabcba6f0bf96564f8ff45189f90b14a"}, {file = "deprecation-2.1.0.tar.gz", hash = "sha256:72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff"}, @@ -925,26 +904,6 @@ files = [ docutils = ">=0.19" mistune = "0.8.4" -[[package]] -name = "mako" -version = "1.3.10" -description = "A super-fast templating language that borrows the best ideas from the existing templating languages." -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "mako-1.3.10-py3-none-any.whl", hash = "sha256:baef24a52fc4fc514a0887ac600f9f1cff3d82c61d4d700a1fa84d597b88db59"}, - {file = "mako-1.3.10.tar.gz", hash = "sha256:99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28"}, -] - -[package.dependencies] -MarkupSafe = ">=0.9.2" - -[package.extras] -babel = ["Babel"] -lingua = ["lingua"] -testing = ["pytest"] - [[package]] name = "markdown-it-py" version = "3.0.0" @@ -1144,7 +1103,7 @@ version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.8" -groups = ["main", "lint"] +groups = ["lint"] files = [ {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, @@ -1176,76 +1135,53 @@ pyspark-connect = ["pyspark[connect] (>=3.5.0)"] sqlframe = ["sqlframe (>=3.22.0)"] [[package]] -name = "ni-measurement-plugin-sdk" -version = "2.4.0.dev1" -description = "Measurement Plug-In SDK for Python" +name = "ni-grpc-extensions" +version = "0.1.0.dev0" +description = "gRPC Extensions" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "ni_measurement_plugin_sdk-2.4.0.dev1-py3-none-any.whl", hash = "sha256:fe0adc542b98d73a6977c6d6103d452a8540090e5c3ae2bbdc5c2e4ae32d8052"}, - {file = "ni_measurement_plugin_sdk-2.4.0.dev1.tar.gz", hash = "sha256:2e2a145b65b9a3d084aaba42e167c665f952fac90d9f4fdbf1c6ce2c4af96866"}, + {file = "ni_grpc_extensions-0.1.0.dev0-py3-none-any.whl", hash = "sha256:a5b574d8eae2c9b153cd80083d1f6f51c626ecdef7557d3663c1e16ae44730c0"}, + {file = "ni_grpc_extensions-0.1.0.dev0.tar.gz", hash = "sha256:ed57ebe7eee0802066bf208a5a3e047127886c6fd316643b86b5b50782c1d7cb"}, ] [package.dependencies] -ni-measurement-plugin-sdk-generator = "*" -ni-measurement-plugin-sdk-service = "*" +grpcio = ">=1.49.0,<2.0" +traceloggingdynamic = {version = ">=1.0", markers = "sys_platform == \"win32\""} [[package]] -name = "ni-measurement-plugin-sdk-generator" -version = "2.4.0.dev1" -description = "Measurement Plug-In Code Generator for Python" +name = "ni-measurementlink-discovery-v1-client" +version = "0.1.0.dev0" +description = "gRPC Client for NI Discovery Service" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "ni_measurement_plugin_sdk_generator-2.4.0.dev1-py3-none-any.whl", hash = "sha256:d8609ac9082fd272a85e27456bd6d0e18362ff8d323b240f4a80ed11bf5c6a48"}, - {file = "ni_measurement_plugin_sdk_generator-2.4.0.dev1.tar.gz", hash = "sha256:19fc6ad61241da41b748df75811421ab74f5e6e65e48bba73390e475e39660ee"}, + {file = "ni_measurementlink_discovery_v1_client-0.1.0.dev0-py3-none-any.whl", hash = "sha256:b27abeddb3465e2be3a8142f0884eaeabff82d89040a76d026501d8527064167"}, + {file = "ni_measurementlink_discovery_v1_client-0.1.0.dev0.tar.gz", hash = "sha256:b964d48bc7942fc1eb6bcc5b03ce1a3fb031e9fa19d7d1a92c3c85b92fc44c17"}, ] [package.dependencies] -black = ">=24.8.0" -click = [ - {version = ">=8.1.3", markers = "python_version >= \"3.10\" and python_version < \"4.0\""}, - {version = ">=8.1.3,<8.2.0", markers = "python_version == \"3.9\""}, -] -click-option-group = ">=0.5.6" -grpcio = ">=1.49.1,<2.0.0" -Mako = ">=1.2.1,<2.0.0" -ni-measurement-plugin-sdk-service = ">=2.2.0,<3.0.0" -ni-protobuf-types = ">=0.1.0dev2" -protobuf = ">=4.21" +grpcio = ">=1.49.0,<2.0" +ni-grpc-extensions = ">=0.1.0.dev0" +ni-measurementlink-discovery-v1-proto = ">=0.1.0.dev0" +pywin32 = {version = ">=303", markers = "sys_platform == \"win32\""} [[package]] -name = "ni-measurement-plugin-sdk-service" -version = "2.4.0.dev1" -description = "Measurement Plug-In Support for Python" +name = "ni-measurementlink-discovery-v1-proto" +version = "0.1.0.dev0" +description = "Protobuf data types for NI discovery gRPC APIs" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "ni_measurement_plugin_sdk_service-2.4.0.dev1-py3-none-any.whl", hash = "sha256:c501add4aacdd7795e1cd05d187a1487da1c49504a16f81f1dc96690cb4114e4"}, - {file = "ni_measurement_plugin_sdk_service-2.4.0.dev1.tar.gz", hash = "sha256:9e51d20ea05a3948dad1338aab9e9169dfd0992922d4a4d05b2c086af466ab6e"}, + {file = "ni_measurementlink_discovery_v1_proto-0.1.0.dev0-py3-none-any.whl", hash = "sha256:6e267ae51614703b9835d693264bf888b653e8e40b9a7f7455e99434e5e3d8e7"}, + {file = "ni_measurementlink_discovery_v1_proto-0.1.0.dev0.tar.gz", hash = "sha256:190b62e4d0f59ff8ab4f06b34075d215ac85d4c6fe8b4fb8c4109af5ba07dfb8"}, ] [package.dependencies] -deprecation = ">=2.1" -grpcio = ">=1.49.1,<2.0.0" -ni-protobuf-types = ">=0.1.0dev2" protobuf = ">=4.21" -python-decouple = ">=3.8" -pywin32 = {version = ">=303", markers = "sys_platform == \"win32\""} -traceloggingdynamic = {version = ">=1.0", markers = "sys_platform == \"win32\""} - -[package.extras] -drivers = ["nidaqmx[grpc] (>=0.8.0)", "nidcpower[grpc] (>=1.4.4)", "nidigital[grpc] (>=1.4.4)", "nidmm[grpc] (>=1.4.4)", "nifgen[grpc] (>=1.4.4)", "niscope[grpc] (>=1.4.4)", "niswitch[grpc] (>=1.4.4)"] -nidaqmx = ["nidaqmx[grpc] (>=0.8.0)"] -nidcpower = ["nidcpower[grpc] (>=1.4.4)"] -nidigital = ["nidigital[grpc] (>=1.4.4)"] -nidmm = ["nidmm[grpc] (>=1.4.4)"] -nifgen = ["nifgen[grpc] (>=1.4.4)"] -niscope = ["niscope[grpc] (>=1.4.4)"] -niswitch = ["niswitch[grpc] (>=1.4.4)"] [[package]] name = "ni-panels-v1-proto" @@ -1670,7 +1606,7 @@ version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" -groups = ["main", "lint"] +groups = ["lint"] files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, @@ -1837,7 +1773,7 @@ version = "4.3.8" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.9" -groups = ["main", "lint"] +groups = ["lint"] files = [ {file = "platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4"}, {file = "platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc"}, @@ -2192,7 +2128,7 @@ version = "3.8" description = "Strict separation of settings from code." optional = false python-versions = "*" -groups = ["main", "examples"] +groups = ["examples"] files = [ {file = "python-decouple-3.8.tar.gz", hash = "sha256:ba6e2657d4f376ecc46f77a3a615e058d93ba5e465c01bbe57289bfb7cce680f"}, {file = "python_decouple-3.8-py3-none-any.whl", hash = "sha256:d0d45340815b25f4de59c974b855bb38d03151d81b037d9e3f463b0c9f8cbd66"}, @@ -3104,7 +3040,7 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" -groups = ["main", "docs", "lint", "test"] +groups = ["docs", "lint", "test"] markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, @@ -3341,4 +3277,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.9,<4.0,!=3.9.7" -content-hash = "f69f750c851b8db71435615ba4b2929413e2a51a4b690902378a965d67beb0f1" +content-hash = "d41a17f534638cea147bc12a60b6ebc584eb1a9473d9988d7743b49b54a4984b" diff --git a/pyproject.toml b/pyproject.toml index 0917a27..9059589 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,12 +17,12 @@ requires-poetry = '>=2.1,<3.0' python = ">=3.9,<4.0,!=3.9.7" # Exclude 3.9.7 due to streamlit not supporting it grpcio = {version=">=1.49.0,<2.0"} protobuf = {version=">=4.21"} -ni-measurement-plugin-sdk = {version=">=2.4.0dev1", allow-prereleases = true } typing-extensions = ">=4.13.2" streamlit = ">=1.24" nitypes = {version=">=0.1.0dev8", allow-prereleases=true} numpy = ">=1.22" debugpy = ">=1.8.1" +ni-measurementlink-discovery-v1-client = { version = ">=0.1.0dev0", allow-prereleases = true } ni-protobuf-types = { version = ">=0.1.0dev3", allow-prereleases = true } ni-panels-v1-proto = { version = ">=0.1.0dev1", allow-prereleases = true } diff --git a/src/nipanel/_panel_client.py b/src/nipanel/_panel_client.py index bbf1724..242061e 100644 --- a/src/nipanel/_panel_client.py +++ b/src/nipanel/_panel_client.py @@ -7,6 +7,7 @@ import grpc from google.protobuf.any_pb2 import Any +from ni.measurementlink.discovery.v1.client import DiscoveryClient from ni.panels.v1.panel_service_pb2 import ( EnumeratePanelsRequest, GetValueRequest, @@ -17,8 +18,7 @@ ) from ni.panels.v1.panel_service_pb2_grpc import PanelServiceStub from ni.panels.v1.streamlit_panel_configuration_pb2 import StreamlitPanelConfiguration -from ni_measurement_plugin_sdk_service.discovery import DiscoveryClient -from ni_measurement_plugin_sdk_service.grpc.channelpool import GrpcChannelPool +from ni_grpc_extensions.channelpool import GrpcChannelPool from typing_extensions import ParamSpec from nipanel._convert import ( diff --git a/src/nipanel/_streamlit_panel.py b/src/nipanel/_streamlit_panel.py index c33456a..79df84a 100644 --- a/src/nipanel/_streamlit_panel.py +++ b/src/nipanel/_streamlit_panel.py @@ -5,8 +5,8 @@ from typing import final import grpc -from ni_measurement_plugin_sdk_service.discovery import DiscoveryClient -from ni_measurement_plugin_sdk_service.grpc.channelpool import GrpcChannelPool +from ni.measurementlink.discovery.v1.client import DiscoveryClient +from ni_grpc_extensions.channelpool import GrpcChannelPool from nipanel._panel_value_accessor import PanelValueAccessor diff --git a/src/nipanel/streamlit_refresh/__init__.py b/src/nipanel/streamlit_refresh/__init__.py index 72c35ac..c79dcfc 100644 --- a/src/nipanel/streamlit_refresh/__init__.py +++ b/src/nipanel/streamlit_refresh/__init__.py @@ -4,8 +4,8 @@ import threading -from ni_measurement_plugin_sdk_service.discovery import DiscoveryClient -from ni_measurement_plugin_sdk_service.grpc.channelpool import GrpcChannelPool +from ni.measurementlink.discovery.v1.client import DiscoveryClient +from ni_grpc_extensions.channelpool import GrpcChannelPool from streamlit.components.v1 import declare_component from streamlit.components.v1.custom_component import CustomComponent From 9d2843052382d8ff05147ee2026d55c30c24bb72 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 10:17:30 -0500 Subject: [PATCH 2/9] One more --- src/nipanel/_panel_value_accessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nipanel/_panel_value_accessor.py b/src/nipanel/_panel_value_accessor.py index 600d40e..63cfc25 100644 --- a/src/nipanel/_panel_value_accessor.py +++ b/src/nipanel/_panel_value_accessor.py @@ -8,8 +8,8 @@ import grpc import hightime as ht import nitypes.bintime as bt -from ni_measurement_plugin_sdk_service.discovery import DiscoveryClient -from ni_measurement_plugin_sdk_service.grpc.channelpool import GrpcChannelPool +from ni.measurementlink.discovery.v1.client import DiscoveryClient +from ni_grpc_extensions.channelpool import GrpcChannelPool from nitypes.time import convert_datetime from nipanel._panel_client import _PanelClient From 5d66c93ce32d715583c371d49cec40d6740d3c28 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 11:06:11 -0500 Subject: [PATCH 3/9] Bump to grpc extensions to get py.typed markers. --- poetry.lock | 8 ++++---- pyproject.toml | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index cf341ec..fe532bc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1136,14 +1136,14 @@ sqlframe = ["sqlframe (>=3.22.0)"] [[package]] name = "ni-grpc-extensions" -version = "0.1.0.dev0" +version = "0.1.0.dev1" description = "gRPC Extensions" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] files = [ - {file = "ni_grpc_extensions-0.1.0.dev0-py3-none-any.whl", hash = "sha256:a5b574d8eae2c9b153cd80083d1f6f51c626ecdef7557d3663c1e16ae44730c0"}, - {file = "ni_grpc_extensions-0.1.0.dev0.tar.gz", hash = "sha256:ed57ebe7eee0802066bf208a5a3e047127886c6fd316643b86b5b50782c1d7cb"}, + {file = "ni_grpc_extensions-0.1.0.dev1-py3-none-any.whl", hash = "sha256:171a16303a2cfcbd2f29ad5df448bf6b89b399be3ba52fc0c2e755c2e7075075"}, + {file = "ni_grpc_extensions-0.1.0.dev1.tar.gz", hash = "sha256:99af79ab9054b15b8682c9540ea4e474236bfaab0b271b42731ba9fd2c5bb4c7"}, ] [package.dependencies] @@ -3277,4 +3277,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.9,<4.0,!=3.9.7" -content-hash = "d41a17f534638cea147bc12a60b6ebc584eb1a9473d9988d7743b49b54a4984b" +content-hash = "a76c5ab5422ae01f3acd30e4d2264c5b05cb26123c03e18c9b60bdc8417232c8" diff --git a/pyproject.toml b/pyproject.toml index 9059589..ad63e82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ streamlit = ">=1.24" nitypes = {version=">=0.1.0dev8", allow-prereleases=true} numpy = ">=1.22" debugpy = ">=1.8.1" +ni-grpc-extensions = { version = ">=0.1.0.dev1", allow-prereleases = true } ni-measurementlink-discovery-v1-client = { version = ">=0.1.0dev0", allow-prereleases = true } ni-protobuf-types = { version = ">=0.1.0dev3", allow-prereleases = true } ni-panels-v1-proto = { version = ">=0.1.0dev1", allow-prereleases = true } From a597c7a93578e2bd92c0c0d3b0f3ca662fbe2458 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 11:26:47 -0500 Subject: [PATCH 4/9] Create publish workflow. --- .github/workflows/publish.yml | 98 +++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b17e7a8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,98 @@ +name: Publish nipanel + +on: + release: + types: [published] + workflow_dispatch: + inputs: + environment: + description: The environment to publish to. + default: 'none' + required: true + type: choice + options: + - none + - pypi + - testpypi + +env: + dist-artifact-name: nipanel-distribution-packages + environment: ${{ github.event_name == 'release' && 'pypi' || inputs.environment }} + environment-info: | + { + "pypi": { + "base-url": "https://pypi.org", + "upload-url": "https://upload.pypi.org/legacy/" + }, + "testpypi": { + "base-url": "https://test.pypi.org", + "upload-url": "https://test.pypi.org/legacy/" + } + } + +jobs: + check_nipanel: + name: Check nipanel + uses: ./.github/workflows/check_nipanel.yml + check_docs: + name: Check docs + uses: ./.github/workflows/check_docs.yml + build_nipanel: + name: Build nipanel + runs-on: ubuntu-latest + needs: [check_nipanel, check_docs] + steps: + - name: Check out repo + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Set up Python + uses: ni/python-actions/setup-python@f0276f7f58868ec0d0d1a86377287c9e6fe0c6e7 # v0.5.0 + - name: Set up Poetry + uses: ni/python-actions/setup-poetry@f0276f7f58868ec0d0d1a86377287c9e6fe0c6e7 # v0.5.0 + - name: Check project version + if: github.event_name == 'release' + uses: ni/python-actions/check-project-version@f0276f7f58868ec0d0d1a86377287c9e6fe0c6e7 # v0.5.0 + - name: Build distribution packages + run: poetry build + - name: Upload build artifacts + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: ${{ env.dist-artifact-name }} + path: dist/* + publish_to_pypi: + name: Publish nipanel to PyPI + if: github.event_name == 'release' || inputs.environment != 'none' + runs-on: ubuntu-latest + needs: [build_nipanel] + environment: + # This logic is duplicated because `name` doesn't support the `env` context. + name: ${{ github.event_name == 'release' && 'pypi' || inputs.environment }} + url: ${{ fromJson(env.environment-info)[env.environment].base-url }}/p/nipanel + permissions: + id-token: write + steps: + - name: Download build artifacts + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + with: + name: ${{ env.dist-artifact-name }} + path: dist/ + - run: ls -lR + - name: Upload to ${{ env.environment }} + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 + with: + repository-url: ${{ fromJson(env.environment-info)[env.environment].upload-url }} + update_version: + name: Update nipanel version + runs-on: ubuntu-latest + needs: [build_nipanel] + permissions: + contents: write + pull-requests: write + steps: + - name: Check out repo + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Set up Python + uses: ni/python-actions/setup-python@f0276f7f58868ec0d0d1a86377287c9e6fe0c6e7 # v0.5.0 + - name: Set up Poetry + uses: ni/python-actions/setup-poetry@f0276f7f58868ec0d0d1a86377287c9e6fe0c6e7 # v0.5.0 + - name: Update project version + uses: ni/python-actions/update-project-version@f0276f7f58868ec0d0d1a86377287c9e6fe0c6e7 # v0.5.0 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ad63e82..01e35aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nipanel" -version = "0.1.0" +version = "0.1.0-dev0" description = "NI Panel Python API" authors = [{name = "NI", email = "opensource@ni.com"}] readme = "README.md" From d5e70739dafc37771ca49bdeffb0af5ba0507d39 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 13:21:50 -0500 Subject: [PATCH 5/9] Add push to enable workflow --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b17e7a8..5f8bbe1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,6 +14,7 @@ on: - none - pypi - testpypi + push: env: dist-artifact-name: nipanel-distribution-packages From 419b95271151b4573ecdadf11fdccc861f5ea542 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 13:24:07 -0500 Subject: [PATCH 6/9] testpypi --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5f8bbe1..bd666bb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ on: env: dist-artifact-name: nipanel-distribution-packages - environment: ${{ github.event_name == 'release' && 'pypi' || inputs.environment }} + environment: ${{ github.event_name == 'release' && 'testpypi' || inputs.environment }} environment-info: | { "pypi": { @@ -66,7 +66,7 @@ jobs: needs: [build_nipanel] environment: # This logic is duplicated because `name` doesn't support the `env` context. - name: ${{ github.event_name == 'release' && 'pypi' || inputs.environment }} + name: ${{ github.event_name == 'release' && 'testpypi' || inputs.environment }} url: ${{ fromJson(env.environment-info)[env.environment].base-url }}/p/nipanel permissions: id-token: write From c68ded89e8f8e552418cdc7cf81243b0502f9d33 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 13:29:06 -0500 Subject: [PATCH 7/9] Remove push. --- .github/workflows/publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bd666bb..0cbb063 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,6 @@ on: - none - pypi - testpypi - push: env: dist-artifact-name: nipanel-distribution-packages From 0a7bc177551d0322df31d8a0e8b11e5f5f7e217c Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 13:36:55 -0500 Subject: [PATCH 8/9] Debug --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0cbb063..b925174 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ on: inputs: environment: description: The environment to publish to. - default: 'none' + default: 'testpypi' required: true type: choice options: From 06746d683ed3888686df04aaaa6d68151a18ec75 Mon Sep 17 00:00:00 2001 From: Johann Scholtz Date: Thu, 28 Aug 2025 13:45:27 -0500 Subject: [PATCH 9/9] Get reading to deploy to production PyPI. --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b925174..b17e7a8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ on: inputs: environment: description: The environment to publish to. - default: 'testpypi' + default: 'none' required: true type: choice options: @@ -17,7 +17,7 @@ on: env: dist-artifact-name: nipanel-distribution-packages - environment: ${{ github.event_name == 'release' && 'testpypi' || inputs.environment }} + environment: ${{ github.event_name == 'release' && 'pypi' || inputs.environment }} environment-info: | { "pypi": { @@ -65,7 +65,7 @@ jobs: needs: [build_nipanel] environment: # This logic is duplicated because `name` doesn't support the `env` context. - name: ${{ github.event_name == 'release' && 'testpypi' || inputs.environment }} + name: ${{ github.event_name == 'release' && 'pypi' || inputs.environment }} url: ${{ fromJson(env.environment-info)[env.environment].base-url }}/p/nipanel permissions: id-token: write