Files

31 lines
915 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 套件开发最佳实践
## 命名规范
- 使用英文小写 + 连字符:`buffer-analysis``land-use-classification`
- 名称反映功能:`stream-extraction` 而非 `my-suite-1`
- 参数名用 snake_case`input_path``buffer_distance`
## 查市场
开发新套件前,先查询市场是否已有能复用的套件:
```bash
curl -s https://suites.mercator.cn/api/v1/suites | python3 -c "import json,sys; [print(s['name']) for s in json.load(sys.stdin)]"
```
## 模板复用
有现成的 Suite → 在 workflow.yaml 中用 `suite_id` 引用。
找不到 → 写新脚本 → 发布为新 Suite → 方便后续者复用。
## 调试技巧
`agc run` 时,注意观察:
1. 是否成功解析套件和下载 package_url
2. 输入文件是否复制到工作目录
3. 执行输出(Linux Docker 容器内或 Windows 本机进程)
日志在控制台直接打印,无需额外配置。