Skip to content

Commit

Permalink
Merge pull request #117 from AD-SDL/experiment_list_fixes
Browse files Browse the repository at this point in the history
Experiment list fixes
  • Loading branch information
LuckierDodge committed Apr 25, 2024
2 parents 825a9f9 + ffcd928 commit 151598e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ad_sdl.wei"
version = "0.5.7"
version = "0.5.8"
description = "The Rapid Prototyping Laboratory's Workflow Execution Interface."
authors = [
{name = "Rafael Vescovi", email = "ravescovi@anl.gov"},
Expand Down
10 changes: 7 additions & 3 deletions wei/core/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run_dir(self) -> Path:


def list_experiments():
"""Return a list of all experiments in the Config folger
"""Return a list of all experiments in the Config folder
Returns
-------
Expand All @@ -83,6 +83,10 @@ def list_experiments():
pat1 = r"(.+)_id_(.+)"
all_exps = {}
for exp in all_exps_raw:
test = re.match(pat1, exp)
all_exps[test[2]] = test[1]
try:
test = re.match(pat1, exp)
all_exps[test[2]] = test[1]
except Exception:
# Incorrectly formatted folder name, ignore
pass
return all_exps
3 changes: 3 additions & 0 deletions wei/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def initialize_state() -> None:
from wei.core.state_manager import StateManager

state_manager = StateManager()
Config.data_directory.mkdir(parents=True, exist_ok=True)
(Config.data_directory / "experiments").mkdir(exist_ok=True)
(Config.data_directory / "temp").mkdir(exist_ok=True)
state_manager.set_workcell(Workcell.from_yaml(Config.workcell_file))
initialize_workcell_modules()
initialize_workcell_locations()
Expand Down

0 comments on commit 151598e

Please sign in to comment.