Skip to content

Update nidcpower_measure_record.py - #2159

Open
ksoo-NI wants to merge 1 commit into
ni:masterfrom
ksoo-NI:patch-1
Open

Update nidcpower_measure_record.py#2159
ksoo-NI wants to merge 1 commit into
ni:masterfrom
ksoo-NI:patch-1

Conversation

@ksoo-NI

@ksoo-NIksoo-NI commented Jan 21, 2026

Copy link
Copy Markdown
  • 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?

Fixed typo in line 18 where effective measurement rate is divide by 1 (which is incorrect).

List issues fixed by this Pull Request below, if any.

None

What testing has been done?

Python code run fine with the measurement rate display correctly

Line 18 has typo where it should be 1 / session.measure_record_delta_time not session.measure_record_delta_time/1
@codecov-commenter

codecov-commenter commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.37%. Comparing base (8b2f991) to head (d3c363e).
⚠️ Report is 22 commits behind head on master.

❌ Your project status has failed because the head coverage (82.37%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (8b2f991) and HEAD (d3c363e). Click for more details.

HEAD has 4 uploads less than BASE
FlagBASE (8b2f991)HEAD (d3c363e)
nirfsgsystemtests10
nidcpowersystemtests10
nitclksystemtests10
nidigitalsystemtests10
Additional details and impacted files

Impacted file tree graph

@@ Coverage Diff @@## master #2159 +/- ##
==========================================
- Coverage 90.07% 82.37% -7.71% 
==========================================
Files 71 55 -16 Lines 18666 11803 -6863 ==========================================
- Hits 16814 9723 -7091 - Misses 1852 2080 +228 
FlagCoverage Δ
codegenunittests84.44% <ø> (ø)
nidcpowersystemtests?
nidcpowerunittests89.53% <ø> (ø)
nidigitalsystemtests?
nidigitalunittests68.44% <ø> (ø)
nidmmsystemtests81.65% <ø> (-11.08%)⬇️
nifakeunittests85.51% <ø> (ø)
nifgensystemtests85.11% <ø> (-9.51%)⬇️
nimodinstsystemtests73.85% <ø> (ø)
nimodinstunittests94.20% <ø> (ø)
nirfsgsystemtests?
niscopesystemtests84.94% <ø> (-8.00%)⬇️
niscopeunittests43.20% <ø> (ø)
nisesystemtests91.50% <ø> (ø)
niswitchsystemtests71.26% <ø> (-10.78%)⬇️
nitclksystemtests?
nitclkunittests98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 31 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

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

@vnktshr21vnktshr21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please update the PR description to be in the template format. You could refer previously submitted PRs for how to write the description.

@ksoo-NI

Copy link
Copy Markdown
Author

Please update the PR description to be in the template format. You could refer previously submitted PRs for how to write the description.

@vnktshr21 PR description updated.

@ni-jfitzger

Copy link
Copy Markdown
Collaborator

Please affirm that your contribution adheres to the CONTRIBUTING.md (you should have seen comments about this, initially). Strike through the other checkbox lines. They don't apply.

@ksoo-NI

Copy link
Copy Markdown
Author

Please affirm that your contribution adheres to the CONTRIBUTING.md (you should have seen comments about this, initially). Strike through the other checkbox lines. They don't apply.

Done @ni-jfitzger . Sorry for missing this and that. This is my very first contribution to an open source project :)

@ni-jfitzgerni-jfitzger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not an expert on the nidcpower API, but given that the unit for measure_record_delta_time is seconds, this change seems correct to me.

@ni-jfitzger
ni-jfitzger self-requested a review January 22, 2026 14:33
@ni-jfitzger

Copy link
Copy Markdown
Collaborator

The example fails with

TypeError: unsupported operand type(s) for /: 'int' and 'timedelta'

Sign up for freeto 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

@ksoo-NI@codecov-commenter@ni-jfitzger@vnktshr21