Skip to content
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
4 changes: 2 additions & 2 deletions src/nxscli/commands/cmd_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def cmd_pcsv(
"""[plugin] Store samples in CSV files.

Each configured channel will be stored in a separate file.
If SAMPLES argument is set to 'i' then we capture data until enter
If SAMPLES argument is set to '0' then we capture data until enter
is press.
""" # noqa: D301
# wait for enter if samples set to 'i'
# wait for enter if samples set to '0'
assert ctx.phandler
if samples == 0: # pragma: no cover
ctx.waitenter = True
Expand Down
4 changes: 2 additions & 2 deletions src/nxscli/commands/cmd_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def cmd_printer(
) -> bool:
"""[plugin] Print data from stream.

If SAMPLES argument is set to 'i' then we capture data until enter
If SAMPLES argument is set to '0' then we capture data until enter
is press.
""" # noqa: D301
# wait for enter if samples set to 'i'
# wait for enter if samples set to '0'
assert ctx.phandler
if samples == 0: # pragma: no cover
ctx.waitenter = True
Expand Down
7 changes: 3 additions & 4 deletions src/nxscli/commands/cmd_udp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"--address",
type=str,
default="127.0.0.1",
help="destinantion port. Default: 127.0.0.1",
help="destinantion address. Default: 127.0.0.1",
)
@click.option(
"--port", type=int, default=9870, help="destination port. Default: 9870"
Expand All @@ -43,11 +43,10 @@ def cmd_pudp(
) -> bool:
"""[plugin] Stream parsed data to UDP port.

If SAMPLES argument is set to 'i' then we capture data until enter
If SAMPLES argument is set to '0' then we capture data until enter
is press.

""" # noqa: D301
# wait for enter if samples set to 'i'
# wait for enter if samples set to '0'
assert ctx.phandler
if samples == 0: # pragma: no cover
ctx.waitenter = True
Expand Down
4 changes: 2 additions & 2 deletions src/nxscli/commands/interface/cmd_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
@click.group(name="dummy", chain=True)
@click.option("--writepadding", default=0)
@click.option(
"--streamsleep", type=float, default=0.001, help="dummy dev parameter"
"--streamsleep", type=float, default=0.001, help="dummy dev parameter. Default: 0.001"
)
@click.option(
"--samplesnum", type=int, default=100, help="dummy dev parameter"
"--samplesnum", type=int, default=100, help="dummy dev parameter. Default: 100"
)
@pass_environment
def cmd_dummy(
Expand Down
4 changes: 2 additions & 2 deletions src/nxscli/commands/interface/cmd_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

@click.group(name="serial", chain=True)
@click.argument("path", type=click.Path(resolve_path=False), required=True)
@click.option("--baud", default=115200)
@click.option("--writepadding", default=0)
@click.option("--baud", default=115200, help="Default: 115200")
@click.option("--writepadding", default=0, help="Default: 0")
@pass_environment
def cmd_serial(
ctx: Environment, path: str, baud: int, writepadding: bool
Expand Down
2 changes: 1 addition & 1 deletion src/nxscli/phandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def channels_configure(
"""
assert self._nxs

logger.info("configure channels = %s divider = %d", str(channels), div)
logger.info("configure channels = %s divider = %s", str(channels), str(div))

self._chanlist = self._chanlist_gen(channels)
if not self._chanlist:
Expand Down
4 changes: 2 additions & 2 deletions tests/cli/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ def runner(mocker):

def test_main(runner):
result = runner.invoke(main)
assert result.exit_code == 0
assert result.exit_code == 2


def test_main_dummy(runner):
result = runner.invoke(main, ["dummy"])
assert result.exit_code == 0
assert result.exit_code == 2


def test_main_pdevinfo(runner):
Expand Down