Skip to content

Commit

Permalink
Add no-validate flag to scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
guilara committed Jul 30, 2024
1 parent 8fd717f commit 6f41978
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions support/Python/Schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def schedule(
submit: Optional[bool] = None,
clean_output: bool = False,
force: bool = False,
no_validate=False,
extra_params: dict = {},
**kwargs,
) -> Optional[subprocess.CompletedProcess]:
Expand Down Expand Up @@ -541,10 +542,12 @@ def schedule(
force=force,
)

# Validate input file
validate_input_file(
input_file_path.resolve(), executable=executable, work_dir=run_dir
)
if not no_validate:
# Validate input file
validate_input_file(
input_file_path.resolve(), executable=executable, work_dir=run_dir
)

# - If the input file may request resubmissions, make sure we have a
# segments directory
metadata, input_file = yaml.safe_load_all(rendered_input_file)
Expand Down Expand Up @@ -854,6 +857,11 @@ def scheduler_options(f):
"You may also want to use '--clean-output'."
),
)
@click.option(
"--no-validate",
is_flag=True,
help="Skip validation of the input file.",
)
# Scheduling options
@click.option(
"--scheduler",
Expand Down
1 change: 1 addition & 0 deletions tests/support/Python/Test_Schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ 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 6f41978

Please sign in to comment.