Create WDL documentation using Markdown.
Project description
wdldoc
Convert WDL documentation to Markdown for rendering.
Request Feature
·
Report Bug
·
⭐ Consider starring the repo! ⭐
📚 Getting Started
For an example of what the results can look like, check out the GitHub Pages for the St Jude Cloud Workflows repo! The documentation is automatically built for each release using wdldoc
.
Installation
wdldoc is only available for Python 3.8 or higher.
Suggested install method:
conda create -n wdldoc python=3.8
conda activate wdldoc
pip install wdldoc
Usage
wdldoc is designed to be simple, and require as little work as possible. Once installed, simply call wdldoc .
at the root of your WDL project, and Markdown files will be generated in the ./documentation
directory for each WDL file found. There are tasks/
and workflows/
subdirectories, with documentation for WDL workflow files in workflows/
, and documentation for WDL task files in tasks/
.
Any valid WDL file will have the inputs, outputs, and meta information individually documented for all its tasks and workflows. There's no need to conform to any standards we dictate; if it runs, we'll document it.
Any strings found in meta fields will be treated as Markdown, so feel free to add custom bolding, italicizing, code snippets, etc.
If there's any information you want to include for a file that doesn't fit into a meta field of one of it's tasks or workflows, you can include a header section of your WDL file, and we'll convert it to Markdown and prepend it to the documentation. This is a good place to document the uses for the file and any licensing information. Simply start a line with ##
followed by a space, and the rest of the line will be parsed as Markdown. There's no limit to the number of header lines. It's good practice to break up the header into sections using Markdown titles.
usage: wdldoc [-h] [-o OUTPUT_DIRECTORY] [-d DESCRIPTION] [-c CHOICES] [-v] [--debug] sources [sources ...]
Generate clean WDL documentation from source.
positional arguments:
sources Top level directories to search for WDL files, or the WDL files themselves.
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_DIRECTORY, --output_directory OUTPUT_DIRECTORY
Directory to store markdown files. Default is `./documentation`
-d DESCRIPTION, --description DESCRIPTION
If parameter meta fields use a JSON object, the key for the field containing the input description. Default is 'help'. Ignored if only strings are used.
-c CHOICES, --choices CHOICES
If parameter meta fields use a JSON object, the key for the field containing the input choices. Default is 'choices'. Ignored if only strings are used.
-v, --verbose Sets the log level to INFO.
--debug Sets the log level to DEBUG.
Either directories or individual files can be supplied. When directories are supplied,
wdldoc will recursively search the input directories searching for all .wdl
files, and generate documentation for them.
WDL parameter_meta
info can be anything that conforms to the WDL spec, but we recommend one of two formats. The first is simply input_name: "descriptive string"
. The other is a JSON object containing a description key with a string value and optionally a choices key with a list of options. The value of the "description" and "choices" keys can be specified with the --description
and --choices
arguments. Below is an example of both formats in one parameter meta block.
parameter_meta {
in_bams: {
help: "Provide bams to run for comparison"
}
tissue_type: {
help: "Provide the tissue type to compare against",
choices: ['blood', 'brain', 'solid']
}
output_filename: "Name for the output HTML t-SNE plot"
}
🖥️ Development
If you are interested in contributing to the code, please first review our CONTRIBUTING.md document. To bootstrap a development environment, please use the following commands.
# Clone the repository
git clone git@github.com:stjudecloud/wdldoc.git
cd wdldoc
# Install the project using poetry
poetry install
# Ensure pre-commit is installed to automatically format
# code using `black`.
brew install pre-commit
pre-commit install
pre-commit install --hook-type commit-msg
📝 License
Copyright © 2020 St. Jude Cloud Team.
This project is MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wdldoc-1.7.1.tar.gz
.
File metadata
- Download URL: wdldoc-1.7.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb13a18d1dab6ed24f538e19367165a1616fa64891eecb3c48ed20e42d62a1b |
|
MD5 | d05a32c9710a9929c83ea5137d78c394 |
|
BLAKE2b-256 | 52192993be8e2ed8e7dc0685ad9d27f06889b013a4d7b6c981ccafe543aaaf6d |
File details
Details for the file wdldoc-1.7.1-py3-none-any.whl
.
File metadata
- Download URL: wdldoc-1.7.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18cb9ad7f3e2275c8130e14f5f06f53bbe87881ff91e1b3665995cab241ce06 |
|
MD5 | 944b14dc78b68391ec7a2cdc7da9d1b9 |
|
BLAKE2b-256 | 8cb978ad069db73418e948c4823690ce0de6d3225fa051ddf1998a1da746b54c |