(location: str, base_path: Optional[str]=None)
| 184 | |
| 185 | |
| 186 | def get_file_content(location: str, base_path: Optional[str]=None) -> str: |
| 187 | pth = get_file_location(location, base_path) |
| 188 | |
| 189 | if pth.startswith("aura.data."): # Load file as a resource from aura package |
| 190 | filename = pth[len("aura.data."):] |
| 191 | return resources.read_text("aura.data", filename) |
| 192 | |
| 193 | else: |
| 194 | with open(location, "r") as fd: |
| 195 | return fd.read() |
| 196 | |
| 197 | |
| 198 | def parse_config(pth, default_pth) -> dict: |
no test coverage detected