Skip to content

Commit

Permalink
Rename package to ni_measurement_plugin_sdk_generator (#753)
Browse files Browse the repository at this point in the history
Rename to ni_measurement_plugin_sdk_generator
  • Loading branch information
dixonjoel authored Jun 17, 2024
1 parent 426faeb commit e236962
Show file tree
Hide file tree
Showing 28 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Publish_NIMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Update NIMG package version based on tag name.
run: |
poetry version ${{ steps.vars.outputs.tag }}
working-directory: ./ni_measurement_plugin_generator
working-directory: ./ni_measurement_plugin_sdk_generator

- name: Commit file changes
id: commit
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
if: ${{ startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/') }}
run: |
poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}
working-directory: ./ni_measurement_plugin_generator
working-directory: ./ni_measurement_plugin_sdk_generator

- name: Create archives of the examples
env:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/check_nimg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
defaults:
run:
# Set the working-directory for all steps in this job.
working-directory: ./ni_measurement_plugin_generator
working-directory: ./ni_measurement_plugin_sdk_generator
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand All @@ -28,19 +28,19 @@ jobs:
uses: Gr1N/setup-poetry@v9
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Check for lock changes (ni-measurement-plugin-generator)
- name: Check for lock changes (ni-measurement-plugin-sdk-generator)
run: poetry lock --check
- name: Cache virtualenv (ni-measurement-plugin-generator)
- name: Cache virtualenv (ni-measurement-plugin-sdk-generator)
uses: actions/cache@v4
id: cache
with:
path: ni_measurement_plugin_generator/.venv
key: ni-measurement-plugin-generator-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install ni-measurement-plugin-generator
path: ni_measurement_plugin_sdk_generator/.venv
key: ni-measurement-plugin-sdk-generator-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install ni-measurement-plugin-sdk-generator
run: poetry install -v
- name: Lint ni-measurement-plugin-generator
- name: Lint ni-measurement-plugin-sdk-generator
run: poetry run ni-python-styleguide lint
- name: Mypy static analysis (ni-measurement-plugin-generator, Linux)
run: poetry run mypy -p ni_measurement_plugin_generator
- name: Mypy static analysis (ni-measurement-plugin-generator, Windows)
run: poetry run mypy -p ni_measurement_plugin_generator --platform win32
- name: Mypy static analysis (ni-measurement-plugin-sdk-generator, Linux)
run: poetry run mypy -p ni_measurement_plugin_sdk_generator
- name: Mypy static analysis (ni-measurement-plugin-sdk-generator, Windows)
run: poetry run mypy -p ni_measurement_plugin_sdk_generator --platform win32
22 changes: 11 additions & 11 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,25 @@ jobs:
- name: Run unit tests and code coverage (ni-measurement-plugin-sdk-service, all extras)
run: poetry run pytest ./tests/unit -v --cov=ni_measurement_plugin_sdk_service --junitxml=test_results/nims-${{ matrix.os }}-py${{ matrix.python-version}}-all-extras.xml

# ni-measurement-plugin-generator
- name: Restore cached virtualenv (ni-measurement-plugin-generator)
# ni-measurement-plugin-sdk-generator
- name: Restore cached virtualenv (ni-measurement-plugin-sdk-generator)
uses: actions/cache/restore@v4
id: restore-nimg
with:
path: ni_measurement_plugin_generator/.venv
key: ni-measurement-plugin-generator-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install ni-measurement-plugin-generator
path: ni_measurement_plugin_sdk_generator/.venv
key: ni-measurement-plugin-sdk-generator-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install ni-measurement-plugin-sdk-generator
run: poetry install -v
working-directory: ./ni_measurement_plugin_generator
- name: Save cached virtualenv (ni-measurement-plugin-generator)
working-directory: ./ni_measurement_plugin_sdk_generator
- name: Save cached virtualenv (ni-measurement-plugin-sdk-generator)
uses: actions/cache/save@v4
if: steps.restore-nimg.outputs.cache-hit != 'true'
with:
path: ni_measurement_plugin_generator/.venv
path: ni_measurement_plugin_sdk_generator/.venv
key: ${{ steps.restore-nimg.outputs.cache-primary-key }}
- name: Run tests and code coverage (ni-measurement-plugin-generator)
run: poetry run pytest -v --cov=ni_measurement_plugin_generator --junitxml=test_results/nimg-${{ matrix.os }}-py${{ matrix.python-version}}.xml
working-directory: ./ni_measurement_plugin_generator
- name: Run tests and code coverage (ni-measurement-plugin-sdk-generator)
run: poetry run pytest -v --cov=ni_measurement_plugin_sdk_generator --junitxml=test_results/nimg-${{ matrix.os }}-py${{ matrix.python-version}}.xml
working-directory: ./ni_measurement_plugin_sdk_generator

- name: Upload test results
uses: actions/upload-artifact@v3
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,30 +102,30 @@ pip show ni-measurement-plugin-sdk-service

### Developing a minimal Python measurement

1. Install the `ni-measurement-plugin-generator` package.
1. Install the `ni-measurement-plugin-sdk-generator` package.

``` cmd
REM Activate the required virtual environment if any.
pip install ni-measurement-plugin-generator
pip install ni-measurement-plugin-sdk-generator
```

2. Run the `ni-measurement-plugin-generator` tool. Use command line arguments to specify the `display-name` and optionally the `version`, `measurement-type`, and `product-type`.
2. Run the `ni-measurement-plugin-sdk-generator` tool. Use command line arguments to specify the `display-name` and optionally the `version`, `measurement-type`, and `product-type`.

1. Running `ni-measurement-plugin-generator` without optional arguments:
1. Running `ni-measurement-plugin-sdk-generator` without optional arguments:

`ni-measurement-plugin-generator SampleMeasurement`
`ni-measurement-plugin-sdk-generator SampleMeasurement`

'SampleMeasurement' is the display name of your measurement service. Without the optional arguments,
the other arguments are generated for you based on the display name.

2. Running `ni-measurement-plugin-generator` with optional arguments for `measurement-version`, `ui-file`,
2. Running `ni-measurement-plugin-sdk-generator` with optional arguments for `measurement-version`, `ui-file`,
`service-class`, and `description-url`:

`ni-measurement-plugin-generator SampleMeasurement --measurement-version 0.1.0.0 --ui-file MeasurementUI.measui --service-class SampleMeasurement_Python --description-url https://www.example.com/SampleMeasurement.html`
`ni-measurement-plugin-sdk-generator SampleMeasurement --measurement-version 0.1.0.0 --ui-file MeasurementUI.measui --service-class SampleMeasurement_Python --description-url https://www.example.com/SampleMeasurement.html`

3. Running `ni-measurement-plugin-generator` with optional argument for `directory-out`
3. Running `ni-measurement-plugin-sdk-generator` with optional argument for `directory-out`

`ni-measurement-plugin-generator SampleMeasurement --directory-out <new_path_for_created_files>`
`ni-measurement-plugin-sdk-generator SampleMeasurement --directory-out <new_path_for_created_files>`

If no output directory is specified, the files will
be placed in a new folder under the current directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Introduction

MeasurementLink Code Generator for Python (`ni-measurement-plugin-generator`) is a
MeasurementLink Code Generator for Python (`ni-measurement-plugin-sdk-generator`) is a
tool for generating reusable measurement plug-ins using gRPC services.

For installation and usage, see [Measurement Plugin Support for Python (`ni-measurement-plugin-sdk-service`)](https://pypi.org/project/ni-measurement-plugin-sdk-service/).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""""Creates a measurement through use of template.py."""

from ni_measurement_plugin_generator.template import create_measurement
from ni_measurement_plugin_sdk_generator.template import create_measurement

create_measurement()
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "ni_measurement_plugin_generator"
name = "ni_measurement_plugin_sdk_generator"
version = "2.0.0-dev0"
description = "Measurement Plugin Code Generator for Python"
authors = ["NI <[email protected]>"]
Expand Down Expand Up @@ -30,7 +30,7 @@ ni-python-styleguide = ">=0.4.1"
mypy = ">=1.0"

[tool.poetry.scripts]
ni-measurement-plugin-generator = "ni_measurement_plugin_generator.template:create_measurement"
ni-measurement-plugin-sdk-generator = "ni_measurement_plugin_sdk_generator.template:create_measurement"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from ni_measurement_plugin_generator import template
from ni_measurement_plugin_sdk_generator import template


def test___command_line_args___create_measurement___render_without_exception(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Shared fixtures for ni-measurement-plugin-generator tests."""
"""Shared fixtures for ni-measurement-plugin-sdk-generator tests."""

import pathlib

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tool.black]
extend_exclude = '\.tox/|_pb2(_grpc)?\.(py|pyi)$|ni_measurement_plugin_generator/|examples/|third_party/'
extend_exclude = '\.tox/|_pb2(_grpc)?\.(py|pyi)$|ni_measurement_plugin_sdk_generator/|examples/|third_party/'
line-length = 100

[tool.ni-python-styleguide]
extend_exclude = '.tox/,*_pb2_grpc.py,*_pb2_grpc.pyi,*_pb2.py,*_pb2.pyi,ni_measurement_plugin_generator/,examples/,third_party/'
extend_exclude = '.tox/,*_pb2_grpc.py,*_pb2_grpc.pyi,*_pb2.py,*_pb2.pyi,ni_measurement_plugin_sdk_generator/,examples/,third_party/'

[tool.poetry]
name = "ni_measurement_plugin_sdk_service"
Expand Down

0 comments on commit e236962

Please sign in to comment.