Skip to content

Commit 4b30285

Browse files
Fixed automated doc generation errors
1 parent 01fffe1 commit 4b30285

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

ecosystem/third_party/pocketflow/scripts/detect_changed_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
by checking git diff against the tool-doc-map.json.
55
66
Usage:
7-
python ecosystem/pocketflow/scripts/detect_changed_tools.py [--base-ref <ref>]
7+
python ecosystem/third_party/pocketflow/scripts/detect_changed_tools.py [--base-ref <ref>]
88
99
Returns a list of tool names (one per line) that have changed.
1010
"""
@@ -17,15 +17,15 @@
1717
import sys
1818
from pathlib import Path
1919

20-
# Repo root is three levels up from this script
21-
REPO_ROOT = Path(__file__).resolve().parents[3]
22-
POCKETFLOW_DIR = REPO_ROOT / "ecosystem" / "pocketflow"
20+
# .../ecosystem/third_party/pocketflow/scripts/this_file.py
21+
POCKETFLOW_DIR = Path(__file__).resolve().parents[1]
22+
REPO_ROOT = POCKETFLOW_DIR.parents[2]
2323
TOOL_MAP_PATH = POCKETFLOW_DIR / "tool-doc-map.json"
2424

2525
# Exclude these paths from triggering updates
2626
EXCLUDE_PATTERNS = [
2727
"ecosystem/AI-Tooling/beacon/**", # Don't trigger on doc changes
28-
"ecosystem/pocketflow/**", # Don't trigger on pocketflow changes
28+
"ecosystem/third_party/pocketflow/**", # Don't trigger on pocketflow changes
2929
]
3030

3131

ecosystem/third_party/pocketflow/scripts/run_pocketflow_for_tool.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Usage (from repo root):
77
8-
python ecosystem/pocketflow/scripts/run_pocketflow_for_tool.py --tool rescontract
8+
python ecosystem/third_party/pocketflow/scripts/run_pocketflow_for_tool.py --tool rescontract
99
1010
This will:
1111
- Look up `rescontract` in tool-doc-map.json
@@ -23,10 +23,9 @@
2323
import sys
2424
from pathlib import Path
2525

26-
# Repo root is three levels up from this script:
27-
# ecosystem/pocketflow/scripts/run_pocketflow_for_tool.py
28-
REPO_ROOT = Path(__file__).resolve().parents[3]
29-
POCKETFLOW_DIR = REPO_ROOT / "ecosystem" / "pocketflow"
26+
# .../ecosystem/third_party/pocketflow/scripts/run_pocketflow_for_tool.py
27+
POCKETFLOW_DIR = Path(__file__).resolve().parents[1]
28+
REPO_ROOT = POCKETFLOW_DIR.parents[2]
3029
OUTPUT_BASE = POCKETFLOW_DIR / ".pf-output"
3130

3231

@@ -55,7 +54,7 @@ def run_pocketflow_for_dir(
5554
single_file: bool = False,
5655
) -> Path:
5756
"""
58-
Invoke ecosystem/pocketflow/main.py pointing at code_root and
57+
Invoke ecosystem/third_party/pocketflow/main.py pointing at code_root and
5958
returning the expected path to index.md for the generated project.
6059
"""
6160
main_py = POCKETFLOW_DIR / "main.py"

ecosystem/third_party/pocketflow/scripts/update_mdx_section.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
with fresh content produced by Pocketflow.
55
66
Usage:
7-
python ecosystem/pocketflow/scripts/update_mdx_section.py \
7+
python ecosystem/third_party/pocketflow/scripts/update_mdx_section.py \
88
--tool rescontract \
99
--body-file /tmp/rescontract_body.md
1010
"""
@@ -18,9 +18,9 @@
1818
import sys
1919
from pathlib import Path
2020

21-
# Repo root is three levels up from this script:
22-
# ecosystem/pocketflow/scripts/update_mdx_section.py
23-
REPO_ROOT = Path(__file__).resolve().parents[3]
21+
# .../ecosystem/third_party/pocketflow/scripts/update_mdx_section.py
22+
POCKETFLOW_DIR = Path(__file__).resolve().parents[1]
23+
REPO_ROOT = POCKETFLOW_DIR.parents[2]
2424
DEFAULT_TEMPLATE = """# {title}
2525
2626
{{/* BEGIN AUTO_DOC: {name} */}}
@@ -32,7 +32,7 @@
3232

3333

3434
def load_tool_map() -> list[dict]:
35-
tool_map_path = REPO_ROOT / "ecosystem" / "pocketflow" / "tool-doc-map.json"
35+
tool_map_path = POCKETFLOW_DIR / "tool-doc-map.json"
3636
try:
3737
with tool_map_path.open("r", encoding="utf-8") as fh:
3838
return json.load(fh)

0 commit comments

Comments
 (0)