Skip to content

Commit

Permalink
Add access pattern to info.
Browse files Browse the repository at this point in the history
  • Loading branch information
markspec authored and tasansal committed Aug 25, 2023
1 parent c3d4625 commit 22a8d6d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/mdio/commands/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ def copy(
help="Input path of the mdio file",
type=click.STRING,
)
@click.option(
"-access",
"--access-pattern",
required=False,
default="012",
help="Access pattern of the file",
type=click.STRING,
show_default=True,
)
@click.option(
"-format",
"--output-format",
Expand All @@ -133,14 +142,17 @@ def copy(
def info(
input_mdio_file,
output_format,
access_pattern,
):
"""Provide information on MDIO dataset.
By default this returns human readable information about the grid and stats for
the dataset. If output-format is set to json then a json is returned to
facilitate parsing.
"""
reader = mdio.MDIOReader(input_mdio_file, return_metadata=True)
reader = mdio.MDIOReader(
input_mdio_file, access_pattern=access_pattern, return_metadata=True
)
mdio_dict = {}
mdio_dict["grid"] = {}
for axis in reader.grid.dim_names:
Expand Down

0 comments on commit 22a8d6d

Please sign in to comment.