wdl-packager
Package a WDL and its imports into a zip file.
The zip file can be used as a valid imports zip for cromwell. It can also be used to archive your workflow.
Wdl-packager can create zip packages that are binary reproducible when used with the --reproducible flag. It can also include additional files such as licenses, READMEs and example configuration files. This makes it ideal for distributing WDL workflows as packages.
Wdl-packager currently only supports file based imports.
Usage
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
Reproducibility
The internal process to create a reproducible package is as follows:
It checks each file with git log --n1 --pretty=%at to get the unix timestamp of the latest commit that affected that file.
Each file is then copied to a temporary directory where the last modified time is changed to the unix timestamp found in the first step.
The list of files is then sorted by their destination path in the zip. The sorting ensures that the files will always be added in the same order.
The timezone of the process is changed to UTC, as the timezone affects the timestamp of the files in the zip archive.
The files are added to the zip package in sorted order.
The name for a reproducible package consists of
The WDL file basename without .wdl.
A version description by git describe --always.
A .zip extension.
Known issues
Old versions of Cromwell contain a bug that causes a crash when opening zip files with nested directories. This was fixed in cromwell version 49.
http:// imports are currently not supported. Wdl-packager could be an ideal tool to fetch WDLs from the web and package their imports in such a way that they can be used locally. Unfortunately this requires rewriting the import paths inside the WDL files before they are packaged. This is non-trivial to implement and it may have unintentioned side effects.
When packaging reproducibly the timezone of the python process needs to be changed to ‘UTC’. Otherwise the last modified times in the zip will differ for each timezone. This will affect all code run in the same process. This does not matter for wdl-packager itself, but it does matter for programs that use wdl_packager as a library. Not using use_git_timestamps circumvents this problem.
Metadata
Release files for wdl-packager 1.0.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 |
|---|---|---|---|---|
| wdl-packager-1.0.0.tar.gz | 8.9 kB | Without provenance | Details for wdl-packager-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wdl_packager-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for wdl_packager-1.0.0-py3-none-any.whl |
Total release size: 20.9 kB
Release files / wdl-packager-1.0.0.tar.gz
| Download URL | wdl-packager-1.0.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cf66b5dc5ad345874e29e39dc3ad9ac618b8a9b6ab88c8dee1e4cf174d8afe6
|
|
BLAKE2b-256 checksum How to use checksums |
d5ec09ba811aba78770cc9ebdb24064e87aa80104154dc98b6ab71bd64393d6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Release files / wdl_packager-1.0.0-py3-none-any.whl
| Download URL | wdl_packager-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f5f0f805683b6671c9dfda5a91febd369d1a834960fe553528ef83b85dd7e6d
|
|
BLAKE2b-256 checksum How to use checksums |
830ca0f052b45fc1483fa47094a3b1ef12fb8db3b12a3e18e0b71a7e8ce42cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Security for wdl-packager 1.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.