Fix lint: preserve underscores for subworkflow includes via full path#4074
Merged
pinin4fjords merged 7 commits intodevfrom Mar 3, 2026
Merged
Conversation
…es via full path When a subworkflow includes another subworkflow using the full path (e.g., `../../../subworkflows/nf-core/vcf_gather_bcftools`), the linter incorrectly converted underscores to slashes, producing `vcf/gather/bcftools` instead of `vcf_gather_bcftools`. This happened because the `../../../` prefix check assumed all full-path includes were modules (where underscore-to-slash conversion is correct). Subworkflow includes via full paths also start with `../../../` but should preserve underscores since subworkflow directory names use them. The fix checks whether the include path contains `subworkflows/` before deciding how to derive the component name. Fixes #4073 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mashehu
requested changes
Mar 2, 2026
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
mashehu
reviewed
Mar 3, 2026
Cover full-path subworkflow includes (underscore preservation), full-path module includes (underscore-to-slash conversion), relative subworkflow includes, and mixed include scenarios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…b.com:nf-core/tools into fix/subworkflow-include-underscore-conversion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mashehu
approved these changes
Mar 3, 2026
Contributor
mashehu
left a comment
There was a problem hiding this comment.
looking great now. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_components_to_install()to check whether a full-path include (../../../...) points to a subworkflow or module before deriving the component namesubworkflows/in the path) now preserve underscores and are correctly added to the subworkflows dictProblem
When a subworkflow includes another subworkflow using the full path:
include { VCF_GATHER_BCFTOOLS } from '../../../subworkflows/nf-core/vcf_gather_bcftools'The linter converted the name to
vcf/gather/bcftools(splitting on underscores), causing ameta_includelint failure even whenmeta.ymlcorrectly listsvcf_gather_bcftoolsin components.This is because the
../../../path prefix check assumed all full-path includes were modules. Relative subworkflow includes (../vcf_gather_bcftools) worked fine since they hit a different code path.Context
Encountered in nf-core/modules#10283
Fixes #4073
🤖 Generated with Claude Code