Spaces:
Running
Running
File size: 328 Bytes
bf5c0e0 |
1 2 3 4 5 6 7 8 9 10 11 12 |
from pathlib import Path
import os
def get_project_root():
root = str(Path(__file__).resolve().parents[2])
return root
def assemble_project_path(path):
"""Assemble a path relative to the project root directory"""
if not os.path.isabs(path):
path = os.path.join(get_project_root(), path)
return path |