Skip to content

Commit

Permalink
arg syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nlouwen committed Nov 29, 2024
1 parent 6958601 commit da64c16
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 30 deletions.
12 changes: 6 additions & 6 deletions big_scape/cli/benchmark_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from .cli_validations import (
set_start,
validate_output_paths,
validate_disk_only,
)


Expand All @@ -22,17 +21,19 @@
@common_all
# input parameters
@click.option(
"--GCF_assignment_file",
type=click.Path(exists=True, file_okay=True, path_type=Path),
"-g",
"--GCF-assignment-file",
type=click.Path(exists=True, dir_okay=False, file_okay=True, path_type=Path),
required=True,
help=(
"Path to GCF assignments file. BiG-SCAPE will compare "
"a run output to these assignments."
),
)
@click.option(
"--BiG_dir",
type=click.Path(exists=True, file_okay=False, path_type=Path),
"-b",
"--BiG-dir",
type=click.Path(exists=True, dir_okay=True, file_okay=False, path_type=Path),
required=True,
help="Path to BiG-SCAPE (v1 or v2) or BiG-SLICE output directory.",
)
Expand All @@ -53,7 +54,6 @@ def benchmark(ctx, *args, **kwargs):

# workflow validations
validate_output_paths(ctx)
validate_disk_only(ctx)

# set start time and label
set_start(ctx.obj)
Expand Down
46 changes: 22 additions & 24 deletions big_scape/cli/cli_common_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ def common_all(fn):
function decorated with new click options
"""
options = [
click.option(
"--config-file-path",
type=click.Path(
exists=True, dir_okay=False, file_okay=True, path_type=Path
),
default=Path(bs_paths.DEFAULT_CONFIG_FILE),
help=(
"Path to BiG-SCAPE config.yml file, which stores values for a "
"series of advanced use parameters. (default: bundled big_scape/config.yml)."
),
),
# diagnostic parameters
click.option(
"-v",
Expand Down Expand Up @@ -72,15 +61,6 @@ def common_all(fn):
"By default, BiG-SCAPE runs will have a name such as [label]_YYYY-MM-DD_HH-MM-SS."
),
),
click.option(
"-c",
"--cores",
default=cpu_count(),
type=int,
help=(
"Set the max number of cores available (default: use all available cores)."
),
),
# output parameters
click.option(
"-o",
Expand All @@ -93,7 +73,7 @@ def common_all(fn):
click.option(
"--log-path",
type=click.Path(
path_type=Path(exists=False), dir_okay=True, file_okay=False
path_type=Path, dir_okay=False, file_okay=True, exists=False
),
help="Path to output log file. (default: output_dir/timestamp.log).",
),
Expand Down Expand Up @@ -131,6 +111,26 @@ def common_cluster_query(fn):
required=True,
help="Input directory containing .gbk files to be used by BiG-SCAPE. See the wiki for more details.",
),
click.option(
"--config-file-path",
type=click.Path(
exists=True, dir_okay=False, file_okay=True, path_type=Path
),
default=Path(bs_paths.DEFAULT_CONFIG_FILE),
help=(
"Path to BiG-SCAPE config.yml file, which stores values for a "
"series of advanced use parameters. (default: bundled big_scape/config.yml)."
),
),
click.option(
"-c",
"--cores",
default=cpu_count(),
type=int,
help=(
"Set the max number of cores available (default: use all available cores)."
),
),
click.option(
"--input-mode",
default="recursive",
Expand Down Expand Up @@ -210,7 +210,6 @@ def common_cluster_query(fn):
),
),
click.option(
# TODO: implement
"--domain-includelist-all-path",
type=click.Path(
exists=True, dir_okay=False, file_okay=True, path_type=Path
Expand All @@ -226,7 +225,6 @@ def common_cluster_query(fn):
),
),
click.option(
# TODO: implement
"--domain-includelist-any-path",
type=click.Path(
exists=True, dir_okay=False, file_okay=True, path_type=Path
Expand Down Expand Up @@ -291,7 +289,7 @@ def common_cluster_query(fn):
help=(
"A comma separated list of floats. "
"Generate networks using multiple distance cutoff values. "
"Values should be in the range [0.0, 1.0]. Example: --gcf_cutoffs 0.1,"
"Values should be in the range [0.0, 1.0]. Example: --gcf-cutoffs 0.1,"
"0.25,0.5,1.0. For more detail see the wiki. (default: 0.3)."
),
),
Expand Down

0 comments on commit da64c16

Please sign in to comment.