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

Remove lib directory and replace it with granular utils_* subworkflows #2736

Merged
merged 27 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5ed48a9
Install utils_subworkflows_* from nf-core/modules
drpatelh Feb 8, 2024
53487ec
Remove lib directory from pipeline template
drpatelh Feb 8, 2024
99fb69f
Change output channel name in input_check subworkflow
drpatelh Feb 8, 2024
bae90f0
Delete custom/dumpsoftwareversions module
drpatelh Feb 8, 2024
a78d41b
Delete fasta from test.config
drpatelh Feb 8, 2024
7343ce4
Add local subworkflow for pipeline utilities
drpatelh Feb 8, 2024
090a395
Update main workflows in pipeline to use utils_* subworkflows
drpatelh Feb 8, 2024
fdf3e54
Disable native version detection in MultiQC
drpatelh Feb 8, 2024
5214976
Add checkProfileProvided function back in
drpatelh Feb 8, 2024
7832a44
update utils_nfcore_pipeline in the template
mirpedrol Feb 9, 2024
91b1529
add multiqc report to completion email
mirpedrol Feb 10, 2024
48c7026
add methodsDescriptionText to multiqc report
mirpedrol Feb 12, 2024
bbf3fac
update template subworkflows
mirpedrol Feb 12, 2024
125cc59
remove warn exceeding resources
mirpedrol Feb 12, 2024
c64ed82
fix SimpleTemplateEngine error by writing to the file
mirpedrol Feb 12, 2024
e56999f
use nf-validation to create input channel
mirpedrol Feb 13, 2024
75f833f
linting: warn if groovy files in lib exist
mirpedrol Feb 13, 2024
a62c307
fix pytests
mirpedrol Feb 13, 2024
0dd064a
rename local subworkflow from the template
mirpedrol Feb 13, 2024
5b5b30a
fix editorconfig errors in the template
mirpedrol Feb 13, 2024
71a0eec
rename local subworkflow with jinja
mirpedrol Feb 14, 2024
ff69ee3
fix more pytests
mirpedrol Feb 14, 2024
b325944
fix creating a template without igenomes
mirpedrol Feb 14, 2024
3bd4cfe
return multiqc description as string
mirpedrol Feb 14, 2024
9c89874
fix prettier inconsistencies in the pipeline template
mirpedrol Feb 14, 2024
7f7e920
fix more linting tests
mirpedrol Feb 14, 2024
28c0196
apply suggestions from code review
mirpedrol Feb 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ testing
nf_core/module-template/meta.yml
nf_core/module-template/tests/tags.yml
nf_core/subworkflow-template/tests/tags.yml
nf_core/pipeline-template/nextflow_schema.json
# don't run on things handled by ruff
*.py
*.pyc
Expand Down
2 changes: 1 addition & 1 deletion nf_core/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def render_template(self):
short_name = self.template_params["short_name"]
rename_files = {
"workflows/pipeline.nf": f"workflows/{short_name}.nf",
"lib/WorkflowPipeline.groovy": f"lib/Workflow{short_name[0].upper()}{short_name[1:]}.groovy",
"subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf": f"subworkflows/local/utils_nfcore_{short_name}_pipeline/main.nf",
}

# Set the paths to skip according to customization
Expand Down
17 changes: 9 additions & 8 deletions nf_core/lint/files_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ def files_exist(self) -> Dict[str, Union[List[str], bool]]:
docs/output.md
docs/README.md
docs/usage.md
lib/NfcoreTemplate.groovy
lib/Utils.groovy
lib/WorkflowMain.groovy
nextflow_schema.json
nextflow.config
README.md
Expand All @@ -69,7 +66,6 @@ def files_exist(self) -> Dict[str, Union[List[str], bool]]:
conf/igenomes.config
.github/workflows/awstest.yml
.github/workflows/awsfulltest.yml
lib/WorkflowPIPELINE.groovy
pyproject.toml

Files that *must not* be present, due to being renamed or removed in the template:
Expand All @@ -91,6 +87,11 @@ def files_exist(self) -> Dict[str, Union[List[str], bool]]:
lib/Checks.groovy
lib/Completion.groovy
lib/Workflow.groovy
lib/WorkflowPIPELINE.groovy
lib/NfcoreTemplate.groovy
lib/Utils.groovy
lib/WorkflowMain.groovy


Files that *should not* be present:

Expand Down Expand Up @@ -165,9 +166,6 @@ def files_exist(self) -> Dict[str, Union[List[str], bool]]:
[Path("docs", "README.md")],
[Path("docs", "README.md")],
[Path("docs", "usage.md")],
[Path("lib", "NfcoreTemplate.groovy")],
[Path("lib", "Utils.groovy")],
[Path("lib", "WorkflowMain.groovy")],
]

files_warn = [
Expand All @@ -177,7 +175,6 @@ def files_exist(self) -> Dict[str, Union[List[str], bool]]:
[Path("conf", "igenomes.config")],
[Path(".github", "workflows", "awstest.yml")],
[Path(".github", "workflows", "awsfulltest.yml")],
[Path("lib", f"Workflow{short_name[0].upper()}{short_name[1:]}.groovy")],
[Path("modules.json")],
[Path("pyproject.toml")],
]
Expand All @@ -199,6 +196,10 @@ def files_exist(self) -> Dict[str, Union[List[str], bool]]:
Path("lib", "Checks.groovy"),
Path("lib", "Completion.groovy"),
Path("lib", "Workflow.groovy"),
Path("lib", "Utils.groovy"),
Path("lib", "WorkflowMain.groovy"),
Path("lib", "NfcoreTemplate.groovy"),
Path("lib", f"Workflow{short_name[0].upper()}{short_name[1:]}.groovy"),
]
files_warn_ifexists = [Path(".travis.yml")]
files_fail_ifinconfig: List[Tuple[Path, Dict[str, str]]] = [
Expand Down
2 changes: 0 additions & 2 deletions nf_core/lint/files_unchanged.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:
docs/images/nf-core-PIPELINE_logo_light.png
docs/images/nf-core-PIPELINE_logo_dark.png
docs/README.md'
lib/NfcoreTemplate.groovy
['LICENSE', 'LICENSE.md', 'LICENCE', 'LICENCE.md'], # NB: British / American spelling

Files that can have additional content but must include the template contents::
Expand Down Expand Up @@ -104,7 +103,6 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:
[Path("docs", "images", f"nf-core-{short_name}_logo_light.png")],
[Path("docs", "images", f"nf-core-{short_name}_logo_dark.png")],
[Path("docs", "README.md")],
[Path("lib", "NfcoreTemplate.groovy")],
]
files_partial = [
[Path(".gitignore"), Path(".prettierignore"), Path("pyproject.toml")],
Expand Down
7 changes: 6 additions & 1 deletion nf_core/pipeline-template/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
[/subworkflows/nf-core/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset

[/assets/email*]
indent_size = unset
Expand Down
2 changes: 2 additions & 0 deletions nf_core/pipeline-template/assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ report_section_order:
order: -1002

export_plots: true

disable_version_detection: true
21 changes: 9 additions & 12 deletions nf_core/pipeline-template/assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,22 @@
"sample": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Sample name must be provided and cannot contain spaces"
"errorMessage": "Sample name must be provided and cannot contain spaces",
"meta": ["id"]
},
"fastq_1": {
"type": "string",
"format": "file-path",
"exists": true,
"pattern": "^\\S+\\.f(ast)?q\\.gz$",
"errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
},
"fastq_2": {
"errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'",
"anyOf": [
{
"type": "string",
"pattern": "^\\S+\\.f(ast)?q\\.gz$"
},
{
"type": "string",
"maxLength": 0
}
]
"type": "string",
"format": "file-path",
"exists": true,
"pattern": "^\\S+\\.f(ast)?q\\.gz$",
"errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
}
},
"required": ["sample", "fastq_1"]
Expand Down
Loading
Loading