takflow
takflow(tak 取自 takler + flow)是面向 CEMC 数值天气预报模式系统的统一工作流生成框架。
它提供了一套通用的配置模型、作业资源描述契约、工作流引擎抽象和渲染工具,让业务工作流生成器专注于领域逻辑,而无需重复实现 ecFlow 定义生成、作业脚本渲染、资源载体切换等通用能力。 目前已应用如下系统流程中(内部访问):
- mcv-workflow
- cma-gfs-post-workflow
安装
要求 Python >= 3.10。
使用 pip 安装最新发布版本:
pip install takflow
或者通过源代码安装最新开发版本:
git clone https://github.com/cemc-oper/takflow.git
# or in CMA, use metcode
# git clone http://e.mc.met.cma/codingcorp/cemc-takler/takflow.git
cd takflow
pip install .
快速上手
标准应用通过 Application 声明配置、资源和领域 suite builder,再由标准构建消费同一个有效上下文:
from pathlib import Path
from takflow.application import Application, ApplicationBrand
from takflow.build import build
from takflow.config import BaseWorkflowConfig
class MyConfig(BaseWorkflowConfig):
"""通用字段由框架继承,这里只添加领域字段。"""
def create_suite(config, engine):
suite = engine.Suite(config.workflow_name)
suite.add_family("main").add_task("forecast")
return suite
application = Application(
config_type=MyConfig,
resources=Path("src/my_workflow/resources"),
suite_builder=create_suite,
brand=ApplicationBrand("my-workflow", "0.1.0"),
)
with application.prepare("config/my_config.yaml", output_repo_base="build") as context:
result = build(context)
应用的资源目录还需提供配置、作业模板和静态脚本。完整的底层 API 与旧 CLI 示例见 examples/toyflow/;标准应用路径见设计总览和应用声明。
文档
在线文档:https://takflow.readthedocs.io/
许可
takflow 采用 Apache-2.0 许可证。
Metadata
Release files for takflow 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| takflow-0.3.0.tar.gz | 363.5 kB | With provenance | Details for takflow-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| takflow-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for takflow-0.3.0-py3-none-any.whl |
Total release size: 494.7 kB
Release files / takflow-0.3.0.tar.gz
| Download URL | takflow-0.3.0.tar.gz |
|---|---|
| Size | 363.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9956cd9d85d90a9b19d3e9bec35798417096ef973e49cc901760007fffe97b9
|
|
BLAKE2b-256 checksum How to use checksums |
3841684910b2cf2137044901fb971399235199c64bf4ea96012868a9aa2ebda7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / takflow-0.3.0-py3-none-any.whl
| Download URL | takflow-0.3.0-py3-none-any.whl |
|---|---|
| Size | 131.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51fa23ba964dfdb2525b8b969d5724240f117423e62760a2953d4829e2b393f7
|
|
BLAKE2b-256 checksum How to use checksums |
d78c60c490c64142313ac35535a741e9babee6a2286a2019c61721d2aca59146
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for takflow 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for takflow-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.