- Purpose and scope of the style guide
- Relationship to other WARP documentation
- How this style guide differs from other WDL style guides (BioWDL, etc.)
- Flattened directory organization
pipelines/wdl/for workflow definitions by categorytasks/wdl/for reusable task definitionsstructs/for struct definitionsverification/for test workflowsverification/test-wdls/for test implementation
- Naming conventions for directories and files
- Import path management with the unified structure
- Version declaration (version 1.0)
- File organization hierarchy
- Import statements with relative paths
- Meta parameters for Terra compatibility
- Indentation: 2 spaces (WARP-specific, differs from BioWDL)
- Blank lines: Use to separate logical sections
- Line length: No strict limit (differs from BioWDL's 100 character limit)
- Variable naming:
- Tasks: Use UpperCamelCase
- Variables: Use lowercase_underscore (python style, differs from BioWDL)
- Alias calls: Use UpperCamelCase
- Required elements:
- Version string declaration:
String pipeline_version = "x.y.z" - Meta parameters:
allowNestedInputs: true
- Version string declaration:
- Input block organization
- Required inputs first
- Optional inputs with defaults second
- Runtime configuration parameters last
- Cloud provider support inputs and validation
- Output block organization
- Error handling with ErrorWithMessage task
- Standard order of sections:
- Input block
- Command block
- Output block
- Runtime block
- Input parameters organization
- Command formatting
- One input argument per line for clarity (WARP-specific)
- Runtime parameter specification
- Docker image handling for multi-cloud
- Memory, CPU, disk sizing
- Multi-cloud support pattern
- Purpose of the warp-tools repository
- Centralized location for Docker images and scripts used by WARP workflows
- Separation of concerns between workflow definitions and execution environments
- When to use warp-tools vs inline WDL code
- Use warp-tools for:
- Complex processing scripts (Python, R, etc.)
- Functionality that may be reused across multiple pipelines
- Scripts requiring specialized dependencies
- Tasks involving data transformations or complex algorithms
- Use inline WDL for:
- Simple file operations
- Basic string manipulation
- Parameter validation
- Straightforward conditional logic
- Use warp-tools for:
- Referencing warp-tools in WDL
- Docker image referencing pattern
- Path conventions for scripts within containers
- Contribution workflow for adding new tools
- Docker build guidelines
- Script documentation requirements
- Versioning practices
- Prefer scripts in Docker images over embedded code
- Embedding complex scripts in WDL command blocks reduces maintainability
- Package scripts into Docker images whenever possible
- Benefits: improved testability, readability, and maintainability
- When embedding Python is necessary
- Keep Python code minimal and focused
- Place imports at the module level for better readability
- Avoid nesting function definitions with their own imports
- Use clear variable naming and add comments for complex logic
- Avoiding Python/WDL syntax conflicts
- Beware of mixing Python f-strings with WDL interpolation
- Both use curly braces
{}which can cause confusion - Example:
f'~{prefix}_output.txt'- the f-string is unnecessary and potentially problematic - Prefer simple string interpolation:
'~{prefix}_output.txt'
- Python best practices in WDL context
- Validate inputs early
- Use meaningful variable names
- Break complex operations into clear, commented steps
- Consider readability in the WDL context (triple quotes, indentation)
- Semantic versioning requirements
- Major version: Breaking changes to inputs/outputs or qualitative scientific changes
- Minor version: Non-breaking additions or non-qualitative changes
- Patch version: Internal improvements, optimizations, comments
- Version declaration in WDL files
- Version tracking in
pipeline_versions.txt - Version consistency between WDL and changelog
- File naming:
<PipelineName>.changelog.md - Entry format:
# 1.2.5 2025-09-19 (Date of Last Commit) * Updated docker image to latest version
- Use active voice, past tense
- Standard messages for common changes
- Breaking vs non-breaking change documentation
- Use of ErrorWithMessage task
- Input validation patterns
- Standard error messages
- Recovery strategies
- Test WDL naming:
Test<PipelineName>.wdl - Verification workflow structure
- GetValidationInputs tasks
- Golden file management with update_truth
- Required test inputs and expected outputs
- Mandatory womtool validation
- Validation workflow steps
- Common validation errors
- Import path validation
- Handling validation failures
- Cloud provider input parameter
- Cloud-specific docker image selection
- Resource optimization per cloud provider
- Cloud-specific runtime attributes
- Build script usage
- Release tagging
- Master tracking
- Dockstore configuration
- Cloud provider detection
- Resource allocation
- File handling
- Scatter-gather implementation
- Parameter optimization
- Validation with womtool
- Version consistency verification
- Import path checking
- Changelog format verification
- Docker image verification
- Version update verification
- Task reusability
- Input/output naming conventions
- Resource allocation
- Documentation practices
- WDL modularization
- Performance optimization
- Conflict resolution priority
- Version precedence rules
- Post-merge validation
- Version consistency validation
- Scripts for automation
- Verification utilities
- Release tools
- Import path fixing
- Example workflow templates
- Example task templates
- Common utility tasks
- Reference to WDL specification
- Glossary of terms