Skip to content

Commit 91093c7

Browse files
authored
Merge pull request #33 from Sage-Bionetworks-Workflows/bwmac/orca-230/external_test_contributing_info
[ORCA-230] Adds external test contribution info
2 parents 0753b9f + 8b98925 commit 91093c7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,36 @@ This often provides additional considerations and avoids unnecessary work.
186186
the PR as a draft first and mark it as ready for review after the feedbacks
187187
from the continuous integration (CI) system or any required fixes.
188188

189+
### Special Considerations for Contributing External Tests
190+
191+
In `py-dcqc`, any test where the primary business logic is executed outside of this package itself is considered to be external. One example is the `LibTiffInfoTest`. For these tests, `py-dcqc` is responsible for packaging up a Nextflow process which is then executed in an [nf-dcqc](https://github.com/Sage-Bionetworks-Workflows/nf-dcqc) workflow run. Such tests are not possible to run in `py-dcqc` alone at this time. This makes contributing, testing, debugging, and using external tests a little more complicated that internal tests such as the `Md5ChecksumTest` which has all of its logic built into this package.
192+
193+
When contributing an external test, following these steps may be helpful:
194+
195+
1. Follow the steps above to set up `py-dcqc` and create your contribution.
196+
197+
2. Follow the instructions in the [README.md](https://github.com/Sage-Bionetworks-Workflows/nf-dcqc/blob/dev/README.md)
198+
file in the `nf-dcqc` respository to set up the workflow on your local machine.
199+
- Run `git checkout dev` to switch to the developer branch
200+
201+
3. Build your local version of `py-dcqc` with your new changes with:
202+
```console
203+
src/docker/build.sh
204+
```
205+
NOTE: This step assumes that you have docker installed and that it is running, and that you have `pipx` installed.
206+
207+
4. Follow `nf-dcqc` instructions to create a `nextflow run` command that tests your contribution.
208+
- You should include at least two files in your `nf-dcqc` input file ([example](https://github.com/Sage-Bionetworks-Workflows/nf-dcqc/blob/dev/testdata/input_full.csv)), one that you expect to pass your contributed test, and one that you expect to fail.
209+
- Include the `local` profile so that the workflow leverages your locally built `py-orca` container
210+
211+
Example command (executed from within your local `nf-dcqc` repo clone):
212+
```
213+
nextflow run main.nf -profile local,docker --input path/to/your/input.csv -- outdir output --required_tests <YOUR_TEST_NAME>
214+
```
215+
216+
5. Examine the final `suites.json` that is exported by the Nextflow workflow, if your contributed test bahaved as
217+
expected, you're done! If not, debug and make changes to your contribution and re-run the workflow.
218+
189219
### Troubleshooting
190220

191221
The following tips can be used when facing problems to build or test the

0 commit comments

Comments
 (0)