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

Process relative paths aren't resolved correctly #146

Open
nvnieuwk opened this issue Oct 30, 2023 · 3 comments
Open

Process relative paths aren't resolved correctly #146

nvnieuwk opened this issue Oct 30, 2023 · 3 comments

Comments

@nvnieuwk
Copy link
Contributor

Hi we encountered a small issue during the conversion of the nf-core modules tests to nf-test.

We recently changed the conda declaration to use an environment.yml located in the same folder as the process. e.g.
The folder:

├── environment.yml
├── main.nf
├── meta.yml
└── tests
    ├── main.nf.test
    ├── main.nf.test.snap
    └── tags.yml

The conda declaration:

conda "modules/nf-core/rtgtools/rocplot/environment.yml"

This creates the following error when using nf-test (link):

N E X T F L O W  ~  version 23.10.0
  Launching `/home/runner/work/modules/modules/.nf-test/tests/8[57](https://github.com/nf-core/modules/actions/runs/6653886915/job/18080817937?pr=4200#step:12:58)43a24fa16726212453fea0cbd868/meta/mock.nf` [infallible_becquerel] DSL2 - revision: 8f0244d909
  ERROR ~ Error executing process > 'UNTAR'
  
  Caused by:
    Conda environment file does not exist: modules/nf-core/untar/environment.yml
  
  
   -- Check '/home/runner/work/modules/modules/.nf-test/tests/85743a24fa1672[62](https://github.com/nf-core/modules/actions/runs/6653886915/job/18080817937?pr=4200#step:12:63)12453fea0cbd868/meta/nextflow.log' file for details
  Nextflow stderr:

My best guess is that this is caused by the fact that nf-test doesn't actually run the test from the main path, but from the path inside of the .nf-test/tests/<hash>/meta folder?

Are we doing something wrong or is this a bug in nf-test?

Nextflow version: 23.10.0
nf-test version: 0.8.1

Thanks!
-Nicolas

@nvnieuwk
Copy link
Contributor Author

nvnieuwk commented Oct 30, 2023

You can try this yourself by cloning this branch on my fork of the nf-core modules repository and running nf-test --tag rtgtools/rocplot --profile conda in the top directory.

@edmundmiller
Copy link
Contributor

edmundmiller commented Oct 30, 2023

@ajtock

nf-core/modules#4079 (comment)

Responding here for visibility.

I think that can work, I would just want to make sure it doesn't break anything else with how the pipelines run! That's the top priority, testing is a second.

@nvnieuwk
Copy link
Contributor Author

We managed to get it working using conda "${moduleDir}/environment.yml". I still thinks this should be fixed somehow though as it will definitely break other stuff in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants