refactor: reorganize repo docs and tooling layout
Consolidate the repository into clearer apps, tools, and layered docs areas so contributors can navigate and maintain it more reliably. Align validation, metadata sync, and CI around the same canonical workflow to reduce drift across local checks and GitHub Actions.
This commit is contained in:
15
tools/scripts/_project_paths.py
Normal file
15
tools/scripts/_project_paths.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def find_repo_root(start_path: str | Path) -> Path:
|
||||
current = Path(start_path).resolve()
|
||||
if current.is_file():
|
||||
current = current.parent
|
||||
|
||||
for candidate in (current, *current.parents):
|
||||
if (candidate / "package.json").is_file() and (candidate / "README.md").is_file():
|
||||
return candidate
|
||||
|
||||
raise FileNotFoundError(f"Could not find repository root from {start_path!r}")
|
||||
Reference in New Issue
Block a user