Skip to content

Commit

Permalink
Updates to pass pre-commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
markspec authored and tasansal committed Aug 25, 2023
1 parent 14936c1 commit c3d4625
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/mdio/commands/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
import click_params

import mdio
import json
except SystemError:
pass


DEFAULT_HELP = """
MDIO CLI utilities.
MDIO CLI utilities.
"""


@click.group(help=DEFAULT_HELP)
def cli():
click.echo(f"MDIO CLI utilities")
"""Setup click group."""
click.echo("MDIO CLI utilities")


@cli.command(name="copy")
Expand Down Expand Up @@ -49,7 +49,7 @@ def cli():
"-inc",
"--includes",
required=False,
help="""Data to include during copy. i.e. trace_headers. If this is not
help="""Data to include during copy. i.e. trace_headers. If this is not
specified, and certain data is excluded, it will not copy headers. If you want
to preserve headers, specify trace_headers. If left blank, it will copy
everything except specified in excludes parameter.""",
Expand Down Expand Up @@ -80,15 +80,16 @@ def copy(
overwrite: bool = False,
):
"""Copy MDIO to MDIO.
Can also copy with empty data to be filled later. See `excludes`
and `includes` parameters.
More documentation about `excludes` and `includes` can be found
in Zarr's documentation in `zarr.convenience.copy_store`.
Args:
source: MDIO reader or accessor instance. Data will be copied from here
dest_path_or_buffer: Destination path. Could be any FSSpec mapping.
input_mdio_path: MDIO reader or accessor instance. Data will be copied from here
output_mdio_path: Destination path. Could be any FSSpec mapping.
excludes: Data to exclude during copy. i.e. `chunked_012`. The raw data
won't be copied, but it will create an empty array to be filled.
If left blank, it will copy everything.
Expand Down Expand Up @@ -123,7 +124,7 @@ def copy(
"--output-format",
required=False,
default="plain",
help="""Output format, plain is human readable. JSON will output in json
help="""Output format, plain is human readable. JSON will output in json
format for easier passing. """,
type=click.Choice(["plain", "json"]),
show_default=True,
Expand Down Expand Up @@ -167,7 +168,7 @@ def info(
click.echo("\n\n{:<10} {:<10}".format("STAT", "VALUE"))
click.echo("=" * 20)
for name, stat in reader.stats.items():
click.echo("{:<10} {:<10}".format(name, stat))
click.echo(f"{name:<10} {stat:<10}")
if output_format == "json":
mdio_dict["stats"] = reader.stats
click.echo(mdio_dict)

0 comments on commit c3d4625

Please sign in to comment.