Commit 07842c62 authored by Eric Duminil's avatar Eric Duminil
Browse files

Done

parent 196fb489
...@@ -269,6 +269,7 @@ def _resolve_project(citygml_path: Path, project_path: Path | None) -> tuple[Pat ...@@ -269,6 +269,7 @@ def _resolve_project(citygml_path: Path, project_path: Path | None) -> tuple[Pat
if not citygml_path.exists(): if not citygml_path.exists():
raise FileNotFoundError(f"{citygml_path} not found") raise FileNotFoundError(f"{citygml_path} not found")
if project_path is not None: if project_path is not None:
project_path = project_path.with_suffix('.proj')
project_path.mkdir(exist_ok=True, parents=True) project_path.mkdir(exist_ok=True, parents=True)
dest = project_path / citygml_path.name dest = project_path / citygml_path.name
if not dest.exists(): if not dest.exists():
...@@ -294,8 +295,6 @@ def run_workflow_with_citygml( ...@@ -294,8 +295,6 @@ def run_workflow_with_citygml(
replaces: dict | None = None, replaces: dict | None = None,
description: str | None = None, description: str | None = None,
destination: str | None = None, destination: str | None = None,
# TODO: Accept str too?
# TODO: Add .proj if needed
project_path: Path | None = None, project_path: Path | None = None,
) -> SimStadtResults: ) -> SimStadtResults:
"""Copy a workflow template, inject parameters, run SimStadt, and return parsed results. """Copy a workflow template, inject parameters, run SimStadt, and return parsed results.
...@@ -316,7 +315,7 @@ def run_workflow_with_citygml( ...@@ -316,7 +315,7 @@ def run_workflow_with_citygml(
if isinstance(template, str): if isinstance(template, str):
template_path = get_template_path() / template template_path = get_template_path() / template
else: else:
template_path = Path(template) template_path = template
template_name = template_path.stem template_name = template_path.stem
if destination is None: if destination is None:
......
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