Skip to content

Commit

Permalink
Change name of option
Browse files Browse the repository at this point in the history
  • Loading branch information
guilara committed Aug 5, 2024
1 parent fd60a33 commit a94ce0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 7 additions & 5 deletions support/Python/Schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def schedule(
submit: Optional[bool] = None,
clean_output: bool = False,
force: bool = False,
no_validate=False,
validate: Optional[bool] = None,
extra_params: dict = {},
**kwargs,
) -> Optional[subprocess.CompletedProcess]:
Expand Down Expand Up @@ -320,6 +320,8 @@ def schedule(
files in the 'run_dir' before scheduling the run. (Default: 'False')
force: Optional. When 'True', overwrite input file and submit script
in the 'run_dir' instead of raising an error when they already exist.
validate: Optional. When 'True', validate that the input file is parsed
correctly. When 'False' skip this step.
extra_params: Optional. Dictionary of extra parameters passed to input
file and submit script templates. Parameters can also be passed as
keyword arguments to this function instead.
Expand Down Expand Up @@ -549,7 +551,7 @@ def schedule(
force=force,
)

if not no_validate:
if validate or validate is None:
# Validate input file
validate_input_file(
input_file_path.resolve(), executable=executable, work_dir=run_dir
Expand Down Expand Up @@ -865,9 +867,9 @@ def scheduler_options(f):
),
)
@click.option(
"--no-validate",
is_flag=True,
help="Skip validation of the input file.",
"--validate/--no-validate",
default=None,
help="Validate or skip the validation of the input file.",
)
# Scheduling options
@click.option(
Expand Down
1 change: 0 additions & 1 deletion tests/support/Python/Test_Schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def test_schedule(self):
extra_option="TestOpt",
metadata_option="MetaOpt",
force=False,
no_validate=False,
input_file="InputFile.yaml",
input_file_name="InputFile.yaml",
input_file_template=str(self.test_dir / "InputFile.yaml"),
Expand Down

0 comments on commit a94ce0f

Please sign in to comment.