docs: fix MEMORY.md - correct workflow format, remove non-existent commands (#8)

This commit is contained in:
2026-07-13 09:25:50 +00:00
parent 157f120c3d
commit a51d20de0b
+18 -11
View File
@@ -21,7 +21,7 @@
steps: steps:
- id: my-step - id: my-step
name: 我的步骤 name: 我的步骤
script_id: run # ✅ script_id: run,不是 script: run.py script: run # ✅ script: run,不是 script: run.py
params: params:
input: $params.input_path # ✅ 使用 $params.xxx 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: {...}` | | `params_mapping: {...}` | `params: {...}` |
| `$inputs.xxx` | `${{inputs.xxx}}` | | `${{inputs.xxx}}` | `$params.xxx` |
| `$inputs.xxx` | `$params.xxx` |
### 跨步骤文件共享 ### 跨步骤文件共享
@@ -43,22 +45,27 @@ steps:
开发新套件前,先搜索市场是否已有能复用的 Suite: 开发新套件前,先搜索市场是否已有能复用的 Suite:
```bash ```bash
agc suites search 缓冲区 curl -s "https://suites.mercator.cn/api/v1/suites/search?q=缓冲区"
agc suites search 面积计算 curl -s https://suites.mercator.cn/api/v1/suites | python3 -m json.tool
agc suites search 坐标转换
``` ```
找到现成的 Suite → 在 workflow.yaml 中`suite_id` 引用,不写新代码。 找到现成的 Suite → 在 workflow.yaml 中引用,不写新代码。
找不到 → 写新脚本 → 发布 Suite → 方便后续者复用。 找不到 → 写新脚本 → 发布 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 容器中,用完即销毁 - 每个任务跑在独立 Docker 容器中,用完即销毁
- 容器使用 gis-base 镜像 - 容器使用 gis-base 镜像`gis-base:latest`,本地加载)
- 脚本目录挂载到 `/tmp/scripts`(只读)
- 工作目录 `/tmp/output`(步骤间共享) - 工作目录 `/tmp/output`(步骤间共享)
- 参数通过 `/tmp/params.json` 传入 - 参数通过 `PARAMS_FILE` 环境变量(指向 JSON 文件)或 `sys.argv[1]` JSON 传入