Skip to content

Commit b4d90a9

Browse files
authored
Merge pull request #10 from MultiQC/dev-merged
2 parents 0d7a6ae + cec1977 commit b4d90a9

File tree

13 files changed

+439
-90
lines changed

13 files changed

+439
-90
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix
1010
USER vscode
1111
WORKDIR /home/vscode
1212

13-
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc
13+
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
{
2-
"name": "MultiQC_SAV Dev Container",
3-
"runArgs": ["--platform=linux/amd64" ],
4-
"build": {
5-
"dockerfile": "Dockerfile",
6-
"context": ".."
7-
},
8-
"customizations": {
9-
"vscode": {
10-
"settings": {},
11-
"extensions": [
12-
"ms-python.python",
13-
"charliermarsh.ruff",
14-
"GitHub.copilot"
15-
]
16-
}
17-
},
18-
"features": {
19-
},
20-
"mounts": [
21-
"source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"
22-
],
23-
"postCreateCommand": "sudo chown vscode .pixi && pixi install"
24-
}
2+
"name": "MultiQC_SAV Dev Container",
3+
"runArgs": ["--platform=linux/amd64"],
4+
"build": {
5+
"dockerfile": "Dockerfile",
6+
"context": ".."
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"settings": {},
11+
"extensions": ["ms-python.python", "charliermarsh.ruff", "GitHub.copilot"]
12+
}
13+
},
14+
"features": {},
15+
"mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"],
16+
"postCreateCommand": "sudo chown vscode .pixi && pixi install"
17+
}

.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: 58 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,84 @@
1-
name: "Build - Linux"
2-
on: [push, pull_request]
1+
name: Generate test reports
2+
3+
on:
4+
push:
5+
branches: [main, 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.9", "3.14"]
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: Make test output dir
36+
run: mkdir test_output
3537

36-
- name: MiSeqI100
37-
run: multiqc --strict -v --no-version-check -m SAV test_data/MiSeqI100
38+
- name: Test MiSeq
39+
run: |
40+
multiqc --strict test_data/MiSeq -o test_output/MiSeq
41+
test -f test_output/MiSeq/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
3842
39-
- name: HiSeq3000
40-
run: multiqc --strict -v --no-version-check -m SAV test_data/HiSeq3000
43+
- name: Test MiSeqI100
44+
run: |
45+
multiqc --strict test_data/MiSeqI100 -o test_output/MiSeqI100
46+
test -f test_output/MiSeqI100/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
4147
42-
- name: NextSeq500
43-
run: multiqc --strict -v --no-version-check -m SAV test_data/NextSeq500
48+
- name: Test HiSeq3000
49+
run: |
50+
multiqc --strict test_data/HiSeq3000 -o test_output/HiSeq3000
51+
test -f test_output/HiSeq3000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
4452
45-
- name: NextSeq2000
46-
run: multiqc --strict -v --no-version-check -m SAV test_data/NextSeq2000
53+
- name: Test NextSeq500
54+
run: |
55+
multiqc --strict test_data/NextSeq500 -o test_output/NextSeq500
56+
test -f test_output/NextSeq500/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
4757
48-
- name: NovaSeq6000
49-
run: multiqc --strict -v --no-version-check -m SAV test_data/NovaSeq6000
58+
- name: Test NextSeq2000
59+
run: |
60+
multiqc --strict test_data/NextSeq2000 -o test_output/NextSeq2000
61+
test -f test_output/NextSeq2000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
5062
51-
- name: NovaSeqX
52-
run: multiqc --strict -v --no-version-check -m SAV test_data/NovaSeqX
63+
- name: Test NovaSeq6000
64+
run: |
65+
multiqc --strict test_data/NovaSeq6000 -o test_output/NovaSeq6000
66+
test -f test_output/NovaSeq6000/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
67+
68+
- name: Test NovaSeqX
69+
run: |
70+
multiqc --strict test_data/NovaSeqX -o test_output/NovaSeqX
71+
test -f test_output/NovaSeqX/multiqc_report.html || (echo "ERROR: Report not generated" && exit 1)
72+
73+
- name: Check that ignoring samples works
74+
run: |
75+
multiqc --strict test_data/ -o test_output/ignore_samples --ignore-samples "*"
76+
test ! -f test_output/ignore_samples/multiqc_report.html || (echo "ERROR: Report should not be generated" && exit 1)
77+
78+
- name: Upload test output
79+
uses: actions/upload-artifact@v4
80+
if: always()
81+
with:
82+
name: test-output-py${{ matrix.python-version }}
83+
path: test_output/
84+
retention-days: 7

.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+
};

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"python-envs.defaultEnvManager": "ms-python.python:system",
33
"python-envs.pythonProjects": []
4-
}
4+
}

0 commit comments

Comments
 (0)