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
b525ba4f
Commit
b525ba4f
authored
Mar 13, 2026
by
Eric Duminil
Browse files
Change priority order
parent
4b445377
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/simstadt/runner.py
View file @
b525ba4f
...
...
@@ -251,13 +251,10 @@ def _is_in_proj_folder(path: Path) -> bool:
def
_resolve_project
(
citygml_path
:
Path
,
project_path
:
Path
|
None
)
->
tuple
[
Path
,
str
]:
"""Return (project_path, citygml_filename) based on CityGML location.
- project_path given: copy CityGML there if not already present (takes priority).
- CityGML inside a .proj folder: use parent as project, reference by name.
- project_path given: copy CityGML there if not already present.
- Neither: create a temporary repository under /tmp (not auto-cleaned).
"""
if
_is_in_proj_folder
(
citygml_path
):
return
citygml_path
.
parent
,
citygml_path
.
name
if
project_path
is
not
None
:
project_path
.
mkdir
(
exist_ok
=
True
,
parents
=
True
)
dest
=
project_path
/
citygml_path
.
name
...
...
@@ -266,6 +263,9 @@ def _resolve_project(citygml_path: Path, project_path: Path | None) -> tuple[Pat
log
.
info
(
"Copied %s to %s"
,
citygml_path
.
name
,
project_path
)
return
project_path
,
citygml_path
.
name
if
_is_in_proj_folder
(
citygml_path
):
return
citygml_path
.
parent
,
citygml_path
.
name
tmp_proj
=
SIMSTADT_TEMP_REPO
/
(
citygml_path
.
stem
+
".proj"
)
tmp_proj
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
dest
=
tmp_proj
/
citygml_path
.
name
...
...
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