Skip to content

Getting started with plugin development

Tests

To run the tests use the following command:

make test

Install and use in pipelines

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'
}

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.

Release and publish the plugin

  1. In build.gradle make sure that:
  2. version matches the desired release version,
  3. github.repository matches the repository of the plugin,
  4. github.indexUrl points to your fork of the plugins index repository.
  5. Create a file named $HOME/.gradle/gradle.properties, where $HOME is your home directory. Add the following properties:
  6. github_username: The GitHub username granting access to the plugin repository.
  7. github_access_token: The GitHub access token required to upload and commit changes to the plugin repository.
  8. github_commit_email: The email address associated with your GitHub account.
  9. Update the changelog.
  10. Build and publish the plugin to your GitHub repository:
    make release
    
  11. Create a pull request against the nextflow-io/plugins repository to make the plugin publicly accessible.