commit c23b62a8c82dc9a44661f4972c97e6afd2c1066d Author: wangyunlong <3080433063@qq.com> Date: Tue Jul 28 14:51:15 2026 +0800 feat: consolidate legacy workflows into gyxx-flow diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0d00c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# Python bytecode and tooling +__pycache__/ +*.py[cod] +*.egg-info/ +.pytest_cache/ +.coverage +htmlcov/ + +# Build and virtual environments +build/ +dist/ +.venv/ +venv/ + +# Runtime data, local state, and logs +/var/ +*.log + +# Local credentials and machine-specific configuration +.env +.env.* +!.env.example +config/local/ +config/secrets.* +!config/secrets.example.env + +# IDE and operating-system files +.idea/ +.vscode/ +.DS_Store +Thumbs.db + +# Agent-local learning logs +.learnings/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d2c1103 --- /dev/null +++ b/README.md @@ -0,0 +1,88 @@ +# GYXX Flow + +GYXX Flow 将原来分散在四个项目中的定时工作流和可执行脚本迁入一个可安装、可迁移的模块化项目: + +- `content_marketing`:内容与营销采集 +- `product_commerce`:商品、平台和经营分析 +- `shop_intelligence`:店铺与竞店采集 +- `supply_chain`:供应链采集与通知 + +运行时源码全部位于 `src/gyxx_flow/modules//runtime`。新项目不会从 +`D:\yingxiaoyunying`、`D:\shop-data-flow`、`D:\product-collector-analyze-flow` +或 `E:\auto-flow` 导入或启动代码;这些旧项目仅保留为只读迁移来源和回滚基线。 + +## 安装与验证 + +要求 Python 3.12,推荐使用 `uv`: + +```powershell +cd D:\gyxx-flow +uv sync --python 3.12 --extra test +uv run pytest +uv run gyxx doctor --json +uv run gyxx acceptance status --json +``` + +## 运行工作流 + +```powershell +uv run gyxx list +uv run gyxx run product.daily --date 2026-07-27 +uv run gyxx run product.daily --date 2026-07-27 --execute +``` + +`run`、`backfill` 和 `scripts run` 默认都是无副作用 dry-run;只有显式加 +`--execute` 才会启动迁入后的本地脚本。 + +## 运行任意迁入脚本 + +```powershell +uv run gyxx scripts list +uv run gyxx scripts list --module content_marketing +uv run gyxx scripts run content_marketing:run_all.py --date 2026-07-27 +uv run gyxx scripts run content_marketing:run_all.py --date 2026-07-27 --execute +``` + +脚本 ID 格式为 `:`。Python、BAT/CMD 和 +PowerShell 入口均受统一项目根、数据根、业务日期、run_id 和 shadow 环境约束。 + +## 浏览器与外部系统绑定 + +`config/runtime-bindings.json` 为当前 131 个脚本各自分配固定且唯一的 CDP 端口。 +无论从 workflow、`scripts run` 还是嵌套脚本启动,目标脚本都会重新取得自己的端口和 +`state/browser//