Skip to content

Commit

Permalink
Merge pull request #2736 from nf-core/rm_lib
Browse files Browse the repository at this point in the history
Remove lib directory and replace it with granular utils_* subworkflows
  • Loading branch information
mirpedrol authored Feb 16, 2024
2 parents 2224747 + 28c0196 commit f016e45
Show file tree
Hide file tree
Showing 55 changed files with 2,004 additions and 1,390 deletions.
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 @@ -41,7 +41,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 @@ -105,7 +104,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

0 comments on commit f016e45

Please sign in to comment.