Skip to content

Commit

Permalink
Update sites/docs/src/content/docs/guidelines/components/modules.md
Browse files Browse the repository at this point in the history
Co-authored-by: James A. Fellows Yates <[email protected]>
  • Loading branch information
christopher-hakkaart and jfy133 authored Dec 10, 2024
1 parent 9233dd5 commit dd0ba6b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sites/docs/src/content/docs/guidelines/components/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,17 @@ Alternate suggestions include using `grep -c` to search for a valid string match

### Script inclusion

:::warning
You SHOULD NOT use [Nextflow module binaries](https://www.nextflow.io/docs/latest/module.html#module-binaries), as these are not fully portable across all execution contexts.
If a module's `script:` block contains a script rather than command invocations, regardless of the language (e.g., Bash, R, Python), and the content is more than approximately 20 lines, it MUST be provided through a [Nextflow module template](https://www.nextflow.io/docs/latest/module.html#module-templates).
Using module templates helps distinguish between changes made to the scientific logic within the script and those affecting the workflow-specific logic in the module. This separation improves the code's clarity and maintainability.

:::note
We recommend use of Nextflow templates as they are the most portable method of the separate custom script execution across all execution contexts
:::

:::note
Where script content in a module becomes particularly extensive, we strongly encourage packaging and hosting the code externally and provisioning via Conda/Docker as a standalone tool(kit).
:::

If a module's `script:` block contains a script rather than command invocations, regardless of the language (e.g., Bash, R, Python), and the content is more than 20 lines, it MUST be provided through a [Nextflow module template](https://www.nextflow.io/docs/latest/module.html#module-templates).
Using module templates helps distinguish between changes made to the scientific logic within the script and those affecting the workflow-specific logic in the module. This separation improves the code's clarity and maintainability.

#### Inline script code

If the script content is less than approximately 20 lines, the code MAY be embedded directly in the module without a dedicated template file. However, they should still follow the guidance content as with a template.
Expand Down

0 comments on commit dd0ba6b

Please sign in to comment.