Skip to content

Add global variable that refers to the .nf-test/ directory #340

@prototaxites

Description

@prototaxites

Currently, there is a global variable ${launchDir} that refers to the test directory for a given test: .nf-test/tests/<hash>. However, it would be useful to have a global variable that refers directly to .nf-test/, to allow tests to easily stage and interact with files that we might reasonably want to share among tests.

For example, the nft-utils nf-core dependency management tools (https://github.com/nf-core/nft-utils/blob/d62307775ff8e43971b8628933cda971f016e89a/src/main/java/nf_core/nf/test/utils/NfCoreUtils.java#L17) allow you to instantiate a temporary library to download and install nf-core modules for use in tests.

One option to improve run times and portability would be to stage this library in the .nf-test directory directly, so that the library can be shared easily among tests rather than between tests, as the modules themselves are cached and attempting to install an installed module is quickly skipped. This would be made marginally easier by exposing a directory pointing at the .nf-test/ directory directly!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions