Assemble a path relative to the project root directory Args: path: Path string (relative or absolute) Returns: str: Absolute path string
(path: str)
| 6 | return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) |
| 7 | |
| 8 | def assemble_project_path(path: str) -> str: |
| 9 | """Assemble a path relative to the project root directory |
| 10 | |
| 11 | Args: |
| 12 | path: Path string (relative or absolute) |
| 13 | |
| 14 | Returns: |
| 15 | str: Absolute path string |
| 16 | """ |
| 17 | if os.path.isabs(path): |
| 18 | return os.path.abspath(path) |
| 19 | else: |
| 20 | return os.path.abspath(os.path.join(get_project_root(), path)) |