Skip to content

New feature sanitizeOutput(recursiveKeys: [], pattern_ignore: []) #68

@LouisLeNezet

Description

@LouisLeNezet

I'm looking for a nice way to snapshot the output of a directory from a process output.
The aim would be to recursively output the files in a directory and put either the name or the md5 depending on patterns.

For the moment I'm doing:

{
    def stable_name = getAllFilesFromDir(process.out.db[0][1].toString(), include:['*', '**/*'])
    def stable_content = getAllFilesFromDir(process.out.db[0][1].toString(), include:["**/VERSION", "**/animal_mt.fasta"])

    assert snapshot(
        stable_name*.name.sort(),
        stable_content,
        process.out.findAll { key, val -> key.startsWith('versions') }
    ).match()
}

My aim would be to have something like:

{ assert snapshot(sanitizeOutput(
    process.out,
    recursiveKeys: ["db"],
    stableFiles: ["**/VERSION", "**/animal_mt.fasta"]
).match() }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions