Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
simstadtpy
Commits
6947ca38
Commit
6947ca38
authored
Mar 16, 2026
by
Eric Duminil
Browse files
Protect some methods
parent
a9b769bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/simstadt/runner.py
View file @
6947ca38
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment