Skip to content

Commit

Permalink
Merge branch 'main' into chore-cli-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zbilodea authored Mar 25, 2024
2 parents bef6e4f + f94ce65 commit 96b8aef
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 603 deletions.
20 changes: 10 additions & 10 deletions src/hepconvert/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main() -> None:
@click.option(
"-f",
"--force",
default=False,
is_flag=True,
help="If True, overwrites destination file if it already exists.",
)
def parquet_to_root(
Expand All @@ -59,7 +59,7 @@ def parquet_to_root(
resize_factor=10.0,
compression="zlib",
compression_level=1,
force=False,
force,
):
"""
Convert Parquet file to ROOT file.
Expand Down Expand Up @@ -111,7 +111,7 @@ def parquet_to_root(
@click.option(
"-f",
"--force",
default=False,
is_flag=True,
help="If True, overwrites destination file if it already exists.",
)
def copy_root(
Expand All @@ -125,7 +125,7 @@ def copy_root(
cut=None,
expressions=None,
progress_bar=None,
force=False,
force,
title="",
field_name=lambda outer, inner: inner if outer == "" else outer + "_" + inner,
initial_basket_capacity=10,
Expand Down Expand Up @@ -168,7 +168,7 @@ def copy_root(
@click.option(
"-f",
"--force",
default=False,
is_flag=True,
help="Overwrite destination file if it already exists",
)
@click.option("--progress-bar", default=None, type=bool, required=False)
Expand Down Expand Up @@ -203,7 +203,7 @@ def add(
files,
*,
progress_bar=False,
force=False,
force,
append=False,
compression="zlib",
compression_level=1,
Expand Down Expand Up @@ -257,7 +257,7 @@ def add(
@click.option("--cut", default=None, type=str or list, required=False)
@click.option("--expressions", default=None, type=str or list, required=False)
@click.option(
"--force", default=True, help="Overwrite destination file if it already exists"
"--force", is_flag=True, help="Overwrite destination file if it already exists"
)
@click.option("--append", default=False, help="Append histograms to an existing file")
@click.option(
Expand Down Expand Up @@ -293,7 +293,7 @@ def merge_root(
resize_factor=10.0,
counter_name=lambda counted: "n" + counted,
step_size="100 MB",
force=True,
force,
append=False,
compression="LZ4",
compression_level=1,
Expand Down Expand Up @@ -342,7 +342,7 @@ def merge_root(
@click.option(
"-f",
"--force",
default=False,
is_flag=True,
type=bool,
help="If a file already exists at specified path, it gets replaced",
)
Expand Down Expand Up @@ -503,7 +503,7 @@ def root_to_parquet(
parquet_extra_options=None,
storage_options=None,
tree=None,
force=False,
force,
step_size=100,
):
"""
Expand Down
Loading

0 comments on commit 96b8aef

Please sign in to comment.