Skip to content

Adding TMU support for NI-Digital - #2230

Open
elebel-emerson wants to merge 14 commits into
ni:masterfrom
elebel-emerson:users/elebel/updatingNiDigitalMetadata
Open

elebel-emerson wants to merge 14 commits into
ni:masterfrom
elebel-emerson:users/elebel/updatingNiDigitalMetadata

Conversation

@elebel-emerson

@elebel-emerson elebel-emerson commented Oct 21, 2026 •

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

Update metadata to latest 27.0 export for NI-Digital
Added some tests making sure function calls and enums work for TMU capabilities
Resulting Changes:

  • nidigital has some documentation changes (mostly/all? adding tmu to documentation)

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

none

What testing has been done?

PR Checks

@codecov-commenter

codecov-commenter commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.53846% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.09%. Comparing base (a5c0aa8) to head (d964185).

Files with missing lines Patch % Lines
...ated/nidigital/nidigital/_grpc_stub_interpreter.py 40.00% 6 Missing ⚠️
generated/nidigital/nidigital/session.py 91.22% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2230      +/-   ##
==========================================
- Coverage   88.13%   88.09%   -0.05%     
==========================================
  Files          88       86       -2     
  Lines       22866    22701     -165     
==========================================
- Hits        20153    19998     -155     
+ Misses       2713     2703      -10     
Flag Coverage Δ
codegenunittests 84.98% <ø> (ø)
nidcpowersystemtests 94.40% <ø> (+0.04%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.05% <91.53%> (+0.01%) ⬆️
nidigitalunittests 69.25% <80.70%> (+0.82%) ⬆️
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.14% <ø> (ø)
nifgensystemtests 94.34% <ø> (ø)
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests 82.71% <ø> (ø)
nirfsaunittests 63.37% <ø> (ø)
nirfsgsystemtests 81.22% <ø> (ø)
niscopesystemtests 89.99% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (ø)
nitclksystemtests ?
nitclkunittests 98.26% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@elebel-emerson
elebel-emerson marked this pull request as ready for review October 21, 2026 20:54
@ni-jfitzger

ni-jfitzger commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

"Update metadata for nidigital" is a very vague PR title.
Aren't you adding TMU support?

Comment thread generated/nidigital/nidigital/enums.py Resolved
Comment thread src/nidigital/metadata/attributes.py Resolved
@elebel-emerson elebel-emerson changed the title Update metadata for nidigital Adding TMU support for NI-Digital Oct 22, 2026
@elebel-emerson

Copy link
Copy Markdown
Contributor Author

"Update metadata for nidigital" is a very vague PR title. Aren't you adding TMU support?

Both, functionally I am updating to the latest metadata that has TMU support, but yes this change is being done to add TMU support. Changed the name to better describe the why and not the how.

@elebel-emerson elebel-emerson mentioned this pull request Oct 26, 2026
1 task done
Comment thread generated/nidigital/nidigital/enums.py Resolved

@elebel-emerson elebel-emerson left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed version of niDigital metadata to a version that does not generate HistoryRAMMaxSamplesToAcquirePerSite

Comment thread docs/nidigital/class.rst Resolved
elebel-emerson and others added 4 commits November 20, 2026 13:38
…tingNiDigitalMetadata

# Conflicts:
#	CHANGELOG.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
'type': 'ViConstString'
}
],
'python_name': 'tmu_initiate',

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.

Why does a private method have a public name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe because it has an extra underscore, looks like it is apart of hapigen_nimi_python_plugin's PythonExpander.py (do not know how much detail I should go into for a our private hapigen code in a public setting (Github)). Since Initiate (which is also private) does not have an extra underscore it does not have a python_name.

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 see, now. Yeah, that seems like a bug in our internal codegen. If we're going to expand the python_name, internally, (which is what we ultimately want to move toward), we need to account for whether we've configured the method to be private.

class _TimeMeasurement(object):
def __init__(self, session):
self._session = session
self._session.tmu_initiate()

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.

We shouldn't be calling a public method, here.
The only public method should be the one that returns this object.

raise AttributeError("'{0}' object has no attribute '{1}'".format(type(self).__name__, key))
object.__setattr__(self, key, value)

def initiate_tmu(self):

@ni-jfitzger ni-jfitzger Dec 3, 2026 •

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.

We're departing from the LabVIEW and C API to name our top-level method initiate_tmu, rather than tmu_initiate?

@marcoskirsch what are your thoughts on this?

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