Thank you for your interest in contributing to this project! This document provides guidelines and instructions for setting up your development environment and contributing code.
- Node.js >= 12.0.0
- Node-RED >= 2.0.0
- Git
- Python with pip for pre-commit hooks
git clone https://github.com/seqeralabs/node-red-seqera.git
cd node-red-seqeraThis project uses pre-commit hooks for code quality checks.
First, install pre-commit and initialise it within the cloned repo:
# Install pre-commit (requires Python)
pip install pre-commit
# Install the git hooks
pre-commit installNow, every time you run git commit, a range of checks will run.
Formatting errors will be automatically corrected, just run git add and git commit again and they should pass.
You can also run pre-commit run --all-files at any time to run checks.
First, download and install Node.js locally.
Then install Node-RED globally via npm:
npm install -g node-redThis will make the node-red command available globally on your system.
See the Node-RED Getting Started guide for more installation options and troubleshooting.
The easiest way to test your changes is to install the package locally in your Node-RED user directory;
# From the node-red-seqera directory
npm link
# Navigate to your Node-RED user directory
cd ~/.node-red
# Link the package
npm link @seqera/node-red-seqeraNow restart Node-RED, and any changes you make to the code will be immediately reflected (you may need to restart Node-RED to see changes).
See official npm-link docs for details.
# Start Node-RED (command can be run anywhere)
node-redOpen your browser to http://localhost:1880 to access the Node-RED editor.
After making code changes:
- JavaScript files (
.js): Restart Node-RED - HTML files (
.html): Refresh your browser (Ctrl+Shift+R / Cmd+Shift+R)
This project uses Mocha for testing with node-red-node-test-helper for Node-RED integration testing.
npm install# Run all tests
npm test
# Run tests with coverage report
npm run test:coverage
# Run tests with lcov output (for CI)
npm run test:ciTests are located in the test/ directory:
test/helper.js- Shared test utilities and mock factoriestest/*_spec.js- Test files for each node (following Node-RED naming convention)
Each test file covers:
- Node loading and configuration
- Input message handling
- API call mocking (using nock)
- Output message verification
- Error handling
When adding new nodes or modifying existing ones, please add or update tests accordingly. Tests should:
- Use the shared helper functions from
test/helper.js - Mock all external API calls with nock
- Test both success and error paths
- Verify message passthrough (custom properties preserved)
The project has two Docker images includeed, that bundle and customise a Node-RED installation and come with the Seqera nodes pre-installed.
docker/
├── Dockerfile # Base Node-RED + Seqera nodes
├── Dockerfile.studios # Optimized for Seqera Studios
└── settings.js # Custom Node-RED configuration
Images are automatically built and published via GitHub actions. However, if you would like to build and test locally, you can:
# Base image
docker build -f docker/Dockerfile -t node-red-seqera:latest .
# Studios image
docker build -f docker/Dockerfile.studios -t node-red-seqera-studios:latest-studios .- Documentation: Check
CLAUDE.mdfor detailed architecture notes - Issues: Search existing GitHub issues
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.