Releases: ni/measurement-plugin-python
MeasurementLink Support for Python v1.2.0-dev3
What's Changed
- Bug fixes
- Fix the discovery service to not terminate on parent process closure by @samchris007 in #391
- Importing nidcpower.session into output voltage measurement (#399) by @DelpireNI in #406
- Fix pywintypes error during the launch of the discovery service after a fresh install of MeasurementLink by @samchris007 in #407
- Update reserve_session to roll back on error (#401) by @bkeryan in #409
Full Changelog: 1.2.0-dev2...1.2.0-dev3
MeasurementLink Support for Python v1.2.0-dev2
What's Changed
- Support for Python services returning DoubleXYData
- Add encoder and decoder for DoubleXYData by @dixonjoel in #358
- Game of Life example by @dixonjoel in #360
- Examples
- Misc improvements and refactoring
- Log exceptions in more cases by @bkeryan in #371
- Only service interfaces listed in .serviceconfig file by @dixonjoel in #368
- Split GrpcChannelPool into a separate submodule by @bkeryan in #376
- Add type hints and clean up documentation for encoders and decoders by @dixonjoel in #367
- Disallow untyped defs by @bkeryan in #379
- Revise docstrings for info.py by @bkeryan in #378
Full Changelog: 1.2.0-dev1...1.2.0-dev2
MeasurementLink Support for Python v1.2.0-dev1
What's Changed
- Improved support for automatically launching the discovery service
- Stop discovery service terminating in debug mode by @MounikaBattu17 in #345
- Killing the discovery service started by the test environment by @MounikaBattu17 in #346
- Improve error handling in measurement register with discovery service by @MounikaBattu17 in #353
- Preparation for supporting more data types by @dixonjoel in #352 #354 #357
- Improved logging and ETW tracing by @bkeryan in #347 #361
- Fix mypy errors with types-protobuf 4.24 by @bkeryan in #362
- Examples
- Add measurement example involving NI-DCPower and NI-VISA DMM instruments by @samchris007 in #323
- Update examples to centralize USE_SIMULATION in _constants.py by @dixonjoel in #348
- Read serviceconfig path from
__file__or exe location by @DelpireNI in #355 - Remove unused TypeVar from _helpers.py by @dixonjoel in #363
- Make enum zero translation more readable by @bkeryan in #365
Full Changelog: 1.2.0-dev0...1.2.0-dev1
MeasurementLink Support for Python v1.2.0-dev0
What's Changed
- Added support for service annotations by @gpachecoNI in #291 #294 #296 #338
- The
.serviceconfigfile now supports specifying additional information about the measurement via theannotationsdictionary. - Example:
"annotations": { "ni/service.description": "Measure inrush current with a shorted load.", "ni/service.collection": "CurrentTests.Inrush", "ni/service.tags": [ "powerup", "current" ] }ni-measurementlink-generatornow supports generating theannotationsdictionary. By default, it setsni/service.description,ni/service.collection, andni/service.tagsto empty values. You can specify values with the--description,--collection, and--tagscommand line options.
- The
- Added support for protobuf enums by @WesleyTangNationalInstruments in #328
- The protobuf generated code for enums does not use the Python
enummodule. Instead, it uses integers and provides a subclass of EnumTypeWrapper describing the enum value mapping. - When you use the
configurationandoutputdecorators to specify measurement parameters, you can now specify either anenum.Enumsubclass or anEnumTypeWrapperinstance forenum_type.
- The protobuf generated code for enums does not use the Python
- Improved support for automatically launching the discovery service
- Examples
- Minor updates and improvements not listed here
New Contributors
- @gpachecoNI made their first contribution in #291
- @MounikaBattu17 made their first contribution in #340
Full Changelog: 1.1.0...1.2.0-dev0
MeasurementLink Support for Python v1.1.0
What's Changed
- Added support for updating the measurement UI during a measurement.
- To send UI updates while the measurement is running, use the
yieldkeyword instead of thereturnkeyword to "return" the measurement's output tuple. This turns the measurement function into a Python generator function, which allows it to "return" the output tuple multiple times. - When using
yield, it is not necessary to usereturn. If you use bothyieldandreturn, MeasurementLink treats thereturnlike a finalyield. - This feature is intended for interactive usage with InstrumentStudio. In TestStand, only the final UI update is returned.
- This feature requires MeasurementLink 2023 Q3.
- To send UI updates while the measurement is running, use the
- Added support for enums.
- To use an enum type for a configuration or output, pass
nims.DataType.Enumfor the data type and specify theenum_typekeyword argument. - Example:
@measurement_service.configuration("measurement_type", nims.DataType.Enum, Function.DC_VOLTS, enum_type=Function) - This feature requires MeasurementLink 2023 Q3.
- To use an enum type for a configuration or output, pass
- Added support for version 2 of the
MeasurementServiceinterface.- This is required for both the UI update and enum features.
ni-measurementlink-servicenow reads the service's provided interfaces from the.serviceconfigfile. When you update your services to depend onni-measurementlink-serviceversion 1.1 or later, you should update their.serviceconfigfiles to specify both versions of the measurement service interface:
"providedInterfaces": [ "ni.measurementlink.measurement.v1.MeasurementService", "ni.measurementlink.measurement.v2.MeasurementService" ], - Manually launching a measurement service now automatically starts the discovery service just-in-time by @vigkre in #290
- Example improvements:
- Simplified TestStand sequences by reducing the number of setup/cleanup steps and moving them into the main sequence.
- Refactored command line option handling to reduce amount of boilerplate in
measurement.py. - Added a
nidigital_spiexample. - Updated modular instrument examples to use session-based simulation by default.
- Add a
ui_progress_updatesexample by @bkeryan in #266 - Update the
nidaqmx_analog_input_measurementexample to use the NI gRPC Device Server and MeasurementLink Session Management Service by @samchris007 in #268 - Update docs to redirect users to the appropriate release by @bkeryan in #265
- Use NXG/fuse controls for LabVIEW measurement UIs by @pbirkhol-ni in #272
- Added common helper method to reserve and create session for NI-DCPower Example by @vigkre in #263
- Update other examples to match NI-DCPower example changes. by @subash-suresh in #284
- Create predictable Streaming Measurement example and write automated tests by @DelpireNI in #279
- Disable result recording in Setup and Cleanup block steps by @Tharun-Sundar in #278
- NI-Digital: Use timing and levels sheet names rather than paths by @jonathanmendez in #282
- Add helper to get session information based on pin name by @subash-suresh in #276
- Simplify reserve call by extracting reservation timeout constant by @bkeryan in #300
- Add helper to get session information based on pin name by @subash-suresh in #276
- Update Example Services' TestStand Sequences for Enum Support by @WesleyTangNationalInstruments in #295
- Simplify single-session measurements by @bkeryan in #287
- The
SessionManagementClientclass now has a singularreserve_session()method, in addition to the pluralreserve_sessions()method. reserve_session()validates that exactly one session was reserved and returns aSingleSessionReservationobject, wherereservation.session_infois a singleSessionInformationobject.reserve_sessions()allows reserving any number of sessions and returns aMultiSessionReservationobject, wherereservation.session_infois a list ofSessionInformationobjects.
- The
- ni-measurementlink-generator
- Update measurement template to include helpers.py files by @subash-suresh in #293
- Type checking and auto-complete improvements
- Added a
py.typedmarker, which indicates thatni-measurementlink-servicesupports type checking with tools such as mypy and pyright. - Use grpc-stubs for type information by @bkeryan in #275
- Add missing type info to MeasurementContext & use correct types by @bkeryan in #281
- Fix imports in
.pyitype stubs by @bkeryan in #280 - Generate
.pyitype stubs for gRPC client stub classes by @bkeryan in #292
- Added a
- bugfix: 'gbk' codec can't decode byte by @LawsonGu in #240
- Various minor bug fixes and improvements not listed here
New Contributors
- @LawsonGu made their first contribution in #240
- @Tharun-Sundar made their first contribution in #249
Full Changelog: 1.0.1...1.1.0
MeasurementLink Support for Python v1.1.0-dev2
What's Changed
- Added support for enums by @WesleyTangNationalInstruments in #288
- To use an enum type for a configuration or output, pass
nims.DataType.Enumfor the data type and specify theenum_typekeyword argument. - Example:
@measurement_service.configuration("measurement_type", nims.DataType.Enum, Function.DC_VOLTS, enum_type=Function)
- To use an enum type for a configuration or output, pass
ServiceInfonow gets the provided interfaces from the.serviceconfigfile by @DelpireNI in #274- Example improvements
- Use NXG/fuse controls for LabVIEW measurement UIs by @pbirkhol-ni in #272
- Added common helper method to reserve and create session for NI-DCPower Example by @vigkre in #263
- Update other examples to match NI-DCPower example changes. by @subash-suresh in #284
- Create predictable Streaming Measurement example and write automated tests by @DelpireNI in #279
- Disable result recording in Setup and Cleanup block steps by @Tharun-Sundar in #278
- NI-Digital: Use timing and levels sheet names rather than paths by @jonathanmendez in #282
- Add helper to get session information based on pin name by @subash-suresh in #276
- Simplify reserve call by extracting reservation timeout constant by @bkeryan in #300
- Simplify single-session measurements by @bkeryan in #287
- The
SessionManagementClientclass now has a singularreserve_session()method, in addition to the pluralreserve_sessions()method. reserve_session()validates that exactly one session was reserved and returns aSingleSessionReservationobject, wherereservation.session_infois a singleSessionInformationobject.reserve_sessions()allows reserving any number of sessions and returns aMultiSessionReservationobject, wherereservation.session_infois a list ofSessionInformationobjects.
- The
- ni-measurementlink-generator
- Update measurement template to include helpers.py files by @subash-suresh in #293
- Type checking and auto-complete improvements
- Various minor bug fixes and improvements not listed here
Full Changelog: 1.1.0-dev1...1.1.0-dev2
MeasurementLink Support for Python v1.1.0-dev1
This is a prerelease of MeasurementLink Support for Python (ni-measurementlink-service) version 1.1.0.
Documentation on using this package can be found in the README.
What's Changed
- Examples:
Full Changelog: 1.1.0-dev0...1.1.0-dev1
MeasurementLink Support for Python v1.1.0-dev0
This is a prerelease of MeasurementLink Support for Python (ni-measurementlink-service) version 1.1.0.
Documentation on using this package can be found in the README.
What's Changed
- Added support for
measurement_service.protoversion 2. - Added support for updating the measurement UI during a measurement. This feature requires MeasurementLink 2023 Q3, which is not released yet.
- Added a
py.typedmarker, which indicates thatni-measurementlink-servicesupports type checking with tools such as mypy. - Example improvements:
- Simplified TestStand sequences by reducing the number of setup/cleanup steps and moving them into the main sequence.
- Refactored command line option handling to reduce amount of boilerplate in
measurement.py. - Added a
nidigital_spiexample. - Updated modular instrument examples to use session-based simulation by default.
- bugfix: 'gbk' codec can't decode byte by @LawsonGu in #240
- Various minor bug fixes and improvements
New Contributors
- @LawsonGu made their first contribution in #240
- @Tharun-Sundar made their first contribution in #249
- @vigkre made their first contribution in #254
Full Changelog: 1.0.1...1.1.0-dev0
MeasurementLink Support for Python v1.0.1
MeasurementLink Support for Python (ni-measurementlink-service) is a Python framework that enables measurement developers to quickly create Python measurements and run them as a service (gRPC).
What's Changed
- Various minor bug fixes and improvements
Full Changelog: 1.0.0...1.0.1
Dependencies
- Python >= 3.8 (3.9 recommended)
- grpcio >= 1.49.1, < 2.x
- protobuf >= 4.21, < 5.x
- pywin32 >= 303 (Only for Windows)
Installation
Make sure the system has the recommended Python version installed.
Install the latest NIMS Framework using pip.
REM Activate the required virtual environment if any.
pip install ni-measurementlink-serviceInstall the ni-measurementlink-generator to create measurement services
REM Activate the required virtual environment if any.
pip install ni-measurementlink-generatorMeasurementLink Support for Python v1.0.0
MeasurementLink Support for Python (ni-measurementlink-service) is a Python framework that enables measurement developers to quickly create Python measurements and run them as a service (gRPC).
What's Changed
- Update Development Status to Production / Stable
Full Changelog: 0.12.2...1.0.0
Dependencies
- Python >= 3.8 (3.9 recommended)
- grpcio >= 1.49.1, < 2.x
- protobuf >= 4.21, < 5.x
- pywin32 >= 303 (Only for Windows)
Installation
Make sure the system has the recommended Python version installed.
Install the latest NIMS Framework using pip.
REM Activate the required virtual environment if any.
pip install ni-measurementlink-serviceInstall the ni-measurementlink-generator to create measurement services
REM Activate the required virtual environment if any.
pip install ni-measurementlink-generator