Skip to content

Commit

Permalink
enh(settings): Remove base_path redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
coroa committed Apr 22, 2024
1 parent 856f08a commit e6cca5b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion notebooks/example_config.yaml
@@ -1,4 +1,3 @@
# Setting `base_path` redirects everything else from there
out_path: "../results"
data_path: "../data/<my project>" # this needs to be changed based on where you want to store your own data

Expand Down
6 changes: 0 additions & 6 deletions src/concordia/settings.py
Expand Up @@ -51,22 +51,16 @@ class Settings:

@staticmethod
def resolve_paths(config):
base_path = Path(config["base_path"]) if "base_path" in config else None

def expand(path):
if path[0] == "$":
reference, relative = path[1:].split("/", 1)
return expand(config[reference]) / relative

if base_path is not None:
return (base_path / path).expanduser()

return Path(path).expanduser()

expanded = {
key: (expand(val) if key.endswith("_path") else val)
for key, val in config.items()
if key != "base_path"
}

# Special treatment for path entry in regionmappings
Expand Down

0 comments on commit e6cca5b

Please sign in to comment.