Skip to content

Getting started with plugin development

Compiling

To compile and run the tests use the following command:

./gradlew check

Launch it with installed Nextflow

Warning

This method will add the development version of the plugin to your Nextflow plugins Take care when using this method and make sure that you are never using a development version to run real pipelines. You can delete all nf-schema versions using this command:

rm -rf ~/.nextflow/plugins/nf-schema*

  • Install the current version of the plugin in your .nextflow/plugins folder
make install
  • Update or add the nf-schema plugin with the installed version in your test pipeline
nextflow.config
plugins {
    id 'nf-schema@x.y.z'
}

Launch it with a local version of Nextflow

  • Clone the Nextflow repo into a sibling directory
cd .. && git clone https://github.com/nextflow-io/nextflow
cd nextflow && ./gradlew exportClasspath
  • Append to the settings.gradle in this project the following line:
includeBuild('../nextflow')
  • Compile the plugin code
./gradlew compileGroovy
  • Run nextflow with this command:
./launch.sh run -plugins nf-schema <script/pipeline name> [pipeline params]

Change and preview the docs

The docs are generated using Material for MkDocs. You can install the required packages as follows:

pip install mkdocs-material pymdown-extensions pillow cairosvg

To change the docs, edit the files in the docs/ folder and run the following command to generate the docs:

mkdocs serve

To preview the docs, open the URL provided by mkdocs in your browser.