Skip to content

Commit

Permalink
Merge pull request #2540 from nf-core/fix-conda
Browse files Browse the repository at this point in the history
Fix conda environment reference
  • Loading branch information
Midnighter authored Nov 27, 2023
2 parents db3c449 + 84f92bc commit 3a3ecbc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fix writing files to a remote outdir in the NfcoreTemplate helper functions ([#2465](https://github.com/nf-core/tools/pull/2465))
- Fancier syntax highlighting for example samplesheets in the usage.md template ([#2503](https://github.com/nf-core/tools/pull/2503))
- Use closure for multiqc ext.args ([#2509](https://github.com/nf-core/tools/pull/2509))
- Fix how the modules template references the conda environment file ([#2540](https://github.com/nf-core/tools/pull/2540))

### Linting

Expand Down
2 changes: 1 addition & 1 deletion nf_core/module-template/modules/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ process {{ component_name_underscore|upper }} {
// For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems.
// TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below.
{% endif -%}
conda '${modulesDir}/environment.yml'
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'{{ singularity_container if singularity_container else 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE' }}':
'{{ docker_container if docker_container else 'biocontainers/YOUR-TOOL-HERE' }}' }"
Expand Down
2 changes: 1 addition & 1 deletion nf_core/modules/lint/environment_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def environment_yml(module_lint_object: ComponentLint, module: NFCoreComponent)
# check if the module's main.nf requires a conda environment
with open(Path(module.component_dir, "main.nf"), "r") as fh:
main_nf = fh.read()
if "conda '${modulesDir}/environment.yml'" in main_nf:
if 'conda "${moduleDir}/environment.yml"' in main_nf:
module.failed.append(
("environment_yml_exists", "Module's `environment.yml` does not exist", module.environment_yml)
)
Expand Down

0 comments on commit 3a3ecbc

Please sign in to comment.