Skip to content

Commit 543e60c

Browse files
committed
simplify user interface and fix missing arguments to pipeline constructor
1 parent 188f65c commit 543e60c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

scripts/correction_computation_pipeline.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ def __init__(
2626
path_list_file: ExtantFile,
2727
output_root: ExtantFolder,
2828
version_name: str,
29-
pypiper_folder: ExtantFolder,
3029
**pl_mgr_kwargs: Any,
3130
) -> None:
3231
self.version_name = version_name
3332
self.weights_root = NonExtantPath(output_root / ZARR_NAME)
3433
self.visualization_folder = output_root / "visualization"
3534
with path_list_file.path.open(mode="r") as pathlist:
3635
self.input_paths: list[Path] = [Path(line.strip()) for line in pathlist.readlines() if line.strip()]
37-
super().__init__(name=PIPE_NAME, outfolder=str(pypiper_folder.path), **pl_mgr_kwargs)
36+
super().__init__(name=PIPE_NAME, outfolder=str(output_root.path / "pypiper"), **pl_mgr_kwargs)
3837

3938
def stages(self) -> list[pypiper.Stage]:
4039
return [
@@ -82,12 +81,6 @@ def parse_cli(args: Iterable[str]) -> argparse.Namespace:
8281
required=True,
8382
help="Name for the version of the weights/scalings to be produced by this run of the program",
8483
)
85-
parser.add_argument(
86-
"--pypiper-folder",
87-
type=ExtantFolder.from_string,
88-
required=True,
89-
help="Path to folder for pypiper output",
90-
)
9184
parser.add_argument(
9285
NO_TEE_LOGS_OPTNAME,
9386
action="store_true",
@@ -103,8 +96,9 @@ def parse_cli(args: Iterable[str]) -> argparse.Namespace:
10396

10497
def init(opts: argparse.Namespace) -> CorrectionComputationPipeline:
10598
kwargs = {
99+
"path_list_file": opts.path_list_file,
100+
"version_name": opts.version_name,
106101
"output_root": opts.output_root,
107-
"pypiper_folder": opts.pypiper_folder,
108102
}
109103
if opts.do_not_tee_logs:
110104
kwargs["multi"] = True

0 commit comments

Comments
 (0)