Repository navigation
Adding TMU support for NI-Digital - #2230
elebel-emerson wants to merge 14 commits into
Conversation
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
"Update metadata for nidigital" is a very vague PR title. |
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
left a comment
There was a problem hiding this comment.
Changed version of niDigital metadata to a version that does not generate HistoryRAMMaxSamplesToAcquirePerSite
…tingNiDigitalMetadata # Conflicts: # CHANGELOG.md
…tingNiDigitalMetadata
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| 'type': 'ViConstString' | ||
| } | ||
| ], | ||
| 'python_name': 'tmu_initiate', |
There was a problem hiding this comment.
Why does a private method have a public name?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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?
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:
List issues fixed by this Pull Request below, if any.
none
What testing has been done?
PR Checks