Skip to content

Commit da64c2a

Browse files
committed
Remove manual section numberings clashing with mkdocs
1 parent 3c1bbe5 commit da64c2a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/side_quests/nf-test.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In this part of the training, we're going to show you how to use nf-test to writ
3131

3232
---
3333

34-
## 0. Warmup
34+
## Warmup
3535

3636
Let's move into the project directory.
3737

@@ -110,7 +110,7 @@ workflow {
110110

111111
We're going to assume an understanding of this workflow, but if you're not sure, you can refer back to [Hello Workflow](../hello_nextflow/03_hello_workflow.md).
112112

113-
### 0.1. Run the workflow
113+
### Run the workflow
114114

115115
Let's run the workflow to make sure it's working as expected.
116116

@@ -150,7 +150,7 @@ Initialize `nf-test`.
150150

151151
---
152152

153-
## 1.0. Initialize `nf-test`
153+
## Initialize `nf-test`
154154

155155
The `nf-test` package provides an initialization command that sets up a few things in order for us to start developing tests for our project.
156156

@@ -170,7 +170,7 @@ Project configured. Configuration is stored in nf-test.config
170170

171171
It also creates a `tests` directory containing a configuration file stub.
172172

173-
## 1.1. Generate an nf-test
173+
## Generate an nf-test
174174

175175
`nf-test` comes with a set of tools for building nf-test files, saving us the majority of the work. These come under the subcommand `generate`. Let's generate a test for the pipeline:
176176

@@ -255,7 +255,7 @@ Good test names should:
255255

256256
As we add more assertions and specific test cases later, we'll use these more descriptive names to make it clear what each test is verifying.
257257

258-
## 1.2. Run the test
258+
## Run the test
259259

260260
Let's run the test to see what happens.
261261

@@ -406,7 +406,7 @@ Test Workflow main.nf
406406
SUCCESS: Executed 1 tests in 5.239s
407407
```
408408

409-
## 1.3. Add assertions
409+
## Add assertions
410410

411411
A simple check is to ensure our pipeline is running all the processes we expect and not skipping any silently. Remember our pipeline runs 6 processes, one called `sayHello` and one called `convertToUpper` for each of the 3 greetings.
412412

@@ -473,7 +473,7 @@ SUCCESS: Executed 1 tests in 1.588s
473473

474474
Success! The pipeline runs successfully and the test passes. Now we have began to test the details of the pipeline, as well as the overall status.
475475

476-
## 1.4. Test the output
476+
## Test the output
477477

478478
Let's add an assertion to our test to check the output file was created. We'll add it as a separate test, with an informative name, to make the results easier to interpret.
479479

@@ -571,11 +571,11 @@ Learn how to test a Nextflow process.
571571

572572
---
573573

574-
## 2 Test a Nextflow process
574+
## Test a Nextflow process
575575

576576
We don't have to write tests for every part of the pipeline, but the more tests we have the more comprehensive we can be about the pipeline and the more confident we can be that it's working as expected. In this section we're going to test both processes in the pipeline as individual units.
577577

578-
### 2.1. Test the `sayHello` process
578+
### Test the `sayHello` process
579579

580580
Let's start with the `sayHello` process.
581581

@@ -751,7 +751,7 @@ SUCCESS: Executed 1 tests in 1.611s
751751

752752
Success! The test passes because the `sayHello` process ran successfully and the output was created.
753753

754-
### 2.2. Check out the snapshot created by the test
754+
### Check out the snapshot created by the test
755755

756756
If we look at the `tests/main.sayhello.nf.test` file, we can see it uses a method `snapshot()` in the assertion block:
757757

@@ -804,7 +804,7 @@ SUCCESS: Executed 1 tests in 1.685s
804804

805805
Success! The test passes because the `sayHello` process ran successfully and the output matched the snapshot.
806806

807-
### 2.3 Alternative to Snapshots: Direct Content Assertions
807+
### Alternative to Snapshots: Direct Content Assertions
808808

809809
While snapshots are great for catching any changes in output, sometimes you want to verify specific content without being so strict about the entire file matching. For example:
810810

@@ -898,7 +898,7 @@ Test Process sayHello
898898
SUCCESS: Executed 1 tests in 7.208s
899899
```
900900

901-
### 2.4. Test the `convertToUpper` process
901+
### Test the `convertToUpper` process
902902

903903
Let's open the `tests/main.converttoupper.nf.test` file and take a look at the contents:
904904

@@ -1052,15 +1052,15 @@ You know how to write tests for a Nextflow process and run them.
10521052

10531053
Learn how to run tests for everything at once!
10541054

1055-
## 3. Run tests for the entire repository
1055+
## Run tests for the entire repository
10561056

10571057
Running nf-test on each component is fine, but laborious and error prone. Can't we just test a test on everything at once?
10581058

10591059
Yes we can!
10601060

10611061
Let's run nf-test on the entire repo.
10621062

1063-
### 3.1. Run nf-test on the entire repo
1063+
### Run nf-test on the entire repo
10641064

10651065
We can run nf-test on the entire repo by running the `nf-test test` command.
10661066

@@ -1097,7 +1097,7 @@ SUCCESS: Executed 3 tests in 5.007s
10971097

10981098
Check that out! We ran 3 tests, 1 for each process and 1 for the whole pipeline with a single command. Imagine how powerful this is on a large codebase!
10991099

1100-
## 4.0. Summary
1100+
## Summary
11011101

11021102
In this side quest, we've learned:
11031103

0 commit comments

Comments
 (0)