Skip to content

Refactor Task Internal Modules (ExportSignal, OutStream, Timing) #539

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/export_signals.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/out_stream.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ nidaqmx.task

channel
channel_collection
export_signals
out_stream
timing
triggers
6 changes: 0 additions & 6 deletions docs/timing.rst

This file was deleted.

5 changes: 4 additions & 1 deletion generated/nidaqmx/task/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
Task, _TaskEventType, _TaskAlternateConstructor
)
from nidaqmx.task._in_stream import InStream
from nidaqmx.task._out_stream import OutStream
from nidaqmx.task._export_signals import ExportSignals
from nidaqmx.task._timing import Timing

__all__ = ['Task', 'InStream']
__all__ = ['Task', 'InStream', 'OutStream', 'ExportSignals', 'Timing',]
26 changes: 11 additions & 15 deletions generated/nidaqmx/task/_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import numpy
from nidaqmx import utils
from nidaqmx._task_modules.channels.channel import Channel
from nidaqmx._task_modules.export_signals import ExportSignals
from nidaqmx.task._export_signals import ExportSignals
from nidaqmx.task._in_stream import InStream
from nidaqmx._task_modules.timing import Timing
from nidaqmx.task._timing import Timing
from nidaqmx._task_modules.triggers import Triggers
from nidaqmx._task_modules.out_stream import OutStream
from nidaqmx.task._out_stream import OutStream
from nidaqmx._task_modules.ai_channel_collection import (
AIChannelCollection)
from nidaqmx._task_modules.ao_channel_collection import (
Expand Down Expand Up @@ -233,37 +233,33 @@ def do_channels(self):
return self._do_channels

@property
def export_signals(self):
def export_signals(self) -> ExportSignals:
"""
:class:`nidaqmx._task_modules.export_signals.ExportSignals`: Gets the
exported signal configurations for the task.
Gets the exported signal configurations for the task.
"""
return self._export_signals

@property
def in_stream(self) -> InStream:
"""
:class:`nidaqmx.task.InStream`: Gets the read
configurations for the task.
Gets the read configurations for the task.
"""
return self._in_stream

@property
def out_stream(self):
def out_stream(self) -> OutStream:
"""
:class:`nidaqmx._task_modules.out_stream.OutStream`: Gets the
write configurations for the task.
Gets the write configurations for the task.
"""
return self._out_stream

@property
def timing(self):
def timing(self) -> Timing:
"""
:class:`nidaqmx._task_modules.timing.Timing`: Gets the timing
configurations for the task.
Gets the timing configurations for the task.
"""
return self._timing

@property
def triggers(self):
"""
Expand Down
12 changes: 6 additions & 6 deletions src/codegen/metadata/script_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"templateFile": "task\\_in_stream.py.mako",
},
{
"relativeOutputPath": "_task_modules\\out_stream.py",
"templateFile": "_task_modules\\out_stream.py.mako",
"relativeOutputPath": "task\\_out_stream.py",
"templateFile": "task\\_out_stream.py.mako",
},
{
"relativeOutputPath": "system\\_watchdog_modules\\expiration_state.py",
Expand Down Expand Up @@ -81,16 +81,16 @@
"templateFile": "_task_modules\\do_channel_collection.py.mako",
},
{
"relativeOutputPath": "_task_modules\\timing.py",
"templateFile": "_task_modules\\timing.py.mako",
"relativeOutputPath": "task\\_timing.py",
"templateFile": "task\\_timing.py.mako",
},
{
"relativeOutputPath": "scale.py",
"templateFile": "scale.py.mako",
},
{
"relativeOutputPath": "_task_modules\\export_signals.py",
"templateFile": "_task_modules\\export_signals.py.mako",
"relativeOutputPath": "task\\_export_signals.py",
"templateFile": "task\\_export_signals.py.mako",
},
{
"relativeOutputPath": "_task_modules\\triggering\\arm_start_trigger.py",
Expand Down
5 changes: 4 additions & 1 deletion src/handwritten/task/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
Task, _TaskEventType, _TaskAlternateConstructor
)
from nidaqmx.task._in_stream import InStream
from nidaqmx.task._out_stream import OutStream
from nidaqmx.task._export_signals import ExportSignals
from nidaqmx.task._timing import Timing

__all__ = ['Task', 'InStream']
__all__ = ['Task', 'InStream', 'OutStream', 'ExportSignals', 'Timing',]
26 changes: 11 additions & 15 deletions src/handwritten/task/_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import numpy
from nidaqmx import utils
from nidaqmx._task_modules.channels.channel import Channel
from nidaqmx._task_modules.export_signals import ExportSignals
from nidaqmx.task._export_signals import ExportSignals
from nidaqmx.task._in_stream import InStream
from nidaqmx._task_modules.timing import Timing
from nidaqmx.task._timing import Timing
from nidaqmx._task_modules.triggers import Triggers
from nidaqmx._task_modules.out_stream import OutStream
from nidaqmx.task._out_stream import OutStream
from nidaqmx._task_modules.ai_channel_collection import (
AIChannelCollection)
from nidaqmx._task_modules.ao_channel_collection import (
Expand Down Expand Up @@ -233,37 +233,33 @@ def do_channels(self):
return self._do_channels

@property
def export_signals(self):
def export_signals(self) -> ExportSignals:
"""
:class:`nidaqmx._task_modules.export_signals.ExportSignals`: Gets the
exported signal configurations for the task.
Gets the exported signal configurations for the task.
"""
return self._export_signals

@property
def in_stream(self) -> InStream:
"""
:class:`nidaqmx.task.InStream`: Gets the read
configurations for the task.
Gets the read configurations for the task.
"""
return self._in_stream

@property
def out_stream(self):
def out_stream(self) -> OutStream:
"""
:class:`nidaqmx._task_modules.out_stream.OutStream`: Gets the
write configurations for the task.
Gets the write configurations for the task.
"""
return self._out_stream

@property
def timing(self):
def timing(self) -> Timing:
"""
:class:`nidaqmx._task_modules.timing.Timing`: Gets the timing
configurations for the task.
Gets the timing configurations for the task.
"""
return self._timing

@property
def triggers(self):
"""
Expand Down