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

Modules: Have component_files_identical check for new optional files in modules #2816

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

asp8200
Copy link
Contributor

@asp8200 asp8200 commented Feb 29, 2024

#2774

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

nf_core/synced_repo.py Outdated Show resolved Hide resolved
nf_core/synced_repo.py Outdated Show resolved Hide resolved
nf_core/synced_repo.py Outdated Show resolved Hide resolved
nf_core/synced_repo.py Outdated Show resolved Hide resolved
nf_core/synced_repo.py Outdated Show resolved Hide resolved
nf_core/synced_repo.py Outdated Show resolved Hide resolved
asp8200 and others added 7 commits March 1, 2024 13:42
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
@mashehu
Copy link
Contributor

mashehu commented Mar 1, 2024

@nf-core-bot changelog

@mashehu mashehu changed the title Have component_files_identical check for new optional files in modules Components: Have component_files_identical check for new optional files in modules Mar 1, 2024
@mashehu mashehu mentioned this pull request Mar 12, 2024
@mirpedrol
Copy link
Member

Hello!
I merged #2840 to this branch and modified the code a little bit, I hope it's ok :)
I think applying the patch was working as expected.

What I modified with the last commit is using all files from the modules repo to check if the component files are identical, so we don't need to take into worry about file names in case we have modules with special cases.

The tests were failing because one file from the modules repo didn't exist in the pipeline, which should be considered as False (files are not identical).

@asp8200
Copy link
Contributor Author

asp8200 commented Mar 15, 2024

Hello! I merged #2840 to this branch and modified the code a little bit, I hope it's ok :) I think applying the patch was working as expected.

What I modified with the last commit is using all files from the modules repo to check if the component files are identical, so we don't need to take into worry about file names in case we have modules with special cases.

The tests were failing because one file from the modules repo didn't exist in the pipeline, which should be considered as False (files are not identical).

@mirpedrol : Thanks, Juliá. Concerning the failing test: It seems to me that the reason it is failing is that the file environment.yml is missing in the mimic-old-trimgalore, so the linter should fail in that case, right? Should I just adjust the trimgalore-test accordingly?

@mirpedrol
Copy link
Member

Concerning the failing test: It seems to me that the reason it is failing is that the file environment.yml is missing in the mimic-old-trimgalore

Checking a bit further on the remaining failing test. We are only installing the module to a pipeline and linting, so it should pass. When I try reproducing this locally, the environment.yml file is modified, because we are now sorting the content of the file alphabetically. I will fix the module in nf-core/modules and hope the test will pass then :)

@asp8200
Copy link
Contributor Author

asp8200 commented Mar 15, 2024

Hello! I merged #2840 to this branch and modified the code a little bit, I hope it's ok :) I think applying the patch was working as expected.
What I modified with the last commit is using all files from the modules repo to check if the component files are identical, so we don't need to take into worry about file names in case we have modules with special cases.
The tests were failing because one file from the modules repo didn't exist in the pipeline, which should be considered as False (files are not identical).

@mirpedrol : Thanks, Juliá. Concerning the failing test: It seems to me that the reason it is failing is that the file environment.yml is missing in the mimic-old-trimgalore, so the linter should fail in that case, right? Should I just adjust the trimgalore-test accordingly?

I see. This would have been easy to debug if the test had printed the content of module_lint.failed on fail.

@asp8200 asp8200 marked this pull request as ready for review March 15, 2024 15:12
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 74.77%. Comparing base (224c773) to head (848948a).

Files Patch % Lines
nf_core/synced_repo.py 80.00% 2 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asp8200
Copy link
Contributor Author

asp8200 commented Mar 15, 2024

@nf-core-bot changelog

@asp8200 asp8200 changed the title Components: Have component_files_identical check for new optional files in modules Modules: Have component_files_identical check for new optional files in modules Mar 15, 2024
@asp8200
Copy link
Contributor Author

asp8200 commented Mar 15, 2024

@nf-core-bot changelog

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.

None yet

3 participants