File tree Expand file tree Collapse file tree
ecosystem/third_party/pocketflow/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44by checking git diff against the tool-doc-map.json.
55
66Usage:
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
99Returns a list of tool names (one per line) that have changed.
1010"""
1717import sys
1818from 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 ]
2323TOOL_MAP_PATH = POCKETFLOW_DIR / "tool-doc-map.json"
2424
2525# Exclude these paths from triggering updates
2626EXCLUDE_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
Original file line number Diff line number Diff line change 55
66Usage (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
1010This will:
1111 - Look up `rescontract` in tool-doc-map.json
2323import sys
2424from 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 ]
3029OUTPUT_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"
Original file line number Diff line number Diff line change 44with fresh content produced by Pocketflow.
55
66Usage:
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"""
1818import sys
1919from 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 ]
2424DEFAULT_TEMPLATE = """# {title}
2525
2626{{/* BEGIN AUTO_DOC: {name} */}}
3232
3333
3434def 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 )
You can’t perform that action at this time.
0 commit comments