()
| 139 | |
| 140 | |
| 141 | def find_configuration() -> Path: # TODO: add tests |
| 142 | pth = Path(os.environ.get("AURA_CFG", "aura_config.yaml")) |
| 143 | if pth.is_absolute(): |
| 144 | return pth |
| 145 | |
| 146 | cwd = Path.cwd() |
| 147 | root = (cwd.root, cwd.drive, "/") |
| 148 | while str(cwd) not in root: |
| 149 | if (cwd / pth).exists(): |
| 150 | return cwd/pth |
| 151 | else: |
| 152 | cwd = cwd.parent |
| 153 | |
| 154 | return Path(DEFAULT_CFG_PATH) |
| 155 | |
| 156 | |
| 157 | def get_file_location(location: str, base_path: Optional[str]=None, exc: bool=True) -> str: |
no test coverage detected