Commit 6947ca38 authored by Eric Duminil's avatar Eric Duminil
Browse files

Protect some methods

parent a9b769bf
......@@ -85,7 +85,7 @@ def _regionchooser_script() -> str:
)
def check_paths(repo_path: Path, workflow_path: Path) -> None:
def _check_paths(repo_path: Path, workflow_path: Path) -> None:
if not repo_path.exists():
raise ValueError(f"Repository not found: {repo_path}")
if not workflow_path.exists():
......@@ -94,7 +94,7 @@ def check_paths(repo_path: Path, workflow_path: Path) -> None:
raise ValueError(f"No params.xml in {workflow_path}")
def prepare_workflow(workflow_path: Path, citygmls: list[str]) -> str:
def _prepare_workflow(workflow_path: Path, citygmls: list[str]) -> str:
"""Inject CityGML file names into the workflow's params.xml. Returns the workflow name."""
tree = et.parse(workflow_path / PARAMS)
root = tree.getroot()
......@@ -238,8 +238,8 @@ def run_regionchooser(*params: str) -> str:
def run_workflow(workflow_path: Path, citygmls: list[str]) -> list[Path]:
"""Prepare and run a SimStadt workflow. Returns the list of files written by SimStadt."""
repo_path = workflow_path.parent.parent
check_paths(repo_path, workflow_path)
name = prepare_workflow(workflow_path, citygmls)
_check_paths(repo_path, workflow_path)
name = _prepare_workflow(workflow_path, citygmls)
before = _get_all_files(workflow_path)
run_simstadt(workflow_path, name)
after = _get_all_files(workflow_path)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment