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

Add nftests custom modules #7201

Merged
merged 28 commits into from
Jan 17, 2025
Merged

Add nftests custom modules #7201

merged 28 commits into from
Jan 17, 2025

Conversation

nschcolnicov
Copy link
Contributor

PR checklist

Closes #XXX

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@nschcolnicov nschcolnicov requested a review from a team as a code owner December 12, 2024 20:01
.github/workflows/pytest-workflow.yml Outdated Show resolved Hide resolved
modules/nf-core/custom/matrixfilter/main.nf Outdated Show resolved Hide resolved
modules/nf-core/custom/matrixfilter/main.nf Show resolved Hide resolved
modules/nf-core/custom/matrixfilter/tests/main.nf.test Outdated Show resolved Hide resolved
modules/nf-core/custom/matrixfilter/tests/main.nf.test Outdated Show resolved Hide resolved
modules/nf-core/custom/matrixfilter/tests/nextflow.config Outdated Show resolved Hide resolved
modules/nf-core/custom/tabulartogseacls/main.nf Outdated Show resolved Hide resolved
modules/nf-core/custom/tabulartogseagct/main.nf Outdated Show resolved Hide resolved
@famosab
Copy link
Contributor

famosab commented Dec 16, 2024

You will also need to remove the modules from the pytest config file. Afterwards we should be good to go :)

https://github.com/nf-core/modules/blob/816ff3b787af7e12e75a7d95f76b631f474853ee/tests/config/pytest_modules.yml#L112C1-L120C53

@nschcolnicov
Copy link
Contributor Author

nschcolnicov commented Dec 17, 2024

There is a linting error:
image
But running the command suggested nf-core modules lint --fix reveals that the changes that it is expecting are not correct, it tries to convert all of the output channels into map type:
image

What do you think about this? @famosab

@famosab
Copy link
Contributor

famosab commented Dec 17, 2024

Huh that is interesting can you commit the "fixed" yaml files and push them to this PR so I can have a look?

@nschcolnicov
Copy link
Contributor Author

Huh that is interesting can you commit the "fixed" yaml files and push them to this PR so I can have a look?

Take a look: eb84fde

Copy link
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are almost done :)

modules/nf-core/custom/matrixfilter/tests/nextflow.config Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment above

@nschcolnicov
Copy link
Contributor Author

It seems that I'm no longer able to push to this branch:
image
@famosab @mirpedrol Do you know what could be wrong?

@nschcolnicov nschcolnicov force-pushed the add_nftests_custom_modules branch from eb84fde to 50e2138 Compare December 18, 2024 16:32
@famosab
Copy link
Contributor

famosab commented Dec 19, 2024

@nschcolnicov I think you should be able to push again :)

@SPPearce
Copy link
Contributor

SPPearce commented Jan 8, 2025

The docker CI runners should be working now.

@SPPearce
Copy link
Contributor

SPPearce commented Jan 8, 2025

Just a linting issue on one of the modules, then should be good to merge.

@nschcolnicov
Copy link
Contributor Author

Just a linting issue on one of the modules, then should be good to merge.

Thank you for looking into this. The linting error seems to be a bug. After running the suggested command:
nf-core modules lint --fix custom/matrixfilter
We get that the meta.yml is updated with inaccurate values, output files get labeled as map, among other things:
image

@famosab
Copy link
Contributor

famosab commented Jan 9, 2025

I have seen this error before, its already an issue on nf-core/tools. I would suggest to fix it manually:

 ╭─ [✗] 1 Module Test Failed ───────────────────────────────────────────────────╮
│                      ╷                          ╷                            │
│ Module name          │ File path                │ Test message               │
│╶─────────────────────┼──────────────────────────┼───────────────────────────╴│
│ custom/matrixfilter  │ modules/nf-core/custom/… │ Module meta.yml does not   │
│                      │                          │ match main.nf. Outputs     │
│                      │                          │ should contain:            │
│                      │                          │ {'filtered': ['meta',      │
│                      │                          │ '.filtered.tsv'], 'tests': │
│                      │                          │ ['meta', '.tests.tsv'],    │
│                      │                          │ 'session_info': ['meta',   │
│                      │                          │ '*R_sessionInfo.log'],     │
│                      │                          │ 'versions':                │
│                      │                          │ ['versions.yml']} Run      │
│                      │                          │ nf-core modules lint --fix │
│                      │                          │ to update the meta.yml     │
│                      │                          │ file.                      │
│                      ╵                          ╵                            │
╰──────────────────────────────────────────────────────────────────────────────╯

@SPPearce SPPearce requested a review from famosab January 15, 2025 11:15
Copy link
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me mostly. Wondering why the tests fail though...

@SPPearce
Copy link
Contributor

Looks good to me mostly. Wondering why the tests fail though...

Think the runners are having a bad day again...

@SPPearce SPPearce requested a review from famosab January 16, 2025 14:43
Copy link
Contributor

@atrigila atrigila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I agree with opening a new ticket with the suggestion so this new nf-tests can move forward :)

@SPPearce SPPearce added this pull request to the merge queue Jan 17, 2025
Merged via the queue into master with commit c835e16 Jan 17, 2025
29 checks passed
@SPPearce SPPearce deleted the add_nftests_custom_modules branch January 17, 2025 10:45
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

Successfully merging this pull request may close these issues.

5 participants