Repository: ni/measurement-plugin-python (language: python)

Issue:
Change from ni_measurementlink_generator to ni_measurement_plugin_generator
- [x] This contribution adheres to [CONTRIBUTING.md](https://github.com/ni/measurement-services-python/blob/main/CONTRIBUTING.md).

### What does this Pull Request accomplish?

Renames the ni_measurementlink_generator package to ni_measurement_generator.

### Why should this Pull Request be merged?

Removing references to 'MeasurementLink' as the branding has changed.

### What testing has been done?

Ran the generator and tested the measurement.


Discussion / hints:
## Test Results
    30 files  ±0      30 suites  ±0   44m 17s :stopwatch: - 5m 7s
   653 tests ±0     653 :white_check_mark: ±0      0 :zzz: ±0  0 :x: ±0 
16 210 runs  ±0  15 150 :white_check_mark: ±0  1 060 :zzz: ±0  0 :x: ±0 

Results for commit 1920f153. ± Comparison against base commit bca6ea6b.

[test-results]:data:application/gzip;base64,H4sIAFZAX2YC/12Myw6CMBBFf4V07aIztUPxZwytNGkEavpYEf/dohbQ5G7OuclZmHXjENmlEfzUsJhd2umWQ5+cnwsjybaYcqb1JikqXWM25l/d3aMovgnbu/FHDCH48DUhz2sTCKFijYIEubtPFTht6tB98zFr/DS5VIBBh9yCFJ0lBUZrTrbsDNSCIEUoLChE0uz5AuqEtbAPAQAA

:recycle: This comment has been updated with latest results.
@cfuentes-ni @bkeryan I realized our old package name for the generator was ni-measurement-generator, so this would be a revival of that name. We could just delete the old history of that project, I think since it hasn't been updated for over 2 years.
https://pypi.org/manage/project/ni-measurement-generator/releases/
> @cfuentes-ni @bkeryan I realized our old package name for the generator was ni-measurement-generator, so this would be a revival of that name. We could just delete the old history of that project, I think since it hasn't been updated for over 2 years. https://pypi.org/manage/project/ni-measurement-generator/releases/

I would not bother deleting the old history. It's still the same project.



Fix patch:
diff --git a/.github/workflows/Publish_NIMS.yml b/.github/workflows/Publish_NIMS.yml
index b7b5ca56f..c37aa5985 100644
--- a/.github/workflows/Publish_NIMS.yml
+++ b/.github/workflows/Publish_NIMS.yml
@@ -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
@@ -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:
diff --git a/.github/workflows/check_nimg.yml b/.github/workflows/check_nimg.yml
index 7557bd6f1..67c55d58d 100644
--- a/.github/workflows/check_nimg.yml
+++ b/.github/workflows/check_nimg.yml
@@ -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
@@ -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
diff --git a/README.md b/README.md
index 6d71f6564..1b785dac2 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/ni_measurement_plugin_generator/README.md b/ni_measurement_plugin_sdk_generator/README.md
similarity index 96%
rename from ni_measurement_plugin_generator/README.md
rename to ni_measurement_plugin_sdk_generator/README.md
index 1e8219f98..19cfe36a1 100644
--- a/ni_measurement_plugin_generator/README.md
+++ b/ni_measurement_plugin_sdk_generator/README.md
@@ -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/).
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/__main__.py b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/__main__.py
similarity index 51%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/__main__.py
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/__main__.py
index 3e81577fd..ac2033c8a 100644
--- a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/__main__.py
+++ b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/__main__.py
@@ -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()
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/py.typed b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/py.typed
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/py.typed
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/py.typed
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/template.py b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/template.py
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/template.py
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/template.py
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/_helpers.py.mako b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/_helpers.py.mako
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/_helpers.py.mako
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/_helpers.py.mako
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.measproj.mako b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.measproj.mako
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.measproj.mako
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.measproj.mako
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.measui.mako b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.measui.mako
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.measui.mako
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.measui.mako
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.py.mako b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.py.mako
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.py.mako
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.py.mako
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.serviceconfig.mako b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.serviceconfig.mako
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/measurement.serviceconfig.mako
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/measurement.serviceconfig.mako
diff --git a/ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/start.bat.mako b/ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/start.bat.mako
similarity index 100%
rename from ni_measurement_plugin_generator/ni_measurement_plugin_generator/templates/start.bat.mako
rename to ni_measurement_plugin_sdk_generator/ni_measurement_plugin_sdk_generator/templates/start.bat.mako
diff --git a/ni_measurement_plugin_generator/poetry.lock b/ni_measurement_plugin_sdk_generator/poetry.lock
similarity index 100%
rename from ni_measurement_plugin_generator/poetry.lock
rename to ni_measurement_plugin_sdk_generator/poetry.lock
diff --git a/ni_measurement_plugin_generator/poetry.toml b/ni_measurement_plugin_sdk_generator/poetry.toml
similarity index 100%
rename from ni_measurement_plugin_generator/poetry.toml
rename to ni_measurement_plugin_sdk_generator/poetry.toml
diff --git a/ni_measurement_plugin_generator/pyproject.toml b/ni_measurement_plugin_sdk_generator/pyproject.toml
similarity index 90%
rename from ni_measurement_plugin_generator/pyproject.toml
rename to ni_measurement_plugin_sdk_generator/pyproject.toml
index 51131ca6a..5e3e73b86 100644
--- a/ni_measurement_plugin_generator/pyproject.toml
+++ b/ni_measurement_plugin_sdk_generator/pyproject.toml
@@ -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 <opensource@ni.com>"]
@@ -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"]
diff --git a/pyproject.toml b/pyproject.toml
index 2856976bb..da8765489 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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"


Test patch:
diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml
index bfedbd1cf..158056744 100644
--- a/.github/workflows/run_unit_tests.yml
+++ b/.github/workflows/run_unit_tests.yml
@@ -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
diff --git a/ni_measurement_plugin_generator/tests/acceptance/test_generator.py b/ni_measurement_plugin_sdk_generator/tests/acceptance/test_generator.py
similarity index 97%
rename from ni_measurement_plugin_generator/tests/acceptance/test_generator.py
rename to ni_measurement_plugin_sdk_generator/tests/acceptance/test_generator.py
index 1343096ec..749961778 100644
--- a/ni_measurement_plugin_generator/tests/acceptance/test_generator.py
+++ b/ni_measurement_plugin_sdk_generator/tests/acceptance/test_generator.py
@@ -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(
diff --git a/ni_measurement_plugin_generator/tests/conftest.py b/ni_measurement_plugin_sdk_generator/tests/conftest.py
similarity index 74%
rename from ni_measurement_plugin_generator/tests/conftest.py
rename to ni_measurement_plugin_sdk_generator/tests/conftest.py
index 97e672912..6606cf538 100644
--- a/ni_measurement_plugin_generator/tests/conftest.py
+++ b/ni_measurement_plugin_sdk_generator/tests/conftest.py
@@ -1,4 +1,4 @@
-"""Shared fixtures for ni-measurement-plugin-generator tests."""
+"""Shared fixtures for ni-measurement-plugin-sdk-generator tests."""
 
 import pathlib
 
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/SampleMeasurement.serviceconfig b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/SampleMeasurement.serviceconfig
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/SampleMeasurement.serviceconfig
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/SampleMeasurement.serviceconfig
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/_helpers.py b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/_helpers.py
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/_helpers.py
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/_helpers.py
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/measurement.py b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/measurement.py
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/measurement.py
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/measurement.py
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/start.bat b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/start.bat
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement/start.bat
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement/start.bat
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/SampleMeasurement.serviceconfig b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/SampleMeasurement.serviceconfig
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/SampleMeasurement.serviceconfig
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/SampleMeasurement.serviceconfig
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/_helpers.py b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/_helpers.py
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/_helpers.py
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/_helpers.py
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/measurement.py b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/measurement.py
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/measurement.py
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/measurement.py
diff --git a/ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/start.bat b/ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/start.bat
similarity index 100%
rename from ni_measurement_plugin_generator/tests/test_assets/example_renders/measurement_with_annotations/start.bat
rename to ni_measurement_plugin_sdk_generator/tests/test_assets/example_renders/measurement_with_annotations/start.bat