Skip to content

Commit 072f8b3

Browse files
committed
WIP: everything is broken, refactoring fixtures to have a single Docker for PG and one for Slurm
1 parent 034fcd8 commit 072f8b3

File tree

15 files changed

+831
-742
lines changed

15 files changed

+831
-742
lines changed

autosubmit/config/basicconfig.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,22 @@ def read():
223223

224224
BasicConfig._update_config()
225225
return
226+
227+
228+
def generate_dirs() -> None:
229+
"""Generates the directory structure needed for Autosubmit operation."""
230+
Path(BasicConfig.DB_DIR).mkdir(parents=True, exist_ok=True)
231+
Path(BasicConfig.LOCAL_ROOT_DIR).mkdir(parents=True, exist_ok=True)
232+
Path(BasicConfig.STRUCTURES_DIR).mkdir(parents=True, exist_ok=True)
233+
Path(BasicConfig.GLOBAL_LOG_DIR).mkdir(parents=True, exist_ok=True)
234+
Path(BasicConfig.DEFAULT_OUTPUT_DIR).mkdir(parents=True, exist_ok=True)
235+
Path(BasicConfig.JOBDATA_DIR).mkdir(parents=True, exist_ok=True)
236+
Path(BasicConfig.HISTORICAL_LOG_DIR).mkdir(parents=True, exist_ok=True)
237+
238+
os.chmod(BasicConfig.DB_DIR, 0o770)
239+
os.chmod(BasicConfig.LOCAL_ROOT_DIR, 0o770)
240+
os.chmod(BasicConfig.STRUCTURES_DIR, 0o770)
241+
os.chmod(BasicConfig.GLOBAL_LOG_DIR, 0o770)
242+
os.chmod(BasicConfig.DEFAULT_OUTPUT_DIR, 0o770)
243+
os.chmod(BasicConfig.JOBDATA_DIR, 0o770)
244+
os.chmod(BasicConfig.HISTORICAL_LOG_DIR, 0o770)

0 commit comments

Comments
 (0)