MCPcopy Create free account
hub / github.com/DVampire/FinAgent / gen_relative_project_path

Function gen_relative_project_path

finagent/utils/file_utils.py:10–18  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

8 return path
9
10def gen_relative_project_path(path):
11
12 root = get_project_root()
13
14 if root not in path:
15 raise ValueError('Path to convert should be within the project root.')
16
17 path = path.replace(root, '.').replace('.\\', '')
18 return path
19
20def exists_in_project_path(path):
21 return os.path.exists(assemble_project_path(path))

Callers

nothing calls this directly

Calls 1

get_project_rootFunction · 0.85

Tested by

no test coverage detected