Contributing¶
Contributions are welcome. This document describes how to set up a development environment and the conventions the project follows.
Development setup¶
git clone https://github.com/andreassag/clystere.git
cd clystere
# Create a Python virtual environment (Python 3.11+)
python -m venv .venv
source .venv/bin/activate
# Install development tools
pip install pre-commit pytest ruff
npm install
# Activate the pre-commit git hooks
git config core.hooksPath .githooks
Code style¶
Python (bin/)¶
Python scripts are linted and formatted with Ruff. The target interpreter is Python 3.11.
Nextflow (.nf, .config) & Documentation¶
Nextflow and config files follow EditorConfig rules and Prettier standards:
Pre-commit hooks¶
Pre-commit git hooks run automatically before each git commit to guarantee clean code and formatting:
| Check | Tool | Purpose |
|---|---|---|
| Python Linting | ruff check |
Code style and import order |
| Python Formatting | ruff format |
Code layout consistency |
| Line Length & Standards | editorconfig-checker |
Indentation and line endings |
| Document Formatting | prettier |
Markdown, JSON, and YAML styling |
Run all checks manually:
Testing¶
Python unit tests¶
Tests live in tests/python/ and exercise the pure Python functions in bin/.
nf-test (Nextflow pipeline & module tests)¶
# Run all nf-test suites (integration + local modules)
nf-test test tests/ --verbose
# Run specific local module tests
nf-test test tests/modules/local/summary --verbose
nf-test test tests/modules/local/combgc --verbose
nf-test test tests/modules/local/bigscape --verbose
Full pipeline test¶
Branching and pull requests¶
mainis the stable release branch.- Feature branches:
feature/<description> - Bug/hot fixes:
fix/<description> - Non-code tasks:
chore/<description> - Preparing a release:
release/<description> - Open a pull request against
main; CI must be green before merge.
Releases¶
Releases follow Semantic Versioning. To cut a release:
- Update the version in
nextflow.config(manifest.version). - Commit with message
release: bump version to X.Y.Z. - Push a
X.Y.Ztag — therelease.ymlworkflow creates the GitHub Release automatically.