Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Lint"

on:
push:
branches: [main, master]
pull_request:

jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
79 changes: 53 additions & 26 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,79 @@
name: "Build - Linux"
on: [push, pull_request]
name: Generate test reports

on:
push:
branches: [main, dev]
pull_request:

jobs:
run_multiqc:
name: Linux - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.11, 3.12, 3.13]
python-version: ["3.9", "3.14"]
timeout-minutes: 10

steps:
# Check out MultiQC code
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

# Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Update pip and install beautifulsoup4 for CI tests (CSP checking)
- name: Install dependencies for CI tests
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools beautifulsoup4 multiqc
python -m pip install --upgrade pip setuptools wheel
pip install multiqc

# Install MultiQC
- name: Install MultiQC_SAV
run: pip install .

# Run all of the tests!
- name: MiSeq
run: multiqc -m SAV test_data/MiSeq
- name: Make test output dir
run: mkdir test_output

- name: MiSeqI100
run: multiqc --strict -v --no-version-check -m SAV test_data/MiSeqI100
- name: Test MiSeq
run: |
multiqc --strict -v test_data/MiSeq -o test_output/MiSeq
test -f test_output/MiSeq/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: HiSeq3000
run: multiqc --strict -v --no-version-check -m SAV test_data/HiSeq3000
- name: Test MiSeqI100
run: |
multiqc --strict -v test_data/MiSeqI100 -o test_output/MiSeqI100
test -f test_output/MiSeqI100/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: NextSeq500
run: multiqc --strict -v --no-version-check -m SAV test_data/NextSeq500
- name: Test HiSeq3000
run: |
multiqc --strict -v test_data/HiSeq3000 -o test_output/HiSeq3000
test -f test_output/HiSeq3000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: NextSeq2000
run: multiqc --strict -v --no-version-check -m SAV test_data/NextSeq2000
- name: Test NextSeq500
run: |
multiqc --strict -v test_data/NextSeq500 -o test_output/NextSeq500
test -f test_output/NextSeq500/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: NovaSeq6000
run: multiqc --strict -v --no-version-check -m SAV test_data/NovaSeq6000
- name: Test NextSeq2000
run: |
multiqc --strict -v test_data/NextSeq2000 -o test_output/NextSeq2000
test -f test_output/NextSeq2000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: NovaSeqX
run: multiqc --strict -v --no-version-check -m SAV test_data/NovaSeqX
- name: Test NovaSeq6000
run: |
multiqc --strict -v test_data/NovaSeq6000 -o test_output/NovaSeq6000
test -f test_output/NovaSeq6000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: Test NovaSeqX
run: |
multiqc --strict -v test_data/NovaSeqX -o test_output/NovaSeqX
test -f test_output/NovaSeqX/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)

- name: Upload test output
uses: actions/upload-artifact@v4
if: always()
with:
name: test-output-py${{ matrix.python-version }}
path: test_output/
retention-days: 7
31 changes: 31 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Publish to PyPI"

on:
release:
types: [published]

jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build dependencies
run: pip install build

- name: Build package
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
55 changes: 55 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
minimum_pre_commit_version: "2.9.2"

repos:
# Meta hooks for verification
- repo: meta
hooks:
- id: identity
- id: check-hooks-apply

# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
exclude: ^(test_data|docs/example)/
- id: trailing-whitespace
exclude: ^(test_data|docs/example)/
- id: mixed-line-ending
args: ["--fix=lf"]
exclude: ^(test_data|docs/example)/

# Line ending normalization
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.5.5"
hooks:
- id: remove-crlf
exclude: ^(test_data|docs/example)/

# Prettier for markdown, yaml, json formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
- id: prettier
types_or: [markdown, yaml, json]
additional_dependencies:
- "prettier@3.1.0"

# Ruff formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.3"
hooks:
- id: ruff-format

# Ruff linting with auto-fix
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.3"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
30 changes: 30 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Build artifacts
dist/
build/
*.egg-info/

# Python cache
__pycache__/
*.pyc

# Test data
test_data/

# Virtual environments
venv/
.venv/
env/

# Coverage
htmlcov/
.coverage

# IDE
.idea/
.vscode/

# Example reports
docs/example/

# Lock files
*.lock
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
printWidth: 120,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: false,
trailingComma: "all",
bracketSpacing: true,
proseWrap: "preserve",
};
Loading
Loading