Commit 6479617e authored by Eric Duminil's avatar Eric Duminil
Browse files

Move templates

parent 817a726d
......@@ -30,7 +30,7 @@ print(pv.dataframe)
SimStadt is located automatically via the `SIMSTADT_FOLDER` environment variable, or by searching `~/Desktop` for a `SimStadt2_0.*/` directory.
Workflow templates are resolved via `SIMSTADT_TEMPLATE_PATH`, or a `Template/` directory in the current working directory.
Workflow templates are resolved via `SIMSTADT_TEMPLATE_PATH`, or a `templates/` directory in the current working directory.
## Development
......
......@@ -4,7 +4,7 @@ SimStadt is located via the SIMSTADT_FOLDER environment variable, or by globbing
~/Desktop for SimStadt2_0.*/.
Workflow templates (.flow directories) are located via the SIMSTADT_TEMPLATE_PATH
environment variable. If unset, a Template/ directory in the current working directory
environment variable. If unset, a templates/ directory in the current working directory
is used as a fallback.
"""
......@@ -60,11 +60,11 @@ def get_simstadt_folder() -> Path:
def get_template_path() -> Path:
if "SIMSTADT_TEMPLATE_PATH" in os.environ:
return Path(os.environ["SIMSTADT_TEMPLATE_PATH"])
fallback = Path.cwd() / "Template"
fallback = Path.cwd() / "templates"
if fallback.exists():
return fallback
raise ValueError(
"No template path found. Set SIMSTADT_TEMPLATE_PATH or create a Template/ directory."
"No template path found. Set SIMSTADT_TEMPLATE_PATH or create a templates/ directory."
)
......
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