You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change pypi package names to use 'MeasurementLink' (#178)
* Rename pypi packages to include MeasurementLink
* Update references to packages in examples
* Rename directory to include MeasurementLink
* Rename generator directory
* Update imports to use ni_measurementlink_service instead of ni_measurement_service
* Update generator directory in publish_nims script
* More usages of ni_measurement_generator
* Udpate contributing.md
* Update readme and contributing docs
* Remove measurement-services-python references after repo rename.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Contributions to MeasurementLink Support for Python are welcome from all!
4
4
5
5
MeasurementLink Support for Python is managed via [git](https://git-scm.com), with the canonical upstream
6
-
repository hosted on [GitHub](https://github.com/ni/measurement-services-python/). The repo contains templates and examples for developing MeasurementLink services in Python.
6
+
repository hosted on [GitHub](https://github.com/ni/measurementlink-python/). The repo contains templates and examples for developing MeasurementLink services in Python.
7
7
8
8
MeasurementLink Support for Python follows a pull-request model for development. If you wish to
9
9
contribute, you will need to create a GitHub account, fork this project, push a
@@ -33,7 +33,7 @@ See [GitHub's official documentation](https://help.github.com/articles/using-pul
33
33
Clone the repo, this will pull the MeasurementLink Support for Python components and related components.
# Updating gRPC stubs when a .proto file is modified
68
68
69
-
The `ni_measurement_service\_internal\stubs` directory contains the auto-generated python files based on MeasurementLink protobuf (.proto) files. The file needs to be replaced whenever there is a change to these .proto files:
69
+
The `ni_measurementlink_service\_internal\stubs` directory contains the auto-generated python files based on MeasurementLink protobuf (.proto) files. The file needs to be replaced whenever there is a change to these .proto files:
@@ -76,7 +76,7 @@ The `ni_measurement_service\_internal\stubs` directory contains the auto-generat
76
76
- nidevice_grpc/README.md
77
77
- nidevice_grpc/session.proto
78
78
79
-
The latest .proto files are available in [Azure Repo](https://dev.azure.com/ni/DevCentral/_git/ASW?path=/Source/Protos). From the Azure Repo manually download and overwrite the proto files under the `ni_measurement_service\_internal\stubs\proto` folder.
79
+
The latest .proto files are available in [Azure Repo](https://dev.azure.com/ni/DevCentral/_git/ASW?path=/Source/Protos). From the Azure Repo manually download and overwrite the proto files under the `ni_measurementlink_service\_internal\stubs\proto` folder.
80
80
81
81
Run `poetry run python scripts/generate_grpc_stubs.py`. This generates the required *.py file for the listed proto files. The required `grpcio-tools` package is already added as a development dependency in pyproject.toml.
82
82
@@ -96,21 +96,21 @@ poetry run ni-python-styleguide fix
96
96
poetry build
97
97
```
98
98
99
-
Running this command from the repo's root directory will generate the tar.gz file and .whl file of ni_measurement_service package to the `dist` directory.
99
+
Running this command from the repo's root directory will generate the tar.gz file and .whl file of ni_measurementlink_service package to the `dist` directory.
100
100
101
101
# Testing
102
102
103
-
`ni-measurement-service` includes tests under the directory `tests\` that exercises the python and grpc modules. The GitHub CI run these tests for PRs targeting the main branch. It is recommended that during development you run the tests locally before creating a PR.
103
+
`ni-measurementlink-service` includes tests under the directory `tests\` that exercises the python and grpc modules. The GitHub CI run these tests for PRs targeting the main branch. It is recommended that during development you run the tests locally before creating a PR.
104
104
105
-
In order to run the `ni-measurement-service` tests locally:
105
+
In order to run the `ni-measurementlink-service` tests locally:
106
106
107
107
## Using Command Line
108
108
109
109
1. Install production dependencies and development dependencies into a venv by running `poetry install`.
110
110
2. Execute the command `poetry run pytest -v` to run the tests, from the repo's root directory.
111
111
112
112
```ps
113
-
(.venv) PS D:\TAF\measurement-services-python> poetry run pytest -v
113
+
(.venv) PS D:\TAF\measurementlink-python> poetry run pytest -v
114
114
```
115
115
116
116
## Using VS code Test Explorer extension(UI)
@@ -121,8 +121,8 @@ Install and configure the `Python Test Explorer for Visual Studio Code` extensio
121
121
122
122
- Install the required dependency by running `poetry install`
123
123
- Activate the virtual environment if not already activated : `.venv\Scripts\activate`
124
-
- Run the command `pytest --cov=ni_measurement_service`, from the repo's root directory **to get the summary of test coverage** in the console.
125
-
- Run the command `pytest --cov-report html:cov_html --cov=ni_measurement_service`, from the repo's root directory **to generate detailed HTML based coverage report**. Upon running, the coverage reports will be created under `<repo_root>\cov_html` directory.
124
+
- Run the command `pytest --cov=ni_measurementlink_service`, from the repo's root directory **to get the summary of test coverage** in the console.
125
+
- Run the command `pytest --cov-report html:cov_html --cov=ni_measurementlink_service`, from the repo's root directory **to generate detailed HTML based coverage report**. Upon running, the coverage reports will be created under `<repo_root>\cov_html` directory.
126
126
127
127
# Developer Certificate of Origin (DCO)
128
128
@@ -154,5 +154,5 @@ Install and configure the `Python Test Explorer for Visual Studio Code` extensio
154
154
155
155
(taken from [developercertificate.org](https://developercertificate.org/))
156
156
157
-
See [LICENSE](https://github.com/ni/measurement-services-python/blob/master/LICENSE)
157
+
See [LICENSE](https://github.com/ni/measurementlink-python/blob/master/LICENSE)
158
158
for details about how MeasurementLink Support for Python is licensed.
Copy file name to clipboardExpand all lines: README.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,13 @@
18
18
-[Appendix: Managing Measurement as Python Package(Project)](#appendix-managing-measurement-as-python-packageproject)
19
19
-[Create and Manage Python Measurement Package using poetry](#create-and-manage-python-measurement-package-using-poetry)
20
20
-[Create and Manage Python Measurement Package using venv](#create-and-manage-python-measurement-package-using-venv)
21
-
-[Create and Manage Python Measurement Package by directly installing `ni-measurement-service` as a system-level package](#create-and-manage-python-measurement-package-by-directly-installing-ni-measurement-service-as-a-system-level-package)
21
+
-[Create and Manage Python Measurement Package by directly installing `ni-measurementlink-service` as a system-level package](#create-and-manage-python-measurement-package-by-directly-installing-ni-measurementlink-service-as-a-system-level-package)
22
22
23
23
---
24
24
25
25
## Introduction
26
26
27
-
MeasurementLink Support for Python (`ni-measurement-service`) is a python framework that enables measurement developers to quickly create python measurements and run them as a service (gRPC).
27
+
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).
28
28
29
29
---
30
30
@@ -60,10 +60,10 @@ The example measurements shared are *poetry-based* projects. Follow the below st
60
60
61
61
```cmd
62
62
cd <path_of_example_measurement>
63
-
REM Example: cd "..\measurement-services-python\examples\dc_measurement"
63
+
REM Example: cd "..\measurementlink-python\examples\dc_measurement"
64
64
```
65
65
66
-
3. Run `poetry install`. This command creates/updates the .venv and installs all the dependencies(including `ni-measurement-service` package) needed for the Example into `.venv`
66
+
3. Run `poetry install`. This command creates/updates the .venv and installs all the dependencies(including `ni-measurementlink-service` package) needed for the Example into `.venv`
67
67
68
68
``` cmd
69
69
poetry install
@@ -92,41 +92,41 @@ Make sure the system has the recommended python version is installed. Install Me
92
92
93
93
``` cmd
94
94
REM Activate the required virtual environment if any.
95
-
pip install ni-measurement-service
95
+
pip install ni-measurementlink-service
96
96
```
97
97
98
98
Check if you have installed the expected version of MeasurementLink Support for Python installed by running the below command:
99
99
100
100
```cmd
101
-
pip show ni-measurement-service
101
+
pip show ni-measurementlink-service
102
102
```
103
103
104
104
### Developing a minimal python measurement
105
105
106
-
1. Install the `ni-measurement-generator` package.
106
+
1. Install the `ni-measurementlink-generator` package.
107
107
108
108
```cmd
109
109
REM Activate the required virtual environment if any.
110
-
pip install ni-measurement-generator
110
+
pip install ni-measurementlink-generator
111
111
```
112
112
113
-
2. Run the `ni-measurement-generator` tool. Use command line arguments to specify the `display-name` and optionally the `version`, `measurement-type`, and `product-type`.
113
+
2. Run the `ni-measurementlink-generator` tool. Use command line arguments to specify the `display-name` and optionally the `version`, `measurement-type`, and `product-type`.
114
114
115
-
1. Running `ni-measurement-generator` without optional arguments:
115
+
1. Running `ni-measurementlink-generator` without optional arguments:
116
116
117
-
`ni-measurement-generator SampleMeasurement`
117
+
`ni-measurementlink-generator SampleMeasurement`
118
118
119
119
'SampleMeasurement' is the display name of your measurement service. Without the optional arguments,
120
120
the other arguments are generated for you based on the display name.
121
121
122
-
2. Running `ni-measurement-generator` with optional arguments for `measurement-version`, `ui-file`,
122
+
2. Running `ni-measurementlink-generator` with optional arguments for `measurement-version`, `ui-file`,
0 commit comments