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

Adding 6 python examples to rfsg, rfmxwlan, and rfmxnr #1019

Merged
merged 11 commits into from
Dec 8, 2023
Merged

Conversation

JonP-NI
Copy link
Contributor

@JonP-NI JonP-NI commented Oct 27, 2023

What does this Pull Request accomplish?

This PR adds 6 new python examples to RFSG, RFmx WLAN, and RFmx NR.

Why should this Pull Request be merged?

These examples help broaden the base of examples for RFSG, RFmx WLAN, and RFmx NR. The examples are modeled on the corresponding examples found in the shipped RFSG/RFmx examples in .NET and LabVIEW.

What testing has been done?

These were all tested on a Ubuntu VM, communicating with real NI hardware (5830 VST) over a network.

The gen_from_tdms.py example generates a waveform from a TDMS file at a specified frequency and power.
These examples mirror those in the shipped RFmx .NET and LV examples.
acp-txp-modacc-single-carrier.py example shows how to make a composite measurement for RFmx NR.
modacc-noncontiguous-multicarrier.py example shows how to implement multi-subblock, multi-component carrier measurement for RFmx NR.
@reckenro
Copy link
Collaborator

reckenro commented Nov 1, 2023

You can run black to fix up the broken build step validate_python. You can see how to run it from the command line or configure in VS Code in our Wiki

@reckenro
Copy link
Collaborator

reckenro commented Nov 1, 2023

Looks good overall to me, but I'm going to add @yardov as a reviewer in case he has any additional perspective on the example content.

Also, you should probably look at getting your GitHub account added to the NI org and team: https://github.com/ni

@reckenro reckenro requested a review from yardov November 1, 2023 20:26
Added black formatting
Added black formatting
Added black formatting
@JonP-NI
Copy link
Contributor Author

JonP-NI commented Nov 1, 2023

@reckenro Thanks, I ran black on the files and committed the changes.

@reckenro
Copy link
Collaborator

reckenro commented Nov 28, 2023

@reckenro Thanks, I ran black on the files and committed the changes.

@JonP-NI , sure thing. Looks like your recent updates are still failing the validation check. I'm not sure why but I think when you ran Black it didn't pick up the 100 line-length specified in the pyproject.toml.

In any case, you should be able to force it on the command line with something like black source/codegen examples -l 100.

Besides that, they look good in general to me.

Copy link
Contributor

@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.

Hi Jon, my only comments are on the TDMS one. Thank you for building these examples.

examples/nirfsg/gen_from_tdms.py Outdated Show resolved Hide resolved
examples/nirfsg/gen_from_tdms.py Outdated Show resolved Hide resolved
@maxxboehme
Copy link
Collaborator

@JonP-NI you still have some python style validation issues that need to be fixed. We will be releasing the 2.4 version of grpc-device soon. If wanting to go into that release this will need to get merged in the next day or so. We plan to start creating the release branch this Friday end of day.

Fixed formatting and made changes to generate-from-file.tdms based on feedback
@JonP-NI
Copy link
Contributor Author

JonP-NI commented Dec 7, 2023

The formatting is fixed, but there are errors in the validate_python step. I ran modacc-noncontiguous-multicarrier.py after the formatting changes with real hardware without issue. I am not sure how to resolve validate_python errrors.

examples/nirfmxwlan/sem.py Outdated Show resolved Hide resolved
@reckenro
Copy link
Collaborator

reckenro commented Dec 7, 2023

The formatting is fixed, but there are errors in the validate_python step. I ran modacc-noncontiguous-multicarrier.py after the formatting changes with real hardware without issue. I am not sure how to resolve validate_python errrors.

Ah, forgot about that. It got past the formatting and ni-python-styleguide checks but then it runs mypy on the examples. mypy gets some type-checking in python. I'm not super familiar but I ran the validate_examples.py locally and will point out what I think the problems are in each file.

@reckenro reckenro merged commit 0b0b77c into ni:main Dec 8, 2023
11 checks passed
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.

5 participants