Skip to content

Commit

Permalink
Merge pull request #13 from maxulysse/prepare-rc-0_0_1
Browse files Browse the repository at this point in the history
prepare RC 0.0.1
  • Loading branch information
maxulysse authored Oct 1, 2024
2 parents 53b3f87 + 34f171e commit ea9bcf9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Here is an example of this file coming from the rnaseq pipeline.
UNTAR:
untar: 1.34
Workflow:
nf-core/rnaseq: v3.16.0dev
Nextflow: 24.04.4
nf-core/rnaseq: v3.16.0dev
Nextflow: 24.04.4
```
This function remove the Nextflow version from this yml file, as it is not relevant for the snapshot. Therefore for the purpose of the snapshot, it would consider this to be the contents of the YAML file:
Expand All @@ -26,7 +26,7 @@ This function remove the Nextflow version from this yml file, as it is not relev
UNTAR:
untar: 1.34
Workflow:
nf-core/rnaseq: v3.16.0dev
nf-core/rnaseq: v3.16.0dev
```
Usage:
Expand Down Expand Up @@ -60,7 +60,11 @@ results/
In this example, 1 file is stable with stable content (`stable_content.txt`), and 1 file is stable with a stable name (`stable_name.txt`).
The last file has no stable content (`execution_trace_2024-09-30_13-10-16.txt`) as its name is based on the date and time of the pipeline execution.

For this example, we want to snapshot the files that have stable content, and the names of files and folders that are stable. `stable_name` is a list of every file and folder except those matching the glob `pipeline_info/execution_*.{html,txt}`. `stable_content` is a list of every file except those matching the two globs `pipeline_info/execution_*.{html,txt}` and `**/stable_name.txt` which is contained in the `tests/getAllFilesFromDir/.nftignore` file. By using `stable_name*.name`, we extract the name of every file in `stable_name` and add them to the snapshot. `stable_content` can be used in the snapshot directly to include the hash of the file contents.
For this example, we want to snapshot the files that have stable content, and the names of files and folders that are stable.
`stable_name` is a list of every file and folder except those matching the glob `pipeline_info/execution_*.{html,txt}`.
`stable_content` is a list of every file except those matching the two globs `pipeline_info/execution_*.{html,txt}` and `**/stable_name.txt` which is contained in the `tests/getAllFilesFromDir/.nftignore` file.
By using `stable_name*.name`, we extract the name of every file in `stable_name` and add them to the snapshot.
`stable_content` can be used in the snapshot directly to include the hash of the file contents.

```groovy
def stable_name = getAllFilesFromDir(params.outdir, true, ['pipeline_info/execution_*.{html,txt}'], null )
Expand All @@ -72,3 +76,16 @@ assert snapshot(
```

First argument is the pipeline `outdir` directory path, second is a boolean to include folders, and the third is a list of glob patterns to ignore, and the fourth is a file containing a list of glob patterns to ignore.

## Credits

nft-utils was created by the nf-core community.

We'd like to thank the following people:

- [Adam Talbot](https://github.com/adamrtalbot)
- [Edmund Miller](https://github.com/edmundmiller)
- [Jonathan Manning](https://github.com/pinin4fjords)
- [Matthias Zepper](https://github.com/MatthiasZepper)
- [Nicolas Vannieuwkerke](https://github.com/nvnieuwk)
- [Sateesh Peri](https://github.com/sateeshperi)
2 changes: 1 addition & 1 deletion dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.nf-core</groupId>
<artifactId>nft-utils</artifactId>
<name>nft-utils</name>
<version>0.0.1dev</version>
<version>0.0.1</version>
<description>nf-test plugin that adds commonly used utility functions</description>
<url>https://github.com/nf-core/nft-utils</url>
<licenses>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.nf-core</groupId>
<artifactId>nft-utils</artifactId>
<version>0.0.1dev</version>
<version>0.0.1</version>
<packaging>jar</packaging>

<name>nft-utils</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/nf-test-plugin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
moduleName=nft-utils
moduleVersion=0.0.1dev
moduleVersion=0.0.1
moduleAuthors=nf-core
extensionMethods=nf_core.nf.test.utils.Methods

0 comments on commit ea9bcf9

Please sign in to comment.