-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal/add fgen #972
Internal/add fgen #972
Conversation
Codecov Report
@@ Coverage Diff @@
## internal/metadata_updates #972 +/- ##
============================================================
Coverage ? 81.42%
============================================================
Files ? 27
Lines ? 4026
Branches ? 0
============================================================
Hits ? 3278
Misses ? 748
Partials ? 0 Continue to review full report at Codecov.
|
nimi-bot is MIA |
Caleb has it and will set it back up once y’all’s move is complete.
|
@@ -423,7 +423,7 @@ SampleClockSource | |||
|
|||
|
|||
|
|||
.. py:attribute:: SampleClockSource.PXI_TRIGGER_LINE_0RTSI_0 | |||
.. py:attribute:: SampleClockSource.PXI_TRIGGER_LINE_0_RTSI_0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both old and new look wrong (old looks more wrong).
Constant in C is NIFGEN_VAL_RTSI_0
What should we be doing here?
Do we even want / need this in nifgen
? It's used for the old enum-based routing API, we should be directing clients towards using string-based routing API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The values are strings, like 'ClkIn' but it looks like these came from LV, not C.
There are several enums that look that way. I think we should remove them and remove the use of them. If we need then later for LabVIEW we can add them back at that point.
RUNNING = 2 | ||
DONE = 3 | ||
HARDWARE_ERROR = 4 | ||
WAITING_FOR_START_TRIGGER = 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -853,6 +843,16 @@ class _SessionBase(object): | |||
|
|||
Returns a brief description of NI-FGEN. | |||
''' | |||
major_version = _attributes.AttributeViInt32(1050503) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this shown up in a different position? (not that it matter much)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the actual attribute name is not NIFGEN_ATTR_MAJOR_VERSION
, it is actually NIFGEN_ATTR_SPECIFIC_DRIVER_MAJOR_VERSION
. But to not break backwards compatibility I had to keep the old name, but it is alphabetized by the actual name.
@@ -3532,6 +3532,8 @@ def create_arb_sequence(self, waveform_handles_array, loop_counts_array): | |||
''' | |||
vi_ctype = _visatype.ViSession(self._vi) # case S110 | |||
sequence_length_ctype = _visatype.ViInt32(0 if waveform_handles_array is None else len(waveform_handles_array)) # case S160 | |||
if loop_counts_array is not None and len(loop_counts_array) != len(waveform_handles_array): # case S160 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a small bugfix. Worth noting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to.
@@ -3619,6 +3621,8 @@ def create_freq_list(self, waveform, frequency_array, duration_array): | |||
vi_ctype = _visatype.ViSession(self._vi) # case S110 | |||
waveform_ctype = _visatype.ViInt32(waveform.value) # case S130 | |||
frequency_list_length_ctype = _visatype.ViInt32(0 if frequency_array is None else len(frequency_array)) # case S160 | |||
if duration_array is not None and len(duration_array) != len(frequency_array): # case S160 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a small bugfix. Worth noting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to.
…968) * flake8 has gotten stricter * Additional infomarion when error or abnormal condition * Need to merge config as well * Use actual booleans instead of a string that looks like a boolean * Since we now merge config, not all top level items are a dictionary * Update generated files * Only build nifake for now. Others will be added over time * Update metadata * Make naming consistent with other drivers * Enable ModInst * Disable testing drivers we are building yet * Add config_addon * Update metadata * Handle minor change in metadata format (now booleans instead of strings) * Update generated files * Internal/add nidmm (#970) * Enable nidmm build * config_addon.py is for module_version only (so far) * Remove all addon information * Update generated metadata from hapigen * Update generated files * Don't use numpy 1.16.x - broken on pypy * Don't use quotes * Update metadata based on chanes in extraction * Update generated files * See if this fixes pypy3 build/test breakage * Allow pypy3 to fail for now * Simple change to force rebuild * Try to fix the build * Change how filtering configuration dictionary is declared The original way quit working for some reason that I was not able to track down * Try to fix error on travis ci * Need enum34 for Python 2.7 * Update niscope metadata to new extraction type (#980) * Update metadata * Add config_addon * Remove unused addn information * Workaround for pypy test failing * Enable niscope * Update generated files * Update changelog with changed enum values * Internal/niswitch (#971) * Enable niswitch * Workaround for numpy with pypy * Add config_addon.py for module_version * Update metadata * Update metadata * Update generated files * Differentiate between tested with version and api version (#983) * Add api version information to status documentation * Move 'last_test_version' to config_addon This will have to be manually updated as nimi-bot or other testing happens * Version from generated metadata is really the version of the API metadata, not the version tested with * Update generated files * Make key name more descriptive * Update * Update generated files * Internal/nidcpower (#982) * Enable nidcpower * Add some helpful information on assert * Add config_addon * Update metadata * nimpy/pypy workaround * Update generated files * Internal/add fgen (#972) * Enable nifgen * Add config_addon for mofule_version * Update metadata * Empty out addons * Update generated files * Fix name collisions that caused values to be incorrect * Update generated files * Update CHANGELOG.md * Internal/fix build (#987) * Fix enum.HardwareState values to match niFgen.h (#973) * Fix values for HardwareState * Update CHANGELOG.md * Fix/add incorrect or missing keys * Update generated files * Update nifake metadata (#988) * Update metadata from latest build * Rename custom struct to be constistent with scope (and make it repeatable) * Update generated files * Private functions are no longer added at all * Update generated files * Add behavior type ivi-dance-with-a-twist (#989) * Add support for ivi-dance-with-a-twist * Update generated files * Add support for ivi-dance-with-a-twist * Update metadata from latest build * Rename custom struct to be constistent with scope (and make it repeatable) * Update generated files * Enable GetAnIviDanceWithATwistString * Add test for ivi-dance-with-a-twist * Private functions are no longer added at all * Update generated files * We don't use the 'value_twist' parameter in the python api, only used for getting length * Update calls() * Update generated files * Add nidigital metadata (#991) But don't do anything with it yet * Add SwitchExecutive (#992) * Enable nise build * Add config_addon.py - needed for module_version * Update metadata * Remove addon information * Update generated files * Update keys for recent changes * update generated files * Put modinst at the end of the build again This ensures the documentation version is based on the main drivers * Update generated files * Update order and add comment why * Clean up addon files * Library file name changed * Add missing comment with missing case * Add some missing unit tests * Update generated files * Don't renumber existing cases * Fix incorrect case - comment was correct * Add some missing test cases * Update generated files
* flake8 has gotten stricter * Additional infomarion when error or abnormal condition * Need to merge config as well * Use actual booleans instead of a string that looks like a boolean * Since we now merge config, not all top level items are a dictionary * Update generated files * Only build nifake for now. Others will be added over time * Update metadata * Make naming consistent with other drivers * Enable ModInst * Disable testing drivers we are building yet * Add config_addon * Update metadata * Handle minor change in metadata format (now booleans instead of strings) * Update generated files * Add nidigital metadata * Enable nidigital * Add simple example and system_test * nidigital doesn't have documentation but we need at least an empy dictionary * Move import datetime into the snippet that uses it * Simple usage file * Add support for ivi-dance-with-a-twist * When filtering, either works * When finding associated parameter, take a key to look at: 'value' or ;value-twist' * Renumber declaration types * Add/update generated files * Internal/add nidmm (#970) * Enable nidmm build * config_addon.py is for module_version only (so far) * Remove all addon information * Update generated metadata from hapigen * Update generated files * Don't use numpy 1.16.x - broken on pypy * Don't use quotes * Update metadata based on chanes in extraction * Update generated files * See if this fixes pypy3 build/test breakage * Allow pypy3 to fail for now * Simple change to force rebuild * Try to fix the build * Change how filtering configuration dictionary is declared The original way quit working for some reason that I was not able to track down * Try to fix error on travis ci * Need enum34 for Python 2.7 * Update niscope metadata to new extraction type (#980) * Update metadata * Add config_addon * Remove unused addn information * Workaround for pypy test failing * Enable niscope * Update generated files * Update changelog with changed enum values * Move import datetime back into session.py.mako but skip flake8 error * Update generated files * Update changelog * Internal/niswitch (#971) * Enable niswitch * Workaround for numpy with pypy * Add config_addon.py for module_version * Update metadata * Update metadata * Update generated files * Differentiate between tested with version and api version (#983) * Add api version information to status documentation * Move 'last_test_version' to config_addon This will have to be manually updated as nimi-bot or other testing happens * Version from generated metadata is really the version of the API metadata, not the version tested with * Update generated files * Make key name more descriptive * Update * Update generated files * Internal/nidcpower (#982) * Enable nidcpower * Add some helpful information on assert * Add config_addon * Update metadata * nimpy/pypy workaround * Update generated files * Internal/add fgen (#972) * Enable nifgen * Add config_addon for mofule_version * Update metadata * Empty out addons * Update generated files * Fix name collisions that caused values to be incorrect * Update generated files * Update CHANGELOG.md * Update changelog per review comments * Clean up incorrect comments per review * Fix comment per review * Update and expand on docstring per review * Remove reference to nidcpower per review * Add TODO per review * Internal/fix build (#987) * Fix enum.HardwareState values to match niFgen.h (#973) * Fix values for HardwareState * Update CHANGELOG.md * Fix/add incorrect or missing keys * Update generated files * Update nifake metadata (#988) * Update metadata from latest build * Rename custom struct to be constistent with scope (and make it repeatable) * Update generated files * Private functions are no longer added at all * Update generated files * Add behavior type ivi-dance-with-a-twist (#989) * Add support for ivi-dance-with-a-twist * Update generated files * Add support for ivi-dance-with-a-twist * Update metadata from latest build * Rename custom struct to be constistent with scope (and make it repeatable) * Update generated files * Enable GetAnIviDanceWithATwistString * Add test for ivi-dance-with-a-twist * Private functions are no longer added at all * Update generated files * We don't use the 'value_twist' parameter in the python api, only used for getting length * Update calls() * Update generated files * Rename and remove functionality * Update generated files * Update generated files * Add nidigital metadata (#991) But don't do anything with it yet * Add SwitchExecutive (#992) * Enable nise build * Add config_addon.py - needed for module_version * Update metadata * Remove addon information * Update generated files * Update keys for recent changes * update generated files * Put modinst at the end of the build again This ensures the documentation version is based on the main drivers * Update generated files * Add missing key * Fix key name * Update generated files * Update order and add comment * Fix name * Update order and add comment why * Clean up addon files * Library file name changed * Add missing comment with missing case * Add some missing unit tests * Update generated files * Don't renumber existing cases * Fix incorrect case - comment was correct * Add some missing test cases * Update generated files * Update generated files
What does this Pull Request accomplish?
List issues fixed by this Pull Request below, if any.What testing has been done?