模块化:为模块使用 GitHub 存储库中的 config.yaml 文件

问题描述 投票:0回答:0

我想使用现有的

snakemake
工作流程(
technology_data
)作为
module
进入另一个工作流程(我们称之为
w
)。目前,我手动下载(每当设置新工作流时)technology_data
GitHub 存储库
到所需位置,并将其作为子工作流包含在
w
中。

现在我想按原样包含

technology_data
,即将GitHub存储库中包含的
config.yaml
作为
w
.
包括到工作流
module

我的

Snakefile
工作流程
w
现在是:

module technology_data:
    snakefile: github("PyPSA/technology-data", path="Snakefile", commit="5a10981")

use rule * from technology_data as technology_data_*

当我调用工作流的规则之一并出现以下错误时失败:

> snakemake -call technology_data_compile_cost_assumptions
...
WorkflowError in line 2 of https://github.com/PyPSA/technology-data/raw/5a10981/Snakefile:
Workflow defines configfile config.yaml but it is not present or accessible

我不想从存储库下载

config.yaml
,但我希望
Snakemake
与远程模块的其余部分自动处理它。

我在模块定义中尝试使用:

  • configfile: github("PyPSA/technology-data", path="config.yaml", commit="5a10981")
    这不起作用(
    configfile
    不被
    module
    理解)
  • config: snakemake.io.load_configfile(github("PyPSA/technology-data", path="config.yaml", commit="5a10981"))
    这也不管用

有没有好的解决方案让

snakemake
自动使用遥控器
config.yaml

snakemake pypsa
© www.soinside.com 2019 - 2024. All rights reserved.