Adding example in NI-DC Power , NI-DMM , NI-Switch - #2192
Conversation
Adding one new example each in NI-DMM, NI-DCPower, and NI-SWITCH.
updated CHANGELOG.md to include additional examples added in nidcpower, nidmm, niswitch in "unreleased section.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (81.59%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## master #2192 +/- ##
==========================================
- Coverage 89.32% 81.59% -7.73%
==========================================
Files 73 31 -42
Lines 19048 4308 -14740
==========================================
- Hits 17014 3515 -13499
+ Misses 2034 793 -1241
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Please stick to the pull request template. Include all 3, place an X to fill in the checkbox, where appropriate, and strikethrough anything that doesn't apply. |
|
| import argparse # For parsing command-line arguments | ||
| import sys # For accessing command-line arguments via sys.argv | ||
|
|
||
| import nidcpower # NI-DCPower instrument driver (SMU trigger source) |
There was a problem hiding this comment.
You can't add this dependency on another nimi-python API without updating generated/nidmm/tox-system_tests.ini via changes to build/templates/tox-system_tests.ini.mako.
Whether we should add such an example is a separate issue. This change would also force changes to our post-release checks and internal test events.
| def test_example(): | ||
| """Simulated hardware test — runs example() with virtual NI-2568 switch (no real HW needed).""" | ||
| example( | ||
| resource_name='PXI2568', |
There was a problem hiding this comment.
I don't know why it should matter, but you may need to stick with the pattern of passing an empty string, established by the other niswitch examples. The driver doesn't seem to like you passing this string, when simulating.
| options = {'simulate': True, 'driver_setup': {'Model': '4139', 'BoardType': 'PXIe'}} | ||
| example('PXI1Slot1', options, 2.0, 4.0, 10.0, 0.01, 0.01, 0.05) |
There was a problem hiding this comment.
This is a DAQmx-based device. IVI Simulation of such devices sometimes fails. Pick a different device.
…dded 4163 as simulated device) and switch example(empty string to resource name).
I've added tests applicable for this pull requestWhat does this Pull Request accomplish?
List issues fixed by this Pull Request below, if any.
None
What testing has been done?