Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document test execution with local files #118

Open
AlexVCaron opened this issue Apr 3, 2024 · 0 comments
Open

Document test execution with local files #118

AlexVCaron opened this issue Apr 3, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@AlexVCaron
Copy link
Collaborator

Use-case : a collaborator wants to run tests for a module/subworkflow using local files. It is totally possible and simple to do, using the file class and the path to the files in the local filesystem, e.g. :

local_file1 = file("path/to/local/file.1")
local_file2 = file("path/to/local/file.2")

input = Channel.value( [[id: 'id'], local_file1, local_file2] )

TEST_MODULE( input )

or to only change some files in an existing test :

local_file = file("path/to/local/file.1")

LOAD_TEST_DATA ( ["archive.zip"], "test.load-test-data" )

input = LOAD_TEST_DATA.out.test_data_directory
        .map{ test_data_directory -> [
        [ id: 'id' ],
        file("${test_data_directory}/..."),
        file("${test_data_directory}/..."),
        ...
        local_file
]}

TEST_MODULE( input )

Add this to the documentation.

@AlexVCaron AlexVCaron added the documentation Improvements or additions to documentation label Apr 3, 2024
@AlexVCaron AlexVCaron added this to the nf-scil v1.0 milestone Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant