Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-personality RFmx examples. #912

Merged
merged 35 commits into from
Sep 19, 2023
Merged

Multi-personality RFmx examples. #912

merged 35 commits into from
Sep 19, 2023

Conversation

yardov
Copy link
Contributor

@yardov yardov commented Apr 12, 2023

What does this Pull Request accomplish?

How to mix multiple RFmx personalities using gRPC. It was not clear to me before if we needed to initialize each personality and keep track of the instrument variable.

Why should this Pull Request be merged?

Show customers how to do this programming.

What testing has been done?

Simple execution of the code. This mixes other two existing examples in the same one.

Gerardo Orozco and others added 25 commits February 1, 2023 11:36
Signed-off-by: Gerardo Orozco <gorozco@ni.com>
Thank you

Co-authored-by: Ryan Eckenrode <77176215+reckenro@users.noreply.github.com>
Co-authored-by: Ryan Eckenrode <77176215+reckenro@users.noreply.github.com>
Co-authored-by: Ryan Eckenrode <77176215+reckenro@users.noreply.github.com>
Co-authored-by: Ryan Eckenrode <77176215+reckenro@users.noreply.github.com>
Copy link
Collaborator

@reckenro reckenro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just some small tweaks needed and questions.

Also, before you submit make sure to update the PR title.

@shastriUF
Copy link
Member

We are branching for the 2.2 release, this change has open conversations and potentially conflicts with #878 . I recommend we wait to submit this after the release

yardov and others added 4 commits September 14, 2023 12:42
Trying to get this example in the release at some point.

Co-authored-by: Ryan Eckenrode <77176215+reckenro@users.noreply.github.com>
Copy link
Contributor Author

@yardov yardov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finishing my review.

examples/nirf/rfsa-rfsg-NR-analysis-only-modacc.py Outdated Show resolved Hide resolved
examples/nirf/rfsa-rfsg-NR-analysis-only-modacc.py Outdated Show resolved Hide resolved
examples/nirf/rfsa-rfsg-NR-analysis-only-modacc.py Outdated Show resolved Hide resolved
source/codegen/stage_client_files.py Show resolved Hide resolved
@yardov
Copy link
Contributor Author

yardov commented Sep 15, 2023

Does anyone know why this failed?
I tried to run mypy externally with those flags and I do not get any error.

@reckenro
Copy link
Collaborator

reckenro commented Sep 15, 2023

Does anyone know why this failed? I tried to run mypy externally with those flags and I do not get any error.

@yardov, I didn't know a good way to type it out, but I was able to run it locally and have potential fixes for the MyPy complaints. I created a draft PR #996. I put in the Description of that PR how I run validate_examples.py locally to get the same results as the CI build on PRs. And then you can see the diff for this file I made here. Those changes at least satisfy MyPy, but I'm not sure if all of the changes are correct for your example.

I also merged main before making any changes so you can ignore all the commits except those last three I linked the diff to.

@yardov
Copy link
Contributor Author

yardov commented Sep 18, 2023

Hi Ryan, thank you for your comments and detail PR. I am going over the changes...
I think I am missing something to validate locally as I get the output below. I am not very familiar with poetry but looks like I need to add an environmental variable?

_C:\github\grpc-device\grpc-device\examples>python ..\source\codegen\validate_examples.py -p "*nirf"
Validating examples using staging_dir: C:\github\grpc-device\grpc-device\build\validate_examples
'poetry' is not recognized as an internal or external command,
operable program or batch file.
'poetry' is not recognized as an internal or external command,
operable program or batch file.
'poetry' is not recognized as an internal or external command,
operable program or batch file.
'poetry' is not recognized as an internal or external command,
operable program or batch file.
'poetry' is not recognized as an internal or external command,
operable program or batch file.
'poetry' is not recognized as an internal or external command,
operable program or batch file.

-- Validating: nirf
-> Running black line-length 100
'poetry' is not recognized as an internal or external command,
operable program or batch file.
-> Running mypy
'poetry' is not recognized as an internal or external command,
operable program or batch file.
FAILED STEP (1): [poetry new .]
FAILED STEP (1): [poetry add grpcio]
FAILED STEP (1): [poetry add --dev grpcio-tools mypy mypy-protobuf types-protobuf grpc-stubs]
FAILED STEP (1): [poetry add --dev --python ">=3.6.2" black]
FAILED STEP (1): [poetry install]
FAILED STEP (1): [poetry run python -m grpc_tools.protoc -IC:\github\grpc-device\grpc-device\build\validate_examples\proto --python_out=. --grpc_python_out=. --mypy_out=. --mypy_grpc_out=. calibrationoperations_restricted.proto debugsessionproperties_restricted.proto deviceid_restricted.proto nidaqmx.proto nidcpower.proto nidevice.proto nidigitalpattern.proto nidmm.proto nifake.proto nifake_extension.proto nifake_non_ivi.proto nifgen.proto nimxlcterminaladaptor_restricted.proto nirfmxbluetooth.proto nirfmxcdma2k.proto nirfmxdemod.proto nirfmxgsm.proto nirfmxinstr.proto nirfmxinstr_restricted.proto nirfmxlte.proto nirfmxnr.proto nirfmxspecan.proto nirfmxspecan_restricted.proto nirfmxtdscdma.proto nirfmxwcdma.proto nirfmxwlan.proto nirfmxwlan_restricted.proto nirfsa.proto nirfsg.proto niscope.proto niscope_restricted.proto niswitch.proto nisync.proto nitclk.proto nixnet.proto nixnetsocket.proto session.proto session_utilities.proto]
FAILED STEP (1): [poetry run black --check --line-length 100 C:\github\grpc-device\grpc-device\build\validate_examples\examples\nirf]
FAILED STEP (1): [poetry run mypy C:\github\grpc-device\grpc-device\build\validate_examples\examples\nirf --check-untyped-defs --ignore-missing-imports]_

@reckenro
Copy link
Collaborator

Hi Ryan, thank you for your comments and detail PR. I am going over the changes... I think I am missing something to validate locally as I get the output below. I am not very familiar with poetry but looks like I need to add an environmental variable?

_C:\github\grpc-device\grpc-device\examples>python ..\source\codegen\validate_examples.py -p "*nirf" Validating examples using staging_dir: C:\github\grpc-device\grpc-device\build\validate_examples 'poetry' is not recognized as an internal or external command, operable program or batch file. 'poetry' is not recognized as an internal or external command, operable program or batch file. 'poetry' is not recognized as an internal or external command, operable program or batch file. 'poetry' is not recognized as an internal or external command, operable program or batch file. 'poetry' is not recognized as an internal or external command, operable program or batch file. 'poetry' is not recognized as an internal or external command, operable program or batch file.

-- Validating: nirf -> Running black line-length 100 'poetry' is not recognized as an internal or external command, operable program or batch file. -> Running mypy 'poetry' is not recognized as an internal or external command, operable program or batch file. FAILED STEP (1): [poetry new .] FAILED STEP (1): [poetry add grpcio] FAILED STEP (1): [poetry add --dev grpcio-tools mypy mypy-protobuf types-protobuf grpc-stubs] FAILED STEP (1): [poetry add --dev --python ">=3.6.2" black] FAILED STEP (1): [poetry install] FAILED STEP (1): [poetry run python -m grpc_tools.protoc -IC:\github\grpc-device\grpc-device\build\validate_examples\proto --python_out=. --grpc_python_out=. --mypy_out=. --mypy_grpc_out=. calibrationoperations_restricted.proto debugsessionproperties_restricted.proto deviceid_restricted.proto nidaqmx.proto nidcpower.proto nidevice.proto nidigitalpattern.proto nidmm.proto nifake.proto nifake_extension.proto nifake_non_ivi.proto nifgen.proto nimxlcterminaladaptor_restricted.proto nirfmxbluetooth.proto nirfmxcdma2k.proto nirfmxdemod.proto nirfmxgsm.proto nirfmxinstr.proto nirfmxinstr_restricted.proto nirfmxlte.proto nirfmxnr.proto nirfmxspecan.proto nirfmxspecan_restricted.proto nirfmxtdscdma.proto nirfmxwcdma.proto nirfmxwlan.proto nirfmxwlan_restricted.proto nirfsa.proto nirfsg.proto niscope.proto niscope_restricted.proto niswitch.proto nisync.proto nitclk.proto nixnet.proto nixnetsocket.proto session.proto session_utilities.proto] FAILED STEP (1): [poetry run black --check --line-length 100 C:\github\grpc-device\grpc-device\build\validate_examples\examples\nirf] FAILED STEP (1): [poetry run mypy C:\github\grpc-device\grpc-device\build\validate_examples\examples\nirf --check-untyped-defs --ignore-missing-imports]_

Sure thing! And did you run python -m pip install poetry? I don't remember if there was more to it or that was what gets it all set up to be used by the validate script.

@yardov
Copy link
Contributor Author

yardov commented Sep 18, 2023

Great!
image
I will add it to the PR #912

@reckenro reckenro changed the title Users/gorozco/multisession Multi-personality RFmx examples. Sep 18, 2023
@reckenro reckenro merged commit 71646bb into main Sep 19, 2023
11 checks passed
@reckenro reckenro deleted the users/gorozco/multisession branch September 19, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants