-
Notifications
You must be signed in to change notification settings - Fork 262
Add Hello Plugins training module #761
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
base: master
Are you sure you want to change the base?
Conversation
Add comprehensive training material for Nextflow plugin development covering: - Using existing plugins (discovery, installation, configuration) - Creating plugins with custom functions, operators, and trace observers - Building, testing, and distributing plugins Includes: - Full tutorial documentation with Before/After code comparisons - Starting files for hands-on exercises - Solution files including complete nf-greeting plugin - Supporting images (registry screenshot, test report) Co-Authored-By: Claude Opus 4.5 <[email protected]>
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Nextflow linting complete! ❌ 1 files had 1 errors 💡 Tip: Click filename locations to go directly to that code. View all 1 issues
View formatting changes
|
Makefiles require tabs for indentation per POSIX standard. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
@pinin4fjords I would completely remove any mention of creating custom factories / operators. Nearly every example of a custom factory / operator that I see in the wild would have been better as a custom function, and they are currently in a precarious position in terms of future type checking support. Otherwise, it looks like the right idea. Custom functions and trace observers are by far the most important to cover. Custom executors and filesystems are also powerful but way more complicated -- if you try to cover them at all, I would put them in a separate tutorial. |
Thanks @bentsherman ! |
Based on feedback from @bentsherman: custom operators/factories are in a precarious position for future type checking support, and nearly every example would have been better as a custom function. Changes: - Remove Section 8 (Custom operators and factories) entirely - Remove Section 10.1 (Channel factories) - Renumber sections 9-11 to 8-10 - Update all references to operators/factories throughout - Update code examples to use functions instead of shoutAll operator - Keep focus on functions and trace observers as the key extension types Co-Authored-By: Claude Opus 4.5 <[email protected]>
Remove shoutAll operator from main.nf solution, use reverseGreeting function instead to match the updated tutorial content. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Change "functions, factories, etc." to "functions, observers, etc." to avoid confusion with channel factories (which were removed). Co-Authored-By: Claude Opus 4.5 <[email protected]>
Remove extra features from solution files that aren't covered in the tutorial: - Remove unused prefix/suffix config options from nextflow.config - Simplify output message in main.nf to match tutorial - Remove extra comment block from random_id_example.nf Co-Authored-By: Claude Opus 4.5 <[email protected]>
adamrtalbot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just reviewed the "using plugins" section.
- Let's make it shorter and tighter, it's verbose and wordy.
- Focus on how plugins extend Nextflow functionality rather than sharing code
- Keep it simple and explain it one way and only one way.
- Remove make comparison for Gradle (advanced concept) - Replace reverseString() with samplesheetToList() as example (more recognizable) - Reduce hyperbole throughout, get to the point faster - Add Slack as example for extending pipelines - Clarify that community can add features without modifying Nextflow core - Simplify tip about using plugins section - Add notes about latest version default and runtime download - Restructure "Try it" section: remove local function comparison, use config-only approach, remove CLI flag diversion - Add note about development burden being on plugin developer and Nextflow handling plugin management Co-Authored-By: Claude Opus 4.5 <[email protected]>
The plugin registry already lists available plugins, so this section was redundant. Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace em-dash elaborations with periods or semicolons - Use colons instead of hyphens for list item explanations - Remove unnecessary trailing explanations - Simplify sentences to be more direct Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix section 2.7 -> 2.6 after removing Popular plugins section - Run prettier to fix table formatting Co-Authored-By: Claude Opus 4.5 <[email protected]>
Removing plugin files so they can be cleanly merged from the plugin-development-side-quest branch, which has the reviewed and updated version.
|
For section 8 on custom plugin configuration, it might be worth mentioning that you can define your custom config as a proper class with some annotations, so that the Nextflow linter and language server can recognize it. But this tutorial is already pretty long and I've already documented it here, so you could just add a blurb with a link to these docs. |
Links to official docs for defining custom config as a proper class with annotations for IDE and linter support. Addresses review feedback from @adamrtalbot. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Changes based on reviewing transcript of live delivery: - Update Java version requirement from 17 to 21 (matches training env) - Fix error output line numbers in Section 8.3 (was "line 7", now "line 30") - Make Section 4 progressive: add functions one at a time instead of all three at once, reinforcing the @function pattern incrementally Co-Authored-By: Claude Opus 4.5 <[email protected]>
Complete list of changes from transcript analysisAfter reviewing the transcript of the live delivery session, the following improvements were made across multiple commits: Structural improvements
"Run it first" pedagogy
Clearer transitions
Additional context and reassurance
Configuration section enhancements
Accuracy fixes (this commit)
All changes verified by running complete tutorial walkthrough in Docker container. |
Convert from pipe syntax to dot syntax for consistency: - `| map` → `.map` - `| view` → `.view()` Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace 14 "Let's" patterns with direct statements per style guide - Change "Don't worry about the warnings!" to "The warnings are expected." - Fix hl_lines at line 1801 to highlight actual code changes (7-8 18) instead of method signatures (5-6 17) - Update solution files to match final tutorial state (section 8.3): - main.nf: add script comment, update output message - nextflow.config: add prefix/suffix settings - random_id_example.nf: use dot notation for consistency Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Adjust table column alignment - Use underscore for italics instead of asterisks Co-Authored-By: Claude Opus 4.5 <[email protected]>
943b1e1 to
d82ed8e
Compare
Restructure the plugin development content from a single side quest into a full training module with 7 progressive parts: - Part 1: Plugin Basics - discovering and using existing plugins - Part 2: Create Project - scaffolding with `nextflow plugin create` - Part 3: Custom Functions - implementing @function methods - Part 4: Build and Test - Gradle workflow and Spock testing - Part 5: Observers - TraceObserver for workflow lifecycle events - Part 6: Configuration - session.config.navigate() and ConfigScope - Part 7: Distribution - public registry and internal hosting Updates for Nextflow 25.10.2 plugin scaffolding: - Use Greeting* class naming (not NfGreeting*) - Use io.nextflow.nextflow-plugin version 1.0.0-beta.10 - Set nextflowVersion = '25.10.0' (required for config.spec.* classes) - Use nextflow.config.spec.* imports (not nextflow.config.dsl.*) - Use @ScopeName + implements ConfigScope (not @ConfigScope annotation) Documentation fixes: - Fix hl_lines in 06_configuration.md (line 4 not 5 for build.gradle) - Remove exclamation marks from summary.md and next_steps.md - Replace "let's" with direct phrasing in 01_plugin_basics.md Co-Authored-By: Claude Opus 4.5 <[email protected]>
d82ed8e to
a3edfba
Compare
Summary
Convert the plugin development side quest into a full Hello Plugins training module with 7 progressive parts:
nextflow plugin createAudience
Contents
Documentation (
docs/hello_plugins/):Exercise files (
hello-plugins/):Updates for Nextflow 25.10.2
Test plan
🤖 Generated with Claude Code