Skip to content

Commit fa290d6

Browse files
ewelsclaude
andcommitted
Add CI/CD tooling and developer documentation
Merge unique additions from refactor branch into dev: - Add pre-commit configuration (ruff, prettier, standard hooks) - Add lint workflow using pre-commit action - Add PyPI publish workflow with trusted publishing - Add report validation to test workflow - Add dev dependencies to pyproject.toml - Add CLAUDE.md with updated architecture documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0d7a6ae commit fa290d6

File tree

8 files changed

+365
-25
lines changed

8 files changed

+365
-25
lines changed

.github/workflows/lint.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Lint"
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
jobs:
9+
pre-commit:
10+
name: Pre-commit
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 5
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Run pre-commit
24+
uses: pre-commit/action@v3.0.1

.github/workflows/linux.yaml

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,75 @@
11
name: "Build - Linux"
2-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
branches: [main, master, dev]
6+
pull_request:
37

48
jobs:
59
run_multiqc:
610
name: Linux - Python ${{ matrix.python-version }}
711
runs-on: ubuntu-latest
812
strategy:
13+
fail-fast: false
914
matrix:
10-
python-version: [3.11, 3.12, 3.13]
15+
python-version: ["3.11", "3.12", "3.13"]
1116
timeout-minutes: 10
1217

1318
steps:
14-
# Check out MultiQC code
15-
- uses: actions/checkout@v2
19+
- name: Checkout code
20+
uses: actions/checkout@v4
1621

17-
# Set up Python
1822
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
23+
uses: actions/setup-python@v5
2024
with:
2125
python-version: ${{ matrix.python-version }}
2226

23-
# Update pip and install beautifulsoup4 for CI tests (CSP checking)
24-
- name: Install dependencies for CI tests
27+
- name: Install dependencies
2528
run: |
26-
python -m pip install --upgrade pip setuptools beautifulsoup4 multiqc
29+
python -m pip install --upgrade pip setuptools wheel
30+
pip install multiqc
2731
28-
# Install MultiQC
2932
- name: Install MultiQC_SAV
3033
run: pip install .
3134

32-
# Run all of the tests!
33-
- name: MiSeq
34-
run: multiqc -m SAV test_data/MiSeq
35+
- name: Test MiSeq
36+
run: |
37+
multiqc --strict -v --no-version-check -m SAV test_data/MiSeq -o test_output/MiSeq
38+
test -f test_output/MiSeq/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
39+
grep -q "SAV" test_output/MiSeq/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)
3540
36-
- name: MiSeqI100
37-
run: multiqc --strict -v --no-version-check -m SAV test_data/MiSeqI100
41+
- name: Test MiSeqI100
42+
run: |
43+
multiqc --strict -v --no-version-check -m SAV test_data/MiSeqI100 -o test_output/MiSeqI100
44+
test -f test_output/MiSeqI100/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
45+
grep -q "SAV" test_output/MiSeqI100/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)
3846
39-
- name: HiSeq3000
40-
run: multiqc --strict -v --no-version-check -m SAV test_data/HiSeq3000
47+
- name: Test HiSeq3000
48+
run: |
49+
multiqc --strict -v --no-version-check -m SAV test_data/HiSeq3000 -o test_output/HiSeq3000
50+
test -f test_output/HiSeq3000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
51+
grep -q "SAV" test_output/HiSeq3000/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)
4152
42-
- name: NextSeq500
43-
run: multiqc --strict -v --no-version-check -m SAV test_data/NextSeq500
53+
- name: Test NextSeq500
54+
run: |
55+
multiqc --strict -v --no-version-check -m SAV test_data/NextSeq500 -o test_output/NextSeq500
56+
test -f test_output/NextSeq500/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
57+
grep -q "SAV" test_output/NextSeq500/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)
4458
45-
- name: NextSeq2000
46-
run: multiqc --strict -v --no-version-check -m SAV test_data/NextSeq2000
59+
- name: Test NextSeq2000
60+
run: |
61+
multiqc --strict -v --no-version-check -m SAV test_data/NextSeq2000 -o test_output/NextSeq2000
62+
test -f test_output/NextSeq2000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
63+
grep -q "SAV" test_output/NextSeq2000/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)
4764
48-
- name: NovaSeq6000
49-
run: multiqc --strict -v --no-version-check -m SAV test_data/NovaSeq6000
65+
- name: Test NovaSeq6000
66+
run: |
67+
multiqc --strict -v --no-version-check -m SAV test_data/NovaSeq6000 -o test_output/NovaSeq6000
68+
test -f test_output/NovaSeq6000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
69+
grep -q "SAV" test_output/NovaSeq6000/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)
5070
51-
- name: NovaSeqX
52-
run: multiqc --strict -v --no-version-check -m SAV test_data/NovaSeqX
71+
- name: Test NovaSeqX
72+
run: |
73+
multiqc --strict -v --no-version-check -m SAV test_data/NovaSeqX -o test_output/NovaSeqX
74+
test -f test_output/NovaSeqX/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
75+
grep -q "SAV" test_output/NovaSeqX/multiqc_data/multiqc.log || (echo "ERROR: SAV module not found in log" && exit 1)

.github/workflows/publish.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Publish to PyPI"
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Publish to PyPI
10+
runs-on: ubuntu-latest
11+
environment: pypi
12+
permissions:
13+
id-token: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install build dependencies
25+
run: pip install build
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1

.pre-commit-config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
minimum_pre_commit_version: "2.9.2"
2+
3+
repos:
4+
# Meta hooks for verification
5+
- repo: meta
6+
hooks:
7+
- id: identity
8+
- id: check-hooks-apply
9+
10+
# Standard pre-commit hooks
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: "v5.0.0"
13+
hooks:
14+
- id: check-added-large-files
15+
args: ["--maxkb=1000"]
16+
- id: check-merge-conflict
17+
- id: check-yaml
18+
- id: check-toml
19+
- id: debug-statements
20+
- id: end-of-file-fixer
21+
exclude: ^(test_data|docs/example)/
22+
- id: trailing-whitespace
23+
exclude: ^(test_data|docs/example)/
24+
- id: mixed-line-ending
25+
args: ["--fix=lf"]
26+
exclude: ^(test_data|docs/example)/
27+
28+
# Line ending normalization
29+
- repo: https://github.com/Lucas-C/pre-commit-hooks
30+
rev: "v1.5.5"
31+
hooks:
32+
- id: remove-crlf
33+
exclude: ^(test_data|docs/example)/
34+
35+
# Prettier for markdown, yaml, json formatting
36+
- repo: https://github.com/pre-commit/mirrors-prettier
37+
rev: "v3.1.0"
38+
hooks:
39+
- id: prettier
40+
types_or: [markdown, yaml, json]
41+
additional_dependencies:
42+
- "prettier@3.1.0"
43+
44+
# Ruff formatting
45+
- repo: https://github.com/astral-sh/ruff-pre-commit
46+
rev: "v0.8.3"
47+
hooks:
48+
- id: ruff-format
49+
50+
# Ruff linting with auto-fix
51+
- repo: https://github.com/astral-sh/ruff-pre-commit
52+
rev: "v0.8.3"
53+
hooks:
54+
- id: ruff
55+
args: [--fix, --exit-non-zero-on-fix]

.prettierignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Build artifacts
2+
dist/
3+
build/
4+
*.egg-info/
5+
6+
# Python cache
7+
__pycache__/
8+
*.pyc
9+
10+
# Test data
11+
test_data/
12+
13+
# Virtual environments
14+
venv/
15+
.venv/
16+
env/
17+
18+
# Coverage
19+
htmlcov/
20+
.coverage
21+
22+
# IDE
23+
.idea/
24+
.vscode/
25+
26+
# Example reports
27+
docs/example/
28+
29+
# Lock files
30+
*.lock

.prettierrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
printWidth: 120,
3+
tabWidth: 2,
4+
useTabs: false,
5+
semi: true,
6+
singleQuote: false,
7+
trailingComma: "all",
8+
bracketSpacing: true,
9+
proseWrap: "preserve",
10+
};

0 commit comments

Comments
 (0)