Skip to content

Conversation

@olsl21
Copy link
Contributor

@olsl21 olsl21 commented Jun 4, 2025

  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

  • Add nidcpower_constant_resistance_and_constant_power.py and nidcpower_sink_dc_current_into_electronic_load.py
  • Regenerate docs/nidcpower/examples.rst
  • Update CHANGELOG.md to call out the new examples
  • Update the help string for the --option-string parameter to "Option String" based on IVI convention

What testing has been done?

  • Unit tests added as part of the example file passed.
  • Both tox and tox -c .\generated\nidcpower\tox-system_tests.ini succeeded

- Add `nidcpower_constant_resistance_and_constant_power.py` and `nidcpower_sink_dc_current_into_electronic_load.py`
- Regenerate `docs/nidcpower/examples.rst`
- Update CHANGELOG.md to call out the new examples
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.36%. Comparing base (67b6f7d) to head (86a3d8e).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2103   +/-   ##
=======================================
  Coverage   91.35%   91.36%           
=======================================
  Files          66       66           
  Lines       16318    16318           
=======================================
+ Hits        14908    14909    +1     
+ Misses       1410     1409    -1     
Flag Coverage Δ
codegenunittests 84.95% <ø> (ø)
nidcpowersystemtests 94.65% <ø> (+0.04%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.26% <ø> (ø)
nidigitalunittests 68.44% <ø> (ø)
nidmmsystemtests 92.72% <ø> (ø)
nifakeunittests 87.24% <ø> (ø)
nifgensystemtests 94.86% <ø> (ø)
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
niscopesystemtests 92.94% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 82.03% <ø> (ø)
nitclksystemtests 94.87% <ø> (ø)
nitclkunittests 98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67b6f7d...86a3d8e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcoskirsch
Copy link
Member

We have a grand total of four nidcpower examples.
This PR increases the number by 50%. Does this seem proportional to you given the relative importance of the products and product features that support this?

@olsl21
Copy link
Contributor Author

olsl21 commented Jun 6, 2025

We have a grand total of four nidcpower examples. This PR increases the number by 50%. Does this seem proportional to you given the relative importance of the products and product features that support this?

As discussed previously in our meeting with the stakeholders, Python examples provide value to our customers due to its increased adoption, and hence we should be opportunistic to incrementally add example support for Python for newer products / features, even though it was de-prioritized in the past.

@bkeryan
Copy link
Contributor

bkeryan commented Jun 6, 2025

We have a grand total of four nidcpower examples. This PR increases the number by 50%. Does this seem proportional to you given the relative importance of the products and product features that support this?

@marcoskirsch I'm surprised there aren't really any examples of basic use cases, similar to NI-DCPower Source DC Voltage.vi or InstrumentStudio's charting mode.

The existing examples seem to demonstrate (somewhat) advanced use cases:

  • nidcpower_advanced_sequence.py - advanced sequences are advanced; simple sequences (set_sequence) don't have an example
  • nidcpower_lcr_source_ac_voltage.py - only for a specific subset of instruments that support LCR
  • nidcpower_measure_record.py - seems like an intermediate use case, so I'm puzzled why this is grpc-device's only nidcpower example: https://github.com/ni/grpc-device/blob/main/examples/nidcpower/measure-record.py . Perhaps this seemed like the simplest nidcpower Python example to use as a starting point.
  • nidcpower_source_delay_measure.py - this is pretty close to a basic example, but the emphasis is on setting the source delay and changing the voltage on-the-fly

Copy link
Collaborator

@ni-jfitzger ni-jfitzger left a comment

Choose a reason for hiding this comment

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

There are several places where you haven't followed Marcos's recommendation to refer to exact symbol names and I believe it hurts the clarity.

@ni-jfitzger ni-jfitzger merged commit 473d86f into ni:master Jun 10, 2025
36 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