Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Feb 2, 2024
1 parent 087526b commit a77fc3d
Showing 1 changed file with 12 additions and 80 deletions.
92 changes: 12 additions & 80 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ engines:
image: quay.io/biocontainers/xxx:0.1.0--py_0
```

The container should have your tool installed, as well as `ps`.

If you didn't find a suitable container in the previous step, you can create a custom container. For example:

```yaml
Expand Down Expand Up @@ -281,100 +283,30 @@ arriba \

### Step 11: Add a test script

### Step 12: Create a `/var/software_versions.txt` file

```yaml
engines:
- type: docker
image: quay.io/biocontainers/xxx:0.1.0--py_0
setup:
- type: docker
run: |
echo "xxx: \"0.1.0\"" > /var/software_versions.txt
```

## Documentation of Functionality
...

The purpose and functionality of each component should be adequately described.

Example:
If the unit test requires test resources, these should be provided in the `test_resources` section of the component.

```yaml
functionality:
name: star_align
namespace: bioinformatics
description: |
Aligns reads to a reference genome using STAR.
# ... todo
```

## Documentation of Inputs and Outputs

All input and output arguments should have a description and example (with extension).

```yaml
functionality:
# ...
arguments:
- name: --input
type: file
description: Input reads in FASTQ format. If the file is compressed, it must have the extension `.gz`.
example: input.fastq.gz
required: true
- name: --output
type: file
direction: output
description: Output BAM file.
example: output.bam
required: true
```
TODO: discuss hosting test resources

## Docker Image

A Docker image (with optional additional dependencies) should be provided.
### Step 12: Create a `/var/software_versions.txt` file

```yaml
functionality:
# ...
platforms:
engines:
- type: docker
image: python:3.10
image: quay.io/biocontainers/xxx:0.1.0--py_0
setup:
- type: python
packages: numpy
```
This container should also have `ps` installed.

## Write unit tests

A unit test with possibly test resources needs to be provided.

```yaml
functionality:
# ...
test_resources:
- type: python_script
path: script.py
```

With `script.py`:

```python
# ... todo
```

The bare minimum of the unit test is to run the component and check whether the output exists. Ideally, the unit test should also check whether the output is correct.

## Provide test resources

If the unit test requires test resources, these should be provided in the `test_resources` section of the component.

```yaml
# ... todo
- type: docker
run: |
echo "xxx: \"0.1.0\"" > /var/software_versions.txt
```

TODO: discuss hosting test resources

## Versioning

If the component uses custom software (not installed via Apt, Apk, Yum, Pip, Conda, or R), a Bash script `version.sh` needs to be provided that outputs the version of the software.
Expand Down

0 comments on commit a77fc3d

Please sign in to comment.