Repository navigation
docs: replace set operator for typed workflows; rewrite Hello Nextflow quizzes - #1050
Open
mribeirodantas wants to merge 2 commits into
Open
mribeirodantas wants to merge 2 commits into
mribeirodantas wants to merge 2 commits into
Conversation
… note Hello Nextflow quizzes (Parts 1-6): - Reword questions and options for precision; keep distractors similar in length to the correct option - Balance correct answers across A-D (11 each); previously 32 of 44 single-answer questions were C - Fix Part 1 Q1: a process only requires a script block - Replace the default-memory question with one on setting memory for all processes Use nf-core Part 2: - A bare flag or --skip_trim true passes validation with nf-schema 2.7 (nf-core/demo 1.2.0); --skip_trim false passes too but is the string "false", which is truthy, so trimming is skipped. Recommend params files for booleans and integers on that basis.
Typed workflows do not support the `set` and `tap` channel operators (https://docs.seqera.io/nextflow/static-typing-prep#avoid-set-and-tap-operators). The recommended replacement is standard assignment, e.g. `ch = channel.of(...)`. Update the training materials so learners are taught the form that keeps working with static typing. Metadata side quest: - Solutions 2.3, 2.4 and 3.2 now assign the channel directly with `ch_languages = IDENTIFY_LANGUAGE.out .map { ... } .map { ... }` instead of ending the chain with `.set { ch_languages }`. - Lesson 2.3.1 shows the assignment in the After block and explains it in the key points; hl_lines updated to "3 7-18 20". - Removing the `.set` line shifts the rest of main.nf up by one line: 2.4.2 snippets now start at line 31 and 2.4.3 output block snippets at line 39. Working with files side quest: - Section 6.2.1 used `set` to name the remapped channel. It now teaches `ch_samples = ch_files.map { ... }`, mirroring how `ch_files` is assigned, and drops the link to the `set` operator reference. - Section 6.2.2 no longer needs the "refactor to direct assignment" step, so step 1 only covers switching to `tuple()`. The Before block and hl_lines are adjusted to match. nf-core build (01_rewrite_hello.md): - The template excerpt and the core-hello-start solution keep `.set { ch_samplesheet }` because nf-core/tools still generates it, so it is what learners see in their own scaffold. The info admonition now notes that typed workflows do not support `set` and that the standard assignment used in the following replacement step is preferred. No `tap` usage existed in the English docs or scripts. Translations are left to the Translate workflow. Tested: metadata solutions 2.3, 2.4 and 3.2 run and resume successfully; `nextflow lint` reports no errors; heading check and prettier pass on the changed markdown.
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Nextflow linting complete! ❌ 1 files had 5 errors 💡 Tip: Click filename locations to go directly to that code. View all 34 issues
View formatting changes
|
This branch has not been deployed
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.
This branch contains two independent documentation changes.
1. Replace the
setoperator with standard assignmentTyped workflows do not support the
setandtapchannel operators (static typing prep). The recommended replacement is standard assignment (ch = channel.of(...)).ch_languages = IDENTIFY_LANGUAGE.out ...directly. The lesson's After block, key points,hl_linesandlinenums(2.4.2 and 2.4.3 shift by one line) are updated to match.ch_samples = ch_files.map { ... }instead ofset. Section 6.2.2 no longer needs the "refactor to direct assignment" step.core-hello-startkeep.set { ch_samplesheet }, because nf-core/tools still generates it and learners see it in their own scaffold. The info admonition now notes that typed workflows do not supportsetand that standard assignment is preferred.There was no
tapusage in the English docs or scripts. Translations are left to the Translate workflow.2. Rewrite Hello Nextflow quizzes and correct the nf-core boolean flag note
--skip_trim falseis the truthy string"false") and recommends params files for booleans and integers.Testing
nextflow lintreports no errors on the changed scripts.check_headings.pyandprettier --checkpass on the changed markdown.Note:
side-quests/metadata/data/datasheet.csvuses absolute/workspaces/training/...paths, so the metadata side quest only runs as-is in Codespaces. It is unchanged here.🤖 Generated with Claude Code