This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Nextflow is a scientific workflow management system built primarily in Groovy and Java. It enables the creation of scalable, portable, and reproducible computational pipelines using a dataflow programming model. The project follows a modular architecture with a plugin-based system for cloud providers and specialized features.
- Primary build tool: Gradle with wrapper (
./gradlew) - Quick commands via Makefile:
make compile- Compile sources and export classpathmake assemble- Build info, compile, and assemblemake test- Run all testsmake check- Run verification tasksmake clean- Clean build artifacts
- Unit tests:
make testor./gradlew test- Uses Spock Framework (Groovy-based testing)
- JaCoCo integration for code coverage
- Specific test class:
./gradlew test --tests "SomeTestClass" - Specific module:
make test module=nextflow - Smoke tests:
make smokeorNXF_SMOKE=1 ./gradlew test(skips long-running tests, network-dependent tests, and cloud provider integration tests) - Integration tests: Run from
tests/directory using test runner scripts - Cloud validation tests: Located in
validation/directory (requires credentials)
- Development launcher:
./launch.sh run script.nf(uses development build) - Dependency analysis:
make depsormake deps config=runtime - Install locally:
make install(installs to Maven local)
- nextflow: Main application module with core workflow engine, CLI, AST transformations, executors
- nf-commons: Shared utilities, plugin system infrastructure, extension methods
- nf-httpfs: HTTP filesystem support and custom providers
- nf-lang: Language parsing, ANTLR grammars, AST implementation
- nf-lineage: Data lineage tracking and workflow execution history
- Cloud providers: nf-amazon (AWS), nf-azure (Azure), nf-google (GCP)
- Execution platforms: nf-k8s (Kubernetes)
- Services: nf-tower (Seqera Platform), nf-wave (container management)
- Other: nf-console (interactive interface), nf-cloudcache (cloud caching)
- Language: Groovy 4.0.29 (Java-compatible, targeting Java 17)
- Concurrency: GPars 1.2.1 (Actor model, parallel/concurrent programming)
- Build: Gradle with Java 21 toolchain
- Parsing: ANTLR for Nextflow DSL
- Serialization: Kryo
- Database: LevelDB for local caching
- Version Control: JGit integration
- Unit tests: Each module has
src/test/groovy/with Spock Framework tests - Integration tests:
tests/directory with .nf workflows and expected outputs - Legacy tests:
tests-v1/for DSL v1 compatibility - Validation tests:
validation/directory for cloud provider end-to-end testing - Documentation tests:
docs/snippets/for verifying documentation examples
- All code must include Apache 2.0 license headers
- Contributions require Developer Certificate of Origin (DCO) sign-off
- Use existing code patterns and conventions from similar modules
- Follow Groovy idioms and leverage the Nextflow DSL patterns
- Local development: Use
make compileto build and./launch.shto test changes - Adding features: First check modules like
nextflowfor core features or create plugins for specialized functionality - Plugin development: Follow existing plugin patterns in
plugins/directory - Testing changes: Always run
make testbefore committing - Cloud testing: Use validation scripts in
validation/directory with appropriate credentials
- Java toolchain uses version 21 for development, targets Java 17 compatibility
- Uses shadow plugin for creating fat JARs
- Maven publication to S3-based Seqera repositories
- Multi-module project with shared dependencies managed in root build.gradle
- DCO sign-off required: All commits must be signed by adding a
Signed-off-byline to the commit message or by using the-soption (see CONTRIBUTING.md for details). - Always use sign-off: Use
git commit -sorgit commit --signofffor commits to avoid DCO bot issues - CI control tags: Use special tags in commit messages to control CI behavior:
[ci skip]- Skip the execution of CI tests[ci fast]- Run only unit tests and skip integration tests[e2e stage]- Run end-to-end tests vs Seqera platform stage environment[e2e prod]- Same but against production platform[release]- Trigger release process
VERSION: Define the current version numbernextflow: Launch wrapper script (updated by build process).launch.classpath: Development classpath (generated bymake compile)build.gradle: Root build configuration with multi-module setupsettings.gradle: Gradle project structure definitionplugins/*/VERSION: Define the version of the corresponding plugin sub-project.adr/: Architecture Decision Records (ADRs) documenting significant structural and technical decisions in the project
Follow these actions to make a new release:
- Update the
changelog.txtfile in each plugin sub-project (if any change has been done). - Update the
VERSIONfile in in each plugin sub-project. Use a semantic version number depending the impact of the change, or do not change if no changes have been done to the plugin. - Update
nextflowVersionattribute in thebuild.gradlefile for plugins requiring specific Nextflow versions. - Commit the version and changelog files changes independently for each plugin. Use as commit
message the template
Bump plugin-name@versione.g. `Bump nf-amazon@2.0.0. - Update
VERSIONfile in the project root using a calendar-like versioning scheme. Versions in the 4-th and 10-th month are "stable releases", e.g.25.10.0, while versions in all other months are "edge releases", e.g.25.09.0-edge. - Update the project root
changelog.txtwith changes since the past release. Use the git log command to determine what changed e.g.git log v<PREVIOUS VERSION>.. - Run
make releaseInfoto update the version number and generate checksums. - Run this command to stage for commit the release files:
git add \ VERSION \ changelog.txt \ nextflow \ nextflow.md5 \ nextflow.sha1 \ nextflow.sha256 \ modules/nextflow/src/main/resources/META-INF/plugins-info.txt \ modules/nextflow/src/main/resources/META-INF/build-info.properties - Make a commit using the
[release]and[e2e prod]tags in the comment and push it upstream to trigger the release automation with GitHub action:git commit -m "[release] Nextflow version 25.09.0-edge" git push origin master