diff --git a/docs/collections.rst b/docs/collections.rst index 1a53b1216..d7a5fd79c 100644 --- a/docs/collections.rst +++ b/docs/collections.rst @@ -1,10 +1,8 @@ nidaqmx.system.collections ========================== -.. toctree:: - - device_collection - persisted_channel_collection - persisted_scale_collection - persisted_task_collection - physical_channel_collection +.. automodule:: nidaqmx.system.collections + :members: + :show-inheritance: + :member-order: bysource + diff --git a/docs/device_collection.rst b/docs/device_collection.rst deleted file mode 100644 index 889aec74a..000000000 --- a/docs/device_collection.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.device_collection -================================ - -.. automodule:: nidaqmx.system._collections.device_collection - :members: - :show-inheritance: diff --git a/docs/expiration_state.rst b/docs/expiration_state.rst deleted file mode 100644 index 4d5ca5c9e..000000000 --- a/docs/expiration_state.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.expiration_state -=============================== - -.. automodule:: nidaqmx.system._watchdog_modules.expiration_state - :members: - :show-inheritance: diff --git a/docs/expiration_states_collection.rst b/docs/expiration_states_collection.rst deleted file mode 100644 index 9e912ff5b..000000000 --- a/docs/expiration_states_collection.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.expiration_states_collection -=========================================== - -.. automodule:: nidaqmx.system._watchdog_modules.expiration_states_collection - :members: - :show-inheritance: diff --git a/docs/persisted_channel.rst b/docs/persisted_channel.rst deleted file mode 100644 index f1d592462..000000000 --- a/docs/persisted_channel.rst +++ /dev/null @@ -1,7 +0,0 @@ -nidaqmx.system.persisted_channel -================================ - -.. automodule:: nidaqmx.system.storage.persisted_channel - :members: - :show-inheritance: - :special-members: diff --git a/docs/persisted_channel_collection.rst b/docs/persisted_channel_collection.rst deleted file mode 100644 index ab7aef52f..000000000 --- a/docs/persisted_channel_collection.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.persisted_channel_collection -=========================================== - -.. automodule:: nidaqmx.system._collections.persisted_channel_collection - :members: - :show-inheritance: diff --git a/docs/persisted_scale.rst b/docs/persisted_scale.rst deleted file mode 100644 index c164bbc84..000000000 --- a/docs/persisted_scale.rst +++ /dev/null @@ -1,7 +0,0 @@ -nidaqmx.system.persisted_scale -============================== - -.. automodule:: nidaqmx.system.storage.persisted_scale - :members: - :show-inheritance: - :special-members: diff --git a/docs/persisted_scale_collection.rst b/docs/persisted_scale_collection.rst deleted file mode 100644 index e6ad24971..000000000 --- a/docs/persisted_scale_collection.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.persisted_scale_collection -========================================= - -.. automodule:: nidaqmx.system._collections.persisted_scale_collection - :members: - :show-inheritance: diff --git a/docs/persisted_task.rst b/docs/persisted_task.rst deleted file mode 100644 index 2584d67ab..000000000 --- a/docs/persisted_task.rst +++ /dev/null @@ -1,7 +0,0 @@ -nidaqmx.system.persisted_task -============================= - -.. automodule:: nidaqmx.system.storage.persisted_task - :members: - :show-inheritance: - :special-members: diff --git a/docs/persisted_task_collection.rst b/docs/persisted_task_collection.rst deleted file mode 100644 index ce1a0c6cb..000000000 --- a/docs/persisted_task_collection.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.persisted_task_collection -======================================== - -.. automodule:: nidaqmx.system._collections.persisted_task_collection - :members: - :show-inheritance: diff --git a/docs/physical_channel_collection.rst b/docs/physical_channel_collection.rst deleted file mode 100644 index eade825f6..000000000 --- a/docs/physical_channel_collection.rst +++ /dev/null @@ -1,6 +0,0 @@ -nidaqmx.system.physical_channel_collection -========================================== - -.. automodule:: nidaqmx.system._collections.physical_channel_collection - :members: - :show-inheritance: diff --git a/docs/storage.rst b/docs/storage.rst index 549632405..7a1af97ba 100644 --- a/docs/storage.rst +++ b/docs/storage.rst @@ -1,8 +1,7 @@ nidaqmx.system.storage ====================== -.. toctree:: - - persisted_channel - persisted_scale - persisted_task +.. automodule:: nidaqmx.system.storage + :members: + :show-inheritance: + :member-order: bysource diff --git a/docs/watchdog.rst b/docs/watchdog.rst index 245448631..d44d23b49 100644 --- a/docs/watchdog.rst +++ b/docs/watchdog.rst @@ -4,9 +4,4 @@ nidaqmx.system.watchdog .. automodule:: nidaqmx.system.watchdog :members: :show-inheritance: - :special-members: - -.. toctree:: - - expiration_state - expiration_states_collection + :member-order: bysource diff --git a/generated/nidaqmx/system/__init__.py b/generated/nidaqmx/system/__init__.py index 6d57599ca..c2e27f711 100644 --- a/generated/nidaqmx/system/__init__.py +++ b/generated/nidaqmx/system/__init__.py @@ -3,7 +3,5 @@ DOResistorPowerUpState) from nidaqmx.system.device import Device from nidaqmx.system.physical_channel import PhysicalChannel -from nidaqmx.system.watchdog import ( - WatchdogTask, AOExpirationState, COExpirationState, DOExpirationState) __all__ = ['system', 'device', 'physical_channel', 'storage', 'watchdog'] diff --git a/generated/nidaqmx/system/_collections/__init__.py b/generated/nidaqmx/system/_collections/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/generated/nidaqmx/system/_watchdog_modules/__init__.py b/generated/nidaqmx/system/_watchdog_modules/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/generated/nidaqmx/system/collections/__init__.py b/generated/nidaqmx/system/collections/__init__.py new file mode 100644 index 000000000..e5645280e --- /dev/null +++ b/generated/nidaqmx/system/collections/__init__.py @@ -0,0 +1,12 @@ + +from nidaqmx.system.collections._device_collection import DeviceCollection +from nidaqmx.system.collections._persisted_channel_collection import PersistedChannelCollection +from nidaqmx.system.collections._persisted_scale_collection import PersistedScaleCollection +from nidaqmx.system.collections._persisted_task_collection import PersistedTaskCollection +from nidaqmx.system.collections._physical_channel_collection import ( + PhysicalChannelCollection, AIPhysicalChannelCollection, AOPhysicalChannelCollection, + CIPhysicalChannelCollection, COPhysicalChannelCollection, DILinesCollection, + DOLinesCollection, DIPortsCollection, DOPortsCollection +) + +__all__ = ['DeviceCollection', 'PersistedChannelCollection', 'PersistedScaleCollection', 'PersistedTaskCollection', 'PhysicalChannelCollection', 'AIPhysicalChannelCollection', 'AOPhysicalChannelCollection', 'CIPhysicalChannelCollection', 'COPhysicalChannelCollection', 'DILinesCollection', 'DOLinesCollection', 'DIPortsCollection', 'DOPortsCollection',] \ No newline at end of file diff --git a/generated/nidaqmx/system/_collections/device_collection.py b/generated/nidaqmx/system/collections/_device_collection.py similarity index 100% rename from generated/nidaqmx/system/_collections/device_collection.py rename to generated/nidaqmx/system/collections/_device_collection.py diff --git a/generated/nidaqmx/system/_collections/persisted_channel_collection.py b/generated/nidaqmx/system/collections/_persisted_channel_collection.py similarity index 97% rename from generated/nidaqmx/system/_collections/persisted_channel_collection.py rename to generated/nidaqmx/system/collections/_persisted_channel_collection.py index d389a5f84..d2a172c34 100644 --- a/generated/nidaqmx/system/_collections/persisted_channel_collection.py +++ b/generated/nidaqmx/system/collections/_persisted_channel_collection.py @@ -49,7 +49,7 @@ def __getitem__(self, index): - slice: Range of the indexes/positions of global channels in the collection. Returns: - List[nidaqmx.system.storage.persisted_channel.PersistedChannel]: + List[nidaqmx.system.storage.PersistedChannel]: Indicates the of global channels indexed. """ diff --git a/src/handwritten/system/_collections/persisted_scale_collection.py b/generated/nidaqmx/system/collections/_persisted_scale_collection.py similarity index 97% rename from src/handwritten/system/_collections/persisted_scale_collection.py rename to generated/nidaqmx/system/collections/_persisted_scale_collection.py index bdbcc5adb..70e3ca78a 100644 --- a/src/handwritten/system/_collections/persisted_scale_collection.py +++ b/generated/nidaqmx/system/collections/_persisted_scale_collection.py @@ -48,7 +48,7 @@ def __getitem__(self, index): - slice: Range of the indexes/positions of custom scales in the collection. Returns: - List[nidaqmx.system.storage.persisted_scale.PersistedScale]: + List[nidaqmx.system.storage.PersistedScale]: Indicates the subset of custom scales indexed. """ diff --git a/generated/nidaqmx/system/_collections/persisted_task_collection.py b/generated/nidaqmx/system/collections/_persisted_task_collection.py similarity index 97% rename from generated/nidaqmx/system/_collections/persisted_task_collection.py rename to generated/nidaqmx/system/collections/_persisted_task_collection.py index 5d0adea4c..494a96514 100644 --- a/generated/nidaqmx/system/_collections/persisted_task_collection.py +++ b/generated/nidaqmx/system/collections/_persisted_task_collection.py @@ -48,7 +48,7 @@ def __getitem__(self, index): - slice: Range of the indexes/positions of saved tasks in the collection. Returns: - List[nidaqmx.system.storage.persisted_task.PersistedTask]: + List[nidaqmx.system.storage.PersistedTask]: Indicates the subset of saved tasks indexed. """ diff --git a/generated/nidaqmx/system/_collections/physical_channel_collection.py b/generated/nidaqmx/system/collections/_physical_channel_collection.py similarity index 100% rename from generated/nidaqmx/system/_collections/physical_channel_collection.py rename to generated/nidaqmx/system/collections/_physical_channel_collection.py diff --git a/generated/nidaqmx/system/device.py b/generated/nidaqmx/system/device.py index 9961ce636..bf51aff63 100644 --- a/generated/nidaqmx/system/device.py +++ b/generated/nidaqmx/system/device.py @@ -6,7 +6,7 @@ from nidaqmx import utils from nidaqmx._bitfield_utils import enum_bitfield_to_list from nidaqmx.utils import unflatten_channel_string -from nidaqmx.system._collections.physical_channel_collection import ( +from nidaqmx.system.collections._physical_channel_collection import ( AIPhysicalChannelCollection, AOPhysicalChannelCollection, CIPhysicalChannelCollection, COPhysicalChannelCollection, DILinesCollection, DIPortsCollection, DOLinesCollection, DOPortsCollection) @@ -60,7 +60,7 @@ def name(self): @property def ai_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the analog input physical channels available on the device. """ @@ -69,7 +69,7 @@ def ai_physical_chans(self): @property def ao_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the analog output physical channels available on the device. """ @@ -78,7 +78,7 @@ def ao_physical_chans(self): @property def ci_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the counter input physical channels available on the device. """ @@ -87,7 +87,7 @@ def ci_physical_chans(self): @property def co_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the counter output physical channels available on the device. """ @@ -96,7 +96,7 @@ def co_physical_chans(self): @property def di_lines(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital input lines available on the device. """ @@ -105,7 +105,7 @@ def di_lines(self): @property def di_ports(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital input ports available on the device. """ @@ -114,7 +114,7 @@ def di_ports(self): @property def do_lines(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital output lines available on the device. """ @@ -123,7 +123,7 @@ def do_lines(self): @property def do_ports(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital output ports available on the device. """ diff --git a/generated/nidaqmx/system/storage/__init__.py b/generated/nidaqmx/system/storage/__init__.py index 90e8571ba..e9439565f 100644 --- a/generated/nidaqmx/system/storage/__init__.py +++ b/generated/nidaqmx/system/storage/__init__.py @@ -2,4 +2,4 @@ from nidaqmx.system.storage.persisted_scale import PersistedScale from nidaqmx.system.storage.persisted_task import PersistedTask -__all__ = ['persisted_channel', 'persisted_scale', 'persisted_task'] +__all__ = ['PersistedChannel', 'PersistedScale', 'PersistedTask',] diff --git a/generated/nidaqmx/system/system.py b/generated/nidaqmx/system/system.py index c2489899b..12857fbd7 100644 --- a/generated/nidaqmx/system/system.py +++ b/generated/nidaqmx/system/system.py @@ -6,12 +6,12 @@ import numpy from nidaqmx import utils -from nidaqmx.system._collections.device_collection import DeviceCollection -from nidaqmx.system._collections.persisted_channel_collection import ( +from nidaqmx.system.collections._device_collection import DeviceCollection +from nidaqmx.system.collections._persisted_channel_collection import ( PersistedChannelCollection) -from nidaqmx.system._collections.persisted_scale_collection import ( +from nidaqmx.system.collections._persisted_scale_collection import ( PersistedScaleCollection) -from nidaqmx.system._collections.persisted_task_collection import ( +from nidaqmx.system.collections._persisted_task_collection import ( PersistedTaskCollection) from nidaqmx.utils import flatten_channel_string, unflatten_channel_string from nidaqmx.constants import ( @@ -63,7 +63,7 @@ def remote(grpc_options): @property def devices(self): """ - nidaqmx.system._collections.DeviceCollection: Indicates the + nidaqmx.system.collections.DeviceCollection: Indicates the collection of devices for this DAQmx system. """ return DeviceCollection(self._interpreter) @@ -92,7 +92,7 @@ def driver_version(self): @property def global_channels(self): """ - nidaqmx.system._collections.PersistedChannelCollection: Indicates + nidaqmx.system.collections.PersistedChannelCollection: Indicates the collection of global channels for this DAQmx system. """ return PersistedChannelCollection(self._interpreter) @@ -100,7 +100,7 @@ def global_channels(self): @property def scales(self): """ - nidaqmx.system._collections.PersistedScaleCollection: Indicates + nidaqmx.system.collections.PersistedScaleCollection: Indicates the collection of custom scales for this DAQmx system. """ return PersistedScaleCollection(self._interpreter) @@ -108,7 +108,7 @@ def scales(self): @property def tasks(self): """ - nidaqmx.system._collections.PersistedTaskCollection: Indicates + nidaqmx.system.collections.PersistedTaskCollection: Indicates the collection of saved tasks for this DAQmx system. """ return PersistedTaskCollection(self._interpreter) diff --git a/generated/nidaqmx/system/watchdog/__init__.py b/generated/nidaqmx/system/watchdog/__init__.py new file mode 100644 index 000000000..f68408375 --- /dev/null +++ b/generated/nidaqmx/system/watchdog/__init__.py @@ -0,0 +1,7 @@ + +from nidaqmx.system.watchdog._expiration_state import ExpirationState +from nidaqmx.system.watchdog._expiration_states_collection import ExpirationStatesCollection +from nidaqmx.system.watchdog._watchdog import ( + WatchdogTask, AOExpirationState, COExpirationState, DOExpirationState) + +__all__ = ['ExpirationState', 'ExpirationStatesCollection', 'WatchdogTask',] \ No newline at end of file diff --git a/generated/nidaqmx/system/_watchdog_modules/expiration_state.py b/generated/nidaqmx/system/watchdog/_expiration_state.py similarity index 100% rename from generated/nidaqmx/system/_watchdog_modules/expiration_state.py rename to generated/nidaqmx/system/watchdog/_expiration_state.py diff --git a/generated/nidaqmx/system/_watchdog_modules/expiration_states_collection.py b/generated/nidaqmx/system/watchdog/_expiration_states_collection.py similarity index 89% rename from generated/nidaqmx/system/_watchdog_modules/expiration_states_collection.py rename to generated/nidaqmx/system/watchdog/_expiration_states_collection.py index 5d437ef92..6a49b95ff 100644 --- a/generated/nidaqmx/system/_watchdog_modules/expiration_states_collection.py +++ b/generated/nidaqmx/system/watchdog/_expiration_states_collection.py @@ -1,5 +1,5 @@ from nidaqmx.errors import DaqError -from nidaqmx.system._watchdog_modules.expiration_state import ExpirationState +from nidaqmx.system.watchdog._expiration_state import ExpirationState class ExpirationStatesCollection: @@ -31,7 +31,7 @@ def __getitem__(self, index): index (str): Name of the physical channel of which the expiration state to retrieve. Returns: - nidaqmx.system._watchdog_modules.expiration_state.ExpirationState: + nidaqmx.system.watchdog.ExpirationState: The object representing the indexed expiration state. """ diff --git a/generated/nidaqmx/system/watchdog.py b/generated/nidaqmx/system/watchdog/_watchdog.py similarity index 96% rename from generated/nidaqmx/system/watchdog.py rename to generated/nidaqmx/system/watchdog/_watchdog.py index 09e4b8b57..098d9361b 100644 --- a/generated/nidaqmx/system/watchdog.py +++ b/generated/nidaqmx/system/watchdog/_watchdog.py @@ -5,8 +5,8 @@ from nidaqmx import utils from nidaqmx.errors import DaqResourceWarning -from nidaqmx.system._watchdog_modules.expiration_state import ExpirationState -from nidaqmx.system._watchdog_modules.expiration_states_collection import ( +from nidaqmx.system.watchdog._expiration_state import ExpirationState +from nidaqmx.system.watchdog._expiration_states_collection import ( ExpirationStatesCollection) from nidaqmx.utils import flatten_channel_string from nidaqmx.constants import ( @@ -79,7 +79,7 @@ def __exit__(self, type, value, traceback): @property def expiration_states(self): """ - :class:`nidaqmx.system._watchdog_modules.expiration_states_collection.ExpirationStatesCollection`: Gets + :class:`nidaqmx.system.watchdog.ExpirationStatesCollection`: Gets the collection of expiration states for this watchdog task. """ return self._expiration_states @@ -233,7 +233,7 @@ def cfg_watchdog_ao_expir_states(self, expiration_states): output_type (nidaqmx.constants.WatchdogAOExpirState): Specifies the output type of the physical channel. Returns: - List[nidaqmx.system._watchdog_modules.expiration_state.ExpirationState]: + List[nidaqmx.system.watchdog.ExpirationState]: Indicates the list of objects representing the configured expiration states. @@ -267,7 +267,7 @@ def cfg_watchdog_co_expir_states(self, expiration_states): expiration_state (nidaqmx.constants.WatchdogCOExpirState): Specifies the value to set the channel to upon expiration. Returns: - List[nidaqmx.system._watchdog_modules.expiration_state.ExpirationState]: + List[nidaqmx.system.watchdog.ExpirationState]: Indicates the list of objects representing the configured expiration states. @@ -299,7 +299,7 @@ def cfg_watchdog_do_expir_states(self, expiration_states): expiration_state (nidaqmx.constants.Level): Specifies the value to set the channel to upon expiration. Returns: - List[nidaqmx.system._watchdog_modules.expiration_state.ExpirationState]: + List[nidaqmx.system.watchdog.ExpirationState]: Indicates the list of objects representing the configured expiration states. diff --git a/generated/nidaqmx/task/_task.py b/generated/nidaqmx/task/_task.py index b70c536e3..b70a51c04 100644 --- a/generated/nidaqmx/task/_task.py +++ b/generated/nidaqmx/task/_task.py @@ -317,7 +317,7 @@ def add_global_channels(self, global_channels): Adds global virtual channels from MAX to the given task. Args: - global_channels (List[nidaqmx.system.storage.persisted_channel.PersistedChannel]): + global_channels (List[nidaqmx.system.storage.PersistedChannel]): Specifies the channels to add to the task. These channels must be valid channels available from MAX. diff --git a/src/codegen/metadata/script_info.py b/src/codegen/metadata/script_info.py index 28d74f86f..f627bb3c3 100644 --- a/src/codegen/metadata/script_info.py +++ b/src/codegen/metadata/script_info.py @@ -29,12 +29,12 @@ "templateFile": "task\\_out_stream.py.mako", }, { - "relativeOutputPath": "system\\_watchdog_modules\\expiration_state.py", - "templateFile": "system\\_watchdog_modules\\expiration_state.py.mako", + "relativeOutputPath": "system\\watchdog\\_expiration_state.py", + "templateFile": "system\\watchdog\\_expiration_state.py.mako", }, { - "relativeOutputPath": "system\\watchdog.py", - "templateFile": "system\\watchdog.py.mako", + "relativeOutputPath": "system\\watchdog\\_watchdog.py", + "templateFile": "system\\watchdog\\_watchdog.py.mako", }, { "relativeOutputPath": "task\\channels\\_ao_channel.py", diff --git a/src/codegen/templates/system/device.py.mako b/src/codegen/templates/system/device.py.mako index 7b817f217..cee605d50 100644 --- a/src/codegen/templates/system/device.py.mako +++ b/src/codegen/templates/system/device.py.mako @@ -15,7 +15,7 @@ from datetime import datetime from nidaqmx import utils from nidaqmx._bitfield_utils import enum_bitfield_to_list from nidaqmx.utils import unflatten_channel_string -from nidaqmx.system._collections.physical_channel_collection import ( +from nidaqmx.system.collections._physical_channel_collection import ( AIPhysicalChannelCollection, AOPhysicalChannelCollection, CIPhysicalChannelCollection, COPhysicalChannelCollection, DILinesCollection, DIPortsCollection, DOLinesCollection, DOPortsCollection) @@ -69,7 +69,7 @@ class Device: @property def ai_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the analog input physical channels available on the device. """ @@ -78,7 +78,7 @@ class Device: @property def ao_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the analog output physical channels available on the device. """ @@ -87,7 +87,7 @@ class Device: @property def ci_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the counter input physical channels available on the device. """ @@ -96,7 +96,7 @@ class Device: @property def co_physical_chans(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the counter output physical channels available on the device. """ @@ -105,7 +105,7 @@ class Device: @property def di_lines(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital input lines available on the device. """ @@ -114,7 +114,7 @@ class Device: @property def di_ports(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital input ports available on the device. """ @@ -123,7 +123,7 @@ class Device: @property def do_lines(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital output lines available on the device. """ @@ -132,7 +132,7 @@ class Device: @property def do_ports(self): """ - List[nidaqmx.system._collections.PhysicalChannelCollection]: + List[nidaqmx.system.collections.PhysicalChannelCollection]: Indicates a collection that contains all the digital output ports available on the device. """ diff --git a/src/codegen/templates/system/system.py.mako b/src/codegen/templates/system/system.py.mako index fe0e2487d..c4a27ecc1 100644 --- a/src/codegen/templates/system/system.py.mako +++ b/src/codegen/templates/system/system.py.mako @@ -13,12 +13,12 @@ import deprecation import numpy from nidaqmx import utils -from nidaqmx.system._collections.device_collection import DeviceCollection -from nidaqmx.system._collections.persisted_channel_collection import ( +from nidaqmx.system.collections._device_collection import DeviceCollection +from nidaqmx.system.collections._persisted_channel_collection import ( PersistedChannelCollection) -from nidaqmx.system._collections.persisted_scale_collection import ( +from nidaqmx.system.collections._persisted_scale_collection import ( PersistedScaleCollection) -from nidaqmx.system._collections.persisted_task_collection import ( +from nidaqmx.system.collections._persisted_task_collection import ( PersistedTaskCollection) from nidaqmx.utils import flatten_channel_string, unflatten_channel_string from nidaqmx.constants import ( @@ -70,7 +70,7 @@ class System: @property def devices(self): """ - nidaqmx.system._collections.DeviceCollection: Indicates the + nidaqmx.system.collections.DeviceCollection: Indicates the collection of devices for this DAQmx system. """ return DeviceCollection(self._interpreter) @@ -99,7 +99,7 @@ class System: @property def global_channels(self): """ - nidaqmx.system._collections.PersistedChannelCollection: Indicates + nidaqmx.system.collections.PersistedChannelCollection: Indicates the collection of global channels for this DAQmx system. """ return PersistedChannelCollection(self._interpreter) @@ -107,7 +107,7 @@ class System: @property def scales(self): """ - nidaqmx.system._collections.PersistedScaleCollection: Indicates + nidaqmx.system.collections.PersistedScaleCollection: Indicates the collection of custom scales for this DAQmx system. """ return PersistedScaleCollection(self._interpreter) @@ -115,7 +115,7 @@ class System: @property def tasks(self): """ - nidaqmx.system._collections.PersistedTaskCollection: Indicates + nidaqmx.system.collections.PersistedTaskCollection: Indicates the collection of saved tasks for this DAQmx system. """ return PersistedTaskCollection(self._interpreter) diff --git a/src/codegen/templates/system/_watchdog_modules/expiration_state.py.mako b/src/codegen/templates/system/watchdog/_expiration_state.py.mako similarity index 100% rename from src/codegen/templates/system/_watchdog_modules/expiration_state.py.mako rename to src/codegen/templates/system/watchdog/_expiration_state.py.mako diff --git a/src/codegen/templates/system/watchdog.py.mako b/src/codegen/templates/system/watchdog/_watchdog.py.mako similarity index 95% rename from src/codegen/templates/system/watchdog.py.mako rename to src/codegen/templates/system/watchdog/_watchdog.py.mako index 8bd6edeeb..b02156229 100644 --- a/src/codegen/templates/system/watchdog.py.mako +++ b/src/codegen/templates/system/watchdog/_watchdog.py.mako @@ -11,8 +11,8 @@ import warnings from nidaqmx import utils from nidaqmx.errors import DaqResourceWarning -from nidaqmx.system._watchdog_modules.expiration_state import ExpirationState -from nidaqmx.system._watchdog_modules.expiration_states_collection import ( +from nidaqmx.system.watchdog._expiration_state import ExpirationState +from nidaqmx.system.watchdog._expiration_states_collection import ( ExpirationStatesCollection) from nidaqmx.utils import flatten_channel_string from nidaqmx.constants import ( @@ -85,7 +85,7 @@ class WatchdogTask: @property def expiration_states(self): """ - :class:`nidaqmx.system._watchdog_modules.expiration_states_collection.ExpirationStatesCollection`: Gets + :class:`nidaqmx.system.watchdog.ExpirationStatesCollection`: Gets the collection of expiration states for this watchdog task. """ return self._expiration_states @@ -138,7 +138,7 @@ ${property_template.script_property(attribute)}\ output_type (nidaqmx.constants.WatchdogAOExpirState): Specifies the output type of the physical channel. Returns: - List[nidaqmx.system._watchdog_modules.expiration_state.ExpirationState]: + List[nidaqmx.system.watchdog.ExpirationState]: Indicates the list of objects representing the configured expiration states. @@ -172,7 +172,7 @@ ${property_template.script_property(attribute)}\ expiration_state (nidaqmx.constants.WatchdogCOExpirState): Specifies the value to set the channel to upon expiration. Returns: - List[nidaqmx.system._watchdog_modules.expiration_state.ExpirationState]: + List[nidaqmx.system.watchdog.ExpirationState]: Indicates the list of objects representing the configured expiration states. @@ -204,7 +204,7 @@ ${property_template.script_property(attribute)}\ expiration_state (nidaqmx.constants.Level): Specifies the value to set the channel to upon expiration. Returns: - List[nidaqmx.system._watchdog_modules.expiration_state.ExpirationState]: + List[nidaqmx.system.watchdog.ExpirationState]: Indicates the list of objects representing the configured expiration states. diff --git a/src/handwritten/system/__init__.py b/src/handwritten/system/__init__.py index 6d57599ca..c2e27f711 100644 --- a/src/handwritten/system/__init__.py +++ b/src/handwritten/system/__init__.py @@ -3,7 +3,5 @@ DOResistorPowerUpState) from nidaqmx.system.device import Device from nidaqmx.system.physical_channel import PhysicalChannel -from nidaqmx.system.watchdog import ( - WatchdogTask, AOExpirationState, COExpirationState, DOExpirationState) __all__ = ['system', 'device', 'physical_channel', 'storage', 'watchdog'] diff --git a/src/handwritten/system/_collections/__init__.py b/src/handwritten/system/_collections/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/handwritten/system/_watchdog_modules/__init__.py b/src/handwritten/system/_watchdog_modules/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/handwritten/system/collections/__init__.py b/src/handwritten/system/collections/__init__.py new file mode 100644 index 000000000..e5645280e --- /dev/null +++ b/src/handwritten/system/collections/__init__.py @@ -0,0 +1,12 @@ + +from nidaqmx.system.collections._device_collection import DeviceCollection +from nidaqmx.system.collections._persisted_channel_collection import PersistedChannelCollection +from nidaqmx.system.collections._persisted_scale_collection import PersistedScaleCollection +from nidaqmx.system.collections._persisted_task_collection import PersistedTaskCollection +from nidaqmx.system.collections._physical_channel_collection import ( + PhysicalChannelCollection, AIPhysicalChannelCollection, AOPhysicalChannelCollection, + CIPhysicalChannelCollection, COPhysicalChannelCollection, DILinesCollection, + DOLinesCollection, DIPortsCollection, DOPortsCollection +) + +__all__ = ['DeviceCollection', 'PersistedChannelCollection', 'PersistedScaleCollection', 'PersistedTaskCollection', 'PhysicalChannelCollection', 'AIPhysicalChannelCollection', 'AOPhysicalChannelCollection', 'CIPhysicalChannelCollection', 'COPhysicalChannelCollection', 'DILinesCollection', 'DOLinesCollection', 'DIPortsCollection', 'DOPortsCollection',] \ No newline at end of file diff --git a/src/handwritten/system/_collections/device_collection.py b/src/handwritten/system/collections/_device_collection.py similarity index 100% rename from src/handwritten/system/_collections/device_collection.py rename to src/handwritten/system/collections/_device_collection.py diff --git a/src/handwritten/system/_collections/persisted_channel_collection.py b/src/handwritten/system/collections/_persisted_channel_collection.py similarity index 97% rename from src/handwritten/system/_collections/persisted_channel_collection.py rename to src/handwritten/system/collections/_persisted_channel_collection.py index d389a5f84..d2a172c34 100644 --- a/src/handwritten/system/_collections/persisted_channel_collection.py +++ b/src/handwritten/system/collections/_persisted_channel_collection.py @@ -49,7 +49,7 @@ def __getitem__(self, index): - slice: Range of the indexes/positions of global channels in the collection. Returns: - List[nidaqmx.system.storage.persisted_channel.PersistedChannel]: + List[nidaqmx.system.storage.PersistedChannel]: Indicates the of global channels indexed. """ diff --git a/generated/nidaqmx/system/_collections/persisted_scale_collection.py b/src/handwritten/system/collections/_persisted_scale_collection.py similarity index 97% rename from generated/nidaqmx/system/_collections/persisted_scale_collection.py rename to src/handwritten/system/collections/_persisted_scale_collection.py index bdbcc5adb..70e3ca78a 100644 --- a/generated/nidaqmx/system/_collections/persisted_scale_collection.py +++ b/src/handwritten/system/collections/_persisted_scale_collection.py @@ -48,7 +48,7 @@ def __getitem__(self, index): - slice: Range of the indexes/positions of custom scales in the collection. Returns: - List[nidaqmx.system.storage.persisted_scale.PersistedScale]: + List[nidaqmx.system.storage.PersistedScale]: Indicates the subset of custom scales indexed. """ diff --git a/src/handwritten/system/_collections/persisted_task_collection.py b/src/handwritten/system/collections/_persisted_task_collection.py similarity index 97% rename from src/handwritten/system/_collections/persisted_task_collection.py rename to src/handwritten/system/collections/_persisted_task_collection.py index 5d0adea4c..494a96514 100644 --- a/src/handwritten/system/_collections/persisted_task_collection.py +++ b/src/handwritten/system/collections/_persisted_task_collection.py @@ -48,7 +48,7 @@ def __getitem__(self, index): - slice: Range of the indexes/positions of saved tasks in the collection. Returns: - List[nidaqmx.system.storage.persisted_task.PersistedTask]: + List[nidaqmx.system.storage.PersistedTask]: Indicates the subset of saved tasks indexed. """ diff --git a/src/handwritten/system/_collections/physical_channel_collection.py b/src/handwritten/system/collections/_physical_channel_collection.py similarity index 100% rename from src/handwritten/system/_collections/physical_channel_collection.py rename to src/handwritten/system/collections/_physical_channel_collection.py diff --git a/src/handwritten/system/storage/__init__.py b/src/handwritten/system/storage/__init__.py index 90e8571ba..e9439565f 100644 --- a/src/handwritten/system/storage/__init__.py +++ b/src/handwritten/system/storage/__init__.py @@ -2,4 +2,4 @@ from nidaqmx.system.storage.persisted_scale import PersistedScale from nidaqmx.system.storage.persisted_task import PersistedTask -__all__ = ['persisted_channel', 'persisted_scale', 'persisted_task'] +__all__ = ['PersistedChannel', 'PersistedScale', 'PersistedTask',] diff --git a/src/handwritten/system/watchdog/__init__.py b/src/handwritten/system/watchdog/__init__.py new file mode 100644 index 000000000..f68408375 --- /dev/null +++ b/src/handwritten/system/watchdog/__init__.py @@ -0,0 +1,7 @@ + +from nidaqmx.system.watchdog._expiration_state import ExpirationState +from nidaqmx.system.watchdog._expiration_states_collection import ExpirationStatesCollection +from nidaqmx.system.watchdog._watchdog import ( + WatchdogTask, AOExpirationState, COExpirationState, DOExpirationState) + +__all__ = ['ExpirationState', 'ExpirationStatesCollection', 'WatchdogTask',] \ No newline at end of file diff --git a/src/handwritten/system/_watchdog_modules/expiration_states_collection.py b/src/handwritten/system/watchdog/_expiration_states_collection.py similarity index 89% rename from src/handwritten/system/_watchdog_modules/expiration_states_collection.py rename to src/handwritten/system/watchdog/_expiration_states_collection.py index 5d437ef92..6a49b95ff 100644 --- a/src/handwritten/system/_watchdog_modules/expiration_states_collection.py +++ b/src/handwritten/system/watchdog/_expiration_states_collection.py @@ -1,5 +1,5 @@ from nidaqmx.errors import DaqError -from nidaqmx.system._watchdog_modules.expiration_state import ExpirationState +from nidaqmx.system.watchdog._expiration_state import ExpirationState class ExpirationStatesCollection: @@ -31,7 +31,7 @@ def __getitem__(self, index): index (str): Name of the physical channel of which the expiration state to retrieve. Returns: - nidaqmx.system._watchdog_modules.expiration_state.ExpirationState: + nidaqmx.system.watchdog.ExpirationState: The object representing the indexed expiration state. """ diff --git a/src/handwritten/task/_task.py b/src/handwritten/task/_task.py index b70c536e3..b70a51c04 100644 --- a/src/handwritten/task/_task.py +++ b/src/handwritten/task/_task.py @@ -317,7 +317,7 @@ def add_global_channels(self, global_channels): Adds global virtual channels from MAX to the given task. Args: - global_channels (List[nidaqmx.system.storage.persisted_channel.PersistedChannel]): + global_channels (List[nidaqmx.system.storage.PersistedChannel]): Specifies the channels to add to the task. These channels must be valid channels available from MAX. diff --git a/tests/conftest.py b/tests/conftest.py index e4ef333b7..753428a80 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -507,7 +507,9 @@ def persisted_channel(request, system: nidaqmx.system.System): @pytest.fixture(scope="function") -def watchdog_task(request, sim_6363_device, generate_watchdog_task) -> nidaqmx.system.WatchdogTask: +def watchdog_task( + request, sim_6363_device, generate_watchdog_task +) -> nidaqmx.system.watchdog.WatchdogTask: """Gets a watchdog task instance.""" # set default values used for the initialization of the task. device_name = _get_marker_value(request, "device_name", sim_6363_device.name) @@ -528,7 +530,7 @@ def generate_watchdog_task(init_kwargs): def _create_task(device_name, task_name="", timeout=0.5): return stack.enter_context( - nidaqmx.system.WatchdogTask(device_name, task_name, timeout, **init_kwargs) + nidaqmx.system.watchdog.WatchdogTask(device_name, task_name, timeout, **init_kwargs) ) yield _create_task diff --git a/tests/legacy/test_system_collections.py b/tests/legacy/test_system_collections.py index 453c39a0e..906a47bcd 100644 --- a/tests/legacy/test_system_collections.py +++ b/tests/legacy/test_system_collections.py @@ -4,17 +4,11 @@ import nidaqmx import nidaqmx.system -from nidaqmx.system._collections.device_collection import DeviceCollection -from nidaqmx.system._collections.persisted_channel_collection import ( +from nidaqmx.system.collections import ( + DeviceCollection, PersistedChannelCollection, -) -from nidaqmx.system._collections.persisted_scale_collection import ( PersistedScaleCollection, -) -from nidaqmx.system._collections.persisted_task_collection import ( PersistedTaskCollection, -) -from nidaqmx.system._collections.physical_channel_collection import ( PhysicalChannelCollection, )