Skip to content

Add a pytest-workflow generate command line function #193

@rhpvorderman

Description

@rhpvorderman

Command line invocation:

pytest-workflow-generate tests/test_bla.yml my_name command --flag --another-flag settings/settings.json myworkflow.format

First argument is the test file to generate. Second argument is the test name. All the other arguments are treated as the command argument.

Resulting yaml:

- name: my_name 
  command: "command --flag --another-flag settings/settings.json myworkflow.format"
  files:
    - path: relative/to/workflow/output/dir/my_file.txt
      md5sum: "abcdef0123456789"

Etc.

This is especially useful for generating all the file paths. stdout and stderr are omitted as these contain timestamps and dates.

This feature is inspired by nf-tests snapshot function.

@DavyCats, @Redmar-van-den-Berg what do you think of this?

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