Skip to content

Commit 151598e

Browse files
authored
Merge pull request #117 from AD-SDL/experiment_list_fixes
Experiment list fixes
2 parents 825a9f9 + ffcd928 commit 151598e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ad_sdl.wei"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
description = "The Rapid Prototyping Laboratory's Workflow Execution Interface."
55
authors = [
66
{name = "Rafael Vescovi", email = "[email protected]"},

wei/core/experiment.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def run_dir(self) -> Path:
7272

7373

7474
def list_experiments():
75-
"""Return a list of all experiments in the Config folger
75+
"""Return a list of all experiments in the Config folder
7676
7777
Returns
7878
-------
@@ -83,6 +83,10 @@ def list_experiments():
8383
pat1 = r"(.+)_id_(.+)"
8484
all_exps = {}
8585
for exp in all_exps_raw:
86-
test = re.match(pat1, exp)
87-
all_exps[test[2]] = test[1]
86+
try:
87+
test = re.match(pat1, exp)
88+
all_exps[test[2]] = test[1]
89+
except Exception:
90+
# Incorrectly formatted folder name, ignore
91+
pass
8892
return all_exps

wei/helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def initialize_state() -> None:
5656
from wei.core.state_manager import StateManager
5757

5858
state_manager = StateManager()
59+
Config.data_directory.mkdir(parents=True, exist_ok=True)
60+
(Config.data_directory / "experiments").mkdir(exist_ok=True)
61+
(Config.data_directory / "temp").mkdir(exist_ok=True)
5962
state_manager.set_workcell(Workcell.from_yaml(Config.workcell_file))
6063
initialize_workcell_modules()
6164
initialize_workcell_locations()

0 commit comments

Comments
 (0)