MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / find_configuration

Function find_configuration

aura/config.py:141–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139
140
141def 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
157def get_file_location(location: str, base_path: Optional[str]=None, exc: bool=True) -> str:

Callers 2

load_configFunction · 0.85
config.pyFile · 0.85

Calls 2

getMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected