Skip to content

Commit

Permalink
Merge pull request #11 from openwdl/docs
Browse files Browse the repository at this point in the history
update documentation. Closes #5
  • Loading branch information
vsmalladi authored Apr 26, 2024
2 parents 2a1dc4b + c3faef1 commit 366b4b0
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
test:
- integration
- test-example
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -26,15 +26,16 @@ jobs:
pip3 install miniwdl
pip3 install pytest-workflow
mkdir ~/temp
- name: Run unit tests
- name: Run integration tests
# Use --symlink to limit disk usage.
run: >-
pytest --keep-workflow-wd-on-fail --git-aware --tag ${{ matrix.test }}
--symlink tests/ --basetemp ~/temp
- name: Check miniwdl log in case of failure.
if: ${{ failure() }}
# Get the last 1000 lines of the miniwdl log to catch the error.
run: bash -c 'tail -n 1000 /home/runner/temp/*/task.out'
run: >-
# Get the last 1000 lines of the miniwdl log to catch the error.
bash -c 'tail -n 1000 /home/runner/temp/*/workflow.log'
- name: Check job stderr messages in case of failure
if: ${{ failure() }}
run: >-
Expand All @@ -46,4 +47,4 @@ jobs:
run: >-
bash -c '
for file in $(find /home/runner/temp/ -name stdout.txt);
do echo $file; cat $file; done'
do echo $file; cat $file; done'
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
# workflow-template-wdl

This repo includes a devcontainer configuration which will create a GitHub Codespace for WDL development!
This repository is a template WDL respository.

Creating a repository from a template is similar to forking a repository, but there are important differences:

- A new fork includes the entire commit history of the parent repository, while a repository created from a template starts with a single commit.
- Commits to a fork don't appear in your contributions graph, while commits to a repository created from a template do appear in your contribution graph.
- A fork can be a temporary way to contribute code to an existing project, while creating a repository from a template starts a new project quickly.


## Devcontainer
This repo includes a devcontainer configuration which will create a GitHub Codespace for WDL development!

Devcontainer specs:
- [DevContainer config](.devcontainer/devcontainer.json)
- [Dockerfile](.devcontainer/Dockerfile)

# Getting started
Tools included in container for development:
- [MiniWDL](https://github.com/chanzuckerberg/miniwdl)
- [Cromwell](https://github.com/broadinstitute/cromwell)
- [WOMTool](https://cromwell.readthedocs.io/en/stable/WOMtool/)
- [sprocket](https://github.com/stjude-rust-labs/sprocket)
- [shellcheck](https://github.com/koalaman/shellcheck)

## Dockstore template

This repo includes a [Dockestore](https://dockstore.org/) [template](.github/.dockstore.yml) for automatic registering of you workflow using the [Dockstore Github App](https://docs.dockstore.org/en/stable/getting-started/github-apps/github-apps-landing-page.html)

## Unit and Integration Tests

This repo uses [pytest-workflow](https://pytest-workflow.readthedocs.io/) for testing WDL for unit and integration tests. Examples can be found in;
- [unit test](.github/workflows/unit.yml)
- [integration test](.github/workflows/integration.yml)

Additionally, the [wdl syntax](.github/workflows/lint.yml) is checked using the following tools:
- MiniWDL
- WOMTool
- sprocket

## Getting started
- Create a new repo in GitHub using this [template](https://github.com/openwdl/workflow-template-wdl/generate).
- Open the repo in [Codespaces](../../codespaces)

## Setup Verification
### Setup Verification

#### Verify tools

Expand Down Expand Up @@ -40,7 +72,7 @@ Devcontainer specs:
- open a command prompt and run...
- `sprocket lint test/test.wdl`
- should print the following error
- ```
```
workflow HelloWorld {
^ The following tokens are required: document.
```
Expand Down
5 changes: 5 additions & 0 deletions tests/inputs/example.inputs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"example.hello.name": "Test"
}


6 changes: 6 additions & 0 deletions tests/test.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: test-example
command: miniwdl run -i tests/inputs/example.inputs.json -d test-output/ hello.wdl
files:
- path: test-output/_LAST/out/hello.response/stdout.txt
contains:
- 'hello Test!'

0 comments on commit 366b4b0

Please sign in to comment.