Skip to content

Commit

Permalink
Add default arguments for Typer Option
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzLamm committed Jul 25, 2023
1 parent 0890128 commit 846bbb1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/membrain_seg/annotations/extract_patch_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
@cli.command(name="extract_patches", no_args_is_help=True)
def extract_patches(
tomogram_path: str = Option( # noqa: B008
help="Path to the tomogram to extract patches from.", **PKWARGS
..., help="Path to the tomogram to extract patches from.", **PKWARGS
),
segmentation_path: str = Option( # noqa: B008
help="Path to the corresponding segmentation file.", **PKWARGS
..., help="Path to the corresponding segmentation file.", **PKWARGS
),
out_folder: str = Option( # noqa: B008
...,
help="Path to the folder where extracted patches should be stored. \
(subdirectories will be created)"
(subdirectories will be created)",
),
coords_file: str = Option( # noqa: B008
None,
Expand Down
4 changes: 3 additions & 1 deletion src/membrain_seg/annotations/merge_corrections_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
@cli.command(name="merge_corrections", no_args_is_help=True)
def merge_corrections(
labels_dir: str = Option( # noqa: B008
help="Path to the directory containing label files.", **PKWARGS
..., help="Path to the directory containing label files.", **PKWARGS
),
corrections_dir: str = Option( # noqa: B008
...,
help="Path to the directory containing correction folders. Each correction \
folder should have the \
same name as the corresponding label file (without the file extension).",
**PKWARGS,
),
out_dir: str = Option( # noqa: B008
...,
help="Path to the directory where corrected label files will be saved.",
**PKWARGS,
),
Expand Down
6 changes: 4 additions & 2 deletions src/membrain_seg/segmentation/cli/segment_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
@cli.command(name="segment", no_args_is_help=True)
def segment(
tomogram_path: str = Option( # noqa: B008
help="Path to the tomogram to be segmented", **PKWARGS
..., help="Path to the tomogram to be segmented", **PKWARGS
),
ckpt_path: str = Option( # noqa: B008
help="Path to the pre-trained model checkpoint that should be used.", **PKWARGS
...,
help="Path to the pre-trained model checkpoint that should be used.",
**PKWARGS,
),
out_folder: str = Option( # noqa: B008
"./predictions", help="Path to the folder where segmentations should be stored."
Expand Down
2 changes: 2 additions & 0 deletions src/membrain_seg/segmentation/cli/train_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@cli.command(name="train", no_args_is_help=True)
def train(
data_dir: str = Option( # noqa: B008
...,
help='Data directory path, following the required structure. To learn more \
about the required data structure, type "membrain data_structure_help"',
**PKWARGS,
Expand Down Expand Up @@ -54,6 +55,7 @@ def train(
@cli.command(name="train_advanced", no_args_is_help=True)
def train_advanced(
data_dir: str = Option( # noqa: B008
...,
help='Data directory path, following the required structure. \
To learn more about the required\
data structure, type "membrain data_structure_help"',
Expand Down

0 comments on commit 846bbb1

Please sign in to comment.