Standardisation 2
This commit is contained in:
@@ -6,6 +6,7 @@ from .cli import (
|
||||
evaluation_parser,
|
||||
evaluation_workspace,
|
||||
execute,
|
||||
standard_parser,
|
||||
workspace_from_args,
|
||||
)
|
||||
from .json_io import (
|
||||
@@ -35,5 +36,6 @@ __all__ = [
|
||||
"evaluation_workspace",
|
||||
"execute",
|
||||
"read_json",
|
||||
"standard_parser",
|
||||
"workspace_from_args",
|
||||
]
|
||||
|
||||
+11
-6
@@ -30,13 +30,8 @@ class CliError(Exception):
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
def evaluation_parser(description: str) -> argparse.ArgumentParser:
|
||||
def standard_parser(description: str) -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(description=description)
|
||||
parser.add_argument(
|
||||
"evaluation",
|
||||
type=Path,
|
||||
help="Evaluation directory",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--verbose",
|
||||
action="store_true",
|
||||
@@ -45,6 +40,16 @@ def evaluation_parser(description: str) -> argparse.ArgumentParser:
|
||||
return parser
|
||||
|
||||
|
||||
def evaluation_parser(description: str) -> argparse.ArgumentParser:
|
||||
parser = standard_parser(description)
|
||||
parser.add_argument(
|
||||
"evaluation",
|
||||
type=Path,
|
||||
help="Evaluation directory",
|
||||
)
|
||||
return parser
|
||||
|
||||
|
||||
def evaluation_workspace(
|
||||
path: str | Path,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user