Hi. I configured a github action for linting and e...
# linting
r
Hi. I configured a github action for linting and executing
nf-core pipelines lint
. Our
.nf-core.yml
config file in the pipeline repo has
nf_core_version: 3.2.0
,
repository_type: pipeline
and lint config specify
files_exist
,
files_unchanged
,
multiqc_config
and
nextflow_config
keys to skip some file checks and config parameter checks. We were expecting the lint functionality to execute
module_changes
test along with the existing 20+ pipeline tests (https://nf-co.re/tools/docs/latest/pipeline_lint_tests/ + https://nf-co.re/tools/docs/latest/module_lint_tests/ ). But, from the verbose output -- I see only the pipeline_lint_tests running. As per the source code @ https://github.com/nf-core/tools/blob/3.2.0/nf_core/pipelines/lint/__init__.py#L573, pipeline lint tests are a union of pipeline tests and module lint tests. So, technically
module_changes
must be included in that set. Am I missing any configuration or doing something wrong that is not triggering the
module_changes
test when pipelines lint is run? For testing it, I added a new line in the nf-core's multiqc main.nf that should theoritically trigger an error that copy the file in the current pipeline is different from the remote nf-core module that is imported. No validation error is reported. Only when
nf-core modules lint
is run, the test for
module_changes
is executed and the error reported. Please help.
I also tried
nf-core pipelines lint --key module_changes
... no complaints from the tooling about the
key
not being among valid options or anything like that; yet, it still did not properly run this specific testing in the pipelines lint context
j
Hi @Ram Anusuri, can you copy the exact content of the lint section in your
.nf-core.yml
? Is your pipeline an nf-core pipeline or a custom one?
r
Its a custom pipeline built using nf-core template. It has local, nf-core and an internally built ext-core modules (modules/local/<...>, modules/nf-core/multiqc, modules/ext-core/untar)
Copy code
lint:
  files_exist:
    - assets/nf-core-tbwgsnpclustering_logo_light.png
    - docs/images/nf-core-tbwgsnpclustering_logo_dark.png
    - docs/images/nf-core-tbwgsnpclustering_logo_light.png
    - .github/ISSUE_TEMPLATE/config.yml
    - .github/workflows/awstest.yml
    - .github/workflows/awsfulltest.yml
    - .github/workflows/ci.yml
    - .github/workflows/linting_comment.yml
    - conf/igenomes.config
    - CODE_OF_CONDUCT.md
    - LICENSE
  files_unchanged:
    - assets/nf-core-tbwgsnpclustering_logo_light.png
    - docs/images/nf-core-tbwgsnpclustering_logo_dark.png
    - docs/images/nf-core-tbwgsnpclustering_logo_light.png
    - .github/CONTRIBUTING.md
    - .github/ISSUE_TEMPLATE/bug_report.yml
    - .github/ISSUE_TEMPLATE/config.yml
    - .github/ISSUE_TEMPLATE/feature_request.yml
    - .github/PULL_REQUEST_TEMPLATE.md
    - .github/workflows/branch.yml
    - .github/workflows/linting.yml
    - .github/workflows/linting_comment.yml
    - assets/email_template.html
    - assets/email_template.txt
    - assets/sendmail_template.txt
    - docs/README.md
    - CODE_OF_CONDUCT.md
    - LICENSE
    - .gitignore
  multiqc_config:
    - report_comment
  nextflow_config:
    - manifest.name
    - manifest.homePage
j
I am trying to recreate this with a new created pipeline and the test works for me
if you try to modify the main.nf of multiqc by adding an extra input channel, for example
val(test)
and run
nf-core pipelines lint
you should get this error
could you try?
r
I just tried your approach. Ran pipelines lint. Did not fail. Screenshot below. Ran modules lint. It failed on error as expected. See screenshot below (ignore the error about unable to connect to container url)
🤔 1
j
could you copy the output when you run
nf-core --verbose pipelines lint
? let's see if this gives us more information 🤞🏻
r
Thank you for looking into this. Attached is the output log with the val(test) in place in main.nf of nf-core multiqc module
j
what happens if you delete the chache in
~/.nextflow/nf-core
and try again?
r
I tried it several times. Will give it a try again.
j
if this still doesn't work, could you try to add the parameter
--show-passed
?
👍 1
and just to be sure, you don't have any duplicated
lint
in the
.nf-core.yml
, right? or another
.nf-core.yml
file one directory up or similar
r
I will attach the nf-core.yml shortly. I don't have any other nf-core yml in any subdirectories. I am running linting from the parent directory.
Screenshot of .nf-core.yml file below. Also attached the output log with show-passed and some checks on if there are any duplicate yml files in the current directory (see the first 10 lines).
j
I can't see why is this skipped 🙈 last check, you don't have an .nf-core.yml file anywhere even outside the directory you are running the command from?
r
There are other projects in my workspace that contain .nf-core.yml, but they pretty much resemble or match what is in the current file. But, let me try something else then -- I will create a test repo in a temp folder or my home folder and test out the lint functionality.
👍🏻 1
I ran the following to create an nf-core test repo (wgsnptest). There are no .nf-core.yml files in the /tmp mount/directory
Copy code
cd /tmp
nf-core pipelines create
// provided inputs (name, org name, author, outdir, etc.)
cd nf-core-wgsnptest/
nf-core pipelines lint
// 189 tests passed, 0 tests ignored, 27 test warnings, 0 tests failed
vi modules/nf-core/multiqc/main.nf
// added val(test) in the input section
nf-core pipelines lint
// same result as above -- 189 tests passed, 0 tests failed.
Attached the output log (without verbose) with before and after change in multiqc main.nf
🤯 1
image.png
In screenshot below, you can see that there is no .nf-core.yml as well
If i run an modules lint, it shows the error. screenshot below.
j
are you able to install the dev version to nf-core in the machine you are running this?
r
Sure. I think I can do that. So, how do I get the dev version?
j
if you use pip, you can run this
Copy code
pip install --upgrade --force-reinstall git+<https://github.com/nf-core/tools.git@dev>
just to check if something was fixed, because I can't reproduce the same behavior you are seeing
r
Ok. Let me create a venv and do an install. Will try it out on the same nf-test-wgsnptest repo after that. It will take a little time for me get the venv setup and install it. Will get back soon.
👍🏻 1
Actually, it was quick and was able to reproduce the error now. It shows up.
j
you see the failing multiqc test?
r
Yes
j
🙌🏻 sorry for the very long debugging process 😱
r
image.png
j
then, it will be fixed with the new release of nf-core/tools
👍 1
thankyou 1
you can use the dev version until then, but be aware that you might see some
files_unchanged
linting tests failing until you update your pipeline to the new template version
r
I am in the process of running linting on our production ready pipelines (via github actions). I don't think I can suggest a dev version of the nf-core tool to our clients yet. But, I will update them on this. Will see how they want me to move forward with. But looks like there is an apparent bug in the 3.2.x version of the code where it is not getting picked up even though the source code (line 573 of init.py of pipelines lint) shows it is a union of tests.