From a51d20de0b444c97b32a985b83d5b05c45e6b359 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 13 Jul 2026 09:25:50 +0000 Subject: [PATCH] docs: fix MEMORY.md - correct workflow format, remove non-existent commands (#8) --- suite-developer/MEMORY.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/suite-developer/MEMORY.md b/suite-developer/MEMORY.md index a49ff7f..11474e6 100644 --- a/suite-developer/MEMORY.md +++ b/suite-developer/MEMORY.md @@ -21,7 +21,7 @@ steps: - id: my-step name: 我的步骤 - script_id: run # ✅ script_id: run,不是 script: run.py + script: run # ✅ script: run,不是 script: run.py params: input: $params.input_path # ✅ 使用 $params.xxx ``` @@ -30,9 +30,11 @@ steps: | ❌ 错误 | ✅ 正确 | |---------|--------| -| `script: run.py` | `script_id: run` | +| `script: run.py` | `script: run` | +| `script_id: run` | `script: run` | | `params_mapping: {...}` | `params: {...}` | -| `$inputs.xxx` | `${{inputs.xxx}}` | +| `${{inputs.xxx}}` | `$params.xxx` | +| `$inputs.xxx` | `$params.xxx` | ### 跨步骤文件共享 @@ -43,22 +45,27 @@ steps: 开发新套件前,先搜索市场是否已有能复用的 Suite: ```bash -agc suites search 缓冲区 -agc suites search 面积计算 -agc suites search 坐标转换 +curl -s "https://suites.mercator.cn/api/v1/suites/search?q=缓冲区" +curl -s https://suites.mercator.cn/api/v1/suites | python3 -m json.tool ``` -找到现成的 Suite → 在 workflow.yaml 中用 `suite_id` 引用,不写新代码。 +找到现成的 Suite → 在 workflow.yaml 中引用,不写新代码。 找不到 → 写新脚本 → 发布 Suite → 方便后续者复用。 ## 发布流程 -`agc publish` 一键完成:打包 → 上传 → 发布 Suite → 注册 Suite。 +通过 API 上传: + +```bash +tar czf suite.tgz --exclude='.git' --exclude='__pycache__' my-suite/ +curl -X POST https://suites.mercator.cn/api/v1/publish/upload \ + -H "Authorization: Bearer $KEY" \ + -F "file=@suite.tgz" +``` ## 执行环境 - 每个任务跑在独立 Docker 容器中,用完即销毁 -- 容器使用 gis-base 镜像 -- 脚本目录挂载到 `/tmp/scripts`(只读) +- 容器使用 gis-base 镜像(`gis-base:latest`,本地加载) - 工作目录 `/tmp/output`(步骤间共享) -- 参数通过 `/tmp/params.json` 传入 +- 参数通过 `PARAMS_FILE` 环境变量(指向 JSON 文件)或 `sys.argv[1]` JSON 传入