Repository navigation
Description
I ran the check_plugin command (PyMoDAQ 5.3.10, check_plugin . -v) on the 5.3.x branch (commit c786430, the future default branch, created from 5.0.x). It reports four failures and some warnings, listed below with what to do. The command is described in the instrument plugin documentation (section "The check_plugin command"), where every PMQ code is explained. The old names and their replacements are also listed in Legacy to current. I did not change any code for this list and nothing was tested with NI hardware.
An earlier version of this report was written for the old main branch. Its DAQmx_ScannerControl, DAQmx_MultipleScannerControl, DAQmx_PLcounter and daq_1Dviewer_DAQmx plugins are not in 5.3.x, so the points about them (PMQ302, PMQ303, PMQ316, PMQ318) no longer apply here.
The acceptance test of tests/ (added by #14) fails on the first two points below: they are what to fix to get the CI green.
Failures
__version__is missing insrc/pymodaq_plugins_daqmx/__init__.py. The package__init__of the plugin template shows how to define it:(and itsfrom pymodaq_utils.utils import get_version, PackageNotFoundError try: __version__ = get_version(__package__) except PackageNotFoundError: __version__ = '0.0.0dev'
set_loggerimport comes frompymodaq_utils.logger, while this__init__still imports it frompymodaq.utils.logger).- The three modules cannot be imported without the NI driver (
daq_move_NIDAQmx,daq_0Dviewer_NIDAQmx,daq_1Dviewer_NIDAQmx):nidaqmxraisesDaqNotFoundError("Could not find an installation of NI-DAQmx") at import time on a computer where the driver is missing, such as the CI runner. The documentation expects the import to work in that case ("The same checks as tests"). The call happens while the class is defined:NIDAQmx.get_NIDAQ_devices().device_namesinhardware/national_instruments/NIDAQmx_Viewer.py(class attributeparam_devices, thenparam_devices[0]) and theNIDAQmx.get_NIDAQ_channels(...)calls in theparamsofNIDAQmx_base.py.get_NIDAQ_devicesindaqmxni.pyonly catchesDaqError, notDaqNotFoundError. The class attributes should fall back to an empty list when the driver is absent, and be filled when the module is initialized.
Warnings
- PMQ308 (the three modules): optional
if __name__ == "__main__": main(__file__)block, to run and debug the plugin on its own. - PMQ201 / PMQ202 (15 todo):
NIDAQmx_Move.py(sixTODO: Reimplement in your daq_move with NIDAQmx libraryand four methods still raisingNotImplementedError, lines 53 to 164),daq_NIDAQmx.py:858("TODO for your custom plugin") and four# todoindaqmxni.py(lines 618 to 630). They do not fail the tests unlessfail_on = 'todo'is set before a release.
Packaging
Done in #13, brought in by #14 (dynamic classifiers, pymodaq_utils>=5.3.6 to build).
To check again after the changes: check_plugin . -v, or run the acceptance test of tests/ (pytest).
Activity
[-]Compatibility work to do with current PyMoDAQ (check_plugin report)[/-][+]Compatibility work to do with current PyMoDAQ (check_plugin report on 5.3.x)[/+]