将WDL及其导入打包到zip文件中。
wdl-packager的Python项目详细描述
将WDL及其导入打包到zip文件中。在
zip文件可以用作cromwell的有效导入zip。它也可以用来存档 你的工作流程。在
当与^{tt1}一起使用时,Wdl packager可以创建binary reproducible的zip包$ 旗子。它还可以包括其他文件,如许可证、自述和 配置文件示例。这使得它非常适合于分发WDL工作流 作为包装。在
Wdl packager当前仅支持基于文件的导入。在
使用
usage: wdl-packager [-h] [-o OUTPUT] [-a ADDITIONAL_FILES] [--use-git-version-name] [--use-git-commit-timestamp] [--reproducible] [--version] WDL_FILE positional arguments: WDL_FILE The WDL file that will be packaged. optional arguments: -h, --help show this help message and exit -o OUTPUT, --output OUTPUT The output zip file. By default uses the name of the input. This overrides the git name option. -a ADDITIONAL_FILES, --additional-file ADDITIONAL_FILES Additional files to be included in the zip. Additional files will be added according to their relative position to the WDL file. If that is not possible they will be added to the base of the zip. Multiple '-a' flags can be used. --use-git-version-name Use git describe to determine the name of the zip. --use-git-commit-timestamp Use the git commit timestamp to timestamp all the files in the zip. --reproducible shorthand for --use-git-version-name and --use-git- commit-timestamp --version show program's version number and exit
再现性
创建可复制包装的内部流程如下:
- 它使用git log --n1--pretty=%at检查每个文件,以获得unix 影响该文件的最新提交的时间戳。在
- 然后将每个文件复制到最后修改的临时目录中 时间更改为第一步中找到的unix时间戳。在
- 然后,文件列表按其在zip中的目标路径排序。这个 排序可确保文件始终以相同的顺序添加。在
- 进程的时区将更改为UTC,因为时区会影响 zip存档中文件的时间戳。在
- 文件将按排序顺序添加到zip包中。在
可复制包的名称包括
- 不带.wdl的WDL文件基名称。在
- git describe --always的版本说明。在
- 一个.zip扩展名。在
已知问题
- Cromwell的旧版本 包含在打开带有嵌套的zip文件时导致崩溃的错误 目录。这是在克伦威尔49版中修复的。在
- ^{tt6}当前不支持导入。Wdl打包机可以是 从web获取WDL并将其导入打包到 它们在本地使用的方式。不幸的是,这需要重写 在打包WDL文件之前,导入WDL文件中的路径。这是 实现起来非常重要,而且可能会产生意想不到的副作用。在
- 当重复打包时,python进程的时区需要 更改为“UTC”。否则,zip中的最后修改时间将不同 对于每个时区。这将影响在同一进程中运行的所有代码。这个 对于wdl打包机本身并不重要,但对于那些 将wdl_packager用作库。不使用use_git_timestamps规避 这个问题。在
- 项目
标签: