Commit e9feeae2 authored by Sebastien Tourbier's avatar Sebastien Tourbier
Browse files

feat(handlers.project): create initial documents directory structure with...

feat(handlers.project): create initial documents directory structure with "clinical", "reports", "protocols", "other" folders
parent c35a49ad
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -14,10 +14,7 @@ from bids_tools.bids.dataset import create_empty_bids_dataset


PROJECT_FOLDERS = ["code", "documents", "inputs/bids-dataset", "outputs"]

PROJECT_DOCUMENTS = [
    "README.md",
]
DOCUMENTS_FOLDERS = ["clinical", "reports", "protocols", "other"]


def initialize_project_structure(
@@ -40,6 +37,10 @@ def initialize_project_structure(
    for folder in PROJECT_FOLDERS:
        os.makedirs(project_dir / folder, exist_ok=True)

    # Create initial documents directory structure
    for folder in DOCUMENTS_FOLDERS:
        os.makedirs(project_dir / "documents" / folder, exist_ok=True)

    # Create initial project README.md file
    with open(project_dir / "README.md", "w") as f:
        f.writelines([f"# {project_title}\n\n", f"{project_description}"])