dvpimg 0.0.1a36__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dvpimg-0.0.1a36/.bumpversion.ini +21 -0
- dvpimg-0.0.1a36/.codecov.yaml +6 -0
- dvpimg-0.0.1a36/.github/release.yaml +16 -0
- dvpimg-0.0.1a36/.github/workflows/build.yaml +32 -0
- dvpimg-0.0.1a36/.github/workflows/bump-version.yaml +143 -0
- dvpimg-0.0.1a36/.github/workflows/main.yaml +44 -0
- dvpimg-0.0.1a36/.github/workflows/release-please.yaml +20 -0
- dvpimg-0.0.1a36/.github/workflows/release-pypi.yaml +31 -0
- dvpimg-0.0.1a36/.github/workflows/test.yaml +76 -0
- dvpimg-0.0.1a36/.gitignore +235 -0
- dvpimg-0.0.1a36/.pre-commit-config.yaml +52 -0
- dvpimg-0.0.1a36/.snakemake-workflow-catalog.yaml +11 -0
- dvpimg-0.0.1a36/CHANGELOG.md +37 -0
- dvpimg-0.0.1a36/CITATION.cff +38 -0
- dvpimg-0.0.1a36/LICENSE +21 -0
- dvpimg-0.0.1a36/PKG-INFO +316 -0
- dvpimg-0.0.1a36/README.md +244 -0
- dvpimg-0.0.1a36/docs/.gitkeep +0 -0
- dvpimg-0.0.1a36/docs/Makefile +20 -0
- dvpimg-0.0.1a36/docs/_static/css/custom.css +20 -0
- dvpimg-0.0.1a36/docs/conf.py +137 -0
- dvpimg-0.0.1a36/docs/contributing.md +1 -0
- dvpimg-0.0.1a36/docs/index.md +19 -0
- dvpimg-0.0.1a36/docs/references.bib +0 -0
- dvpimg-0.0.1a36/docs/references.md +5 -0
- dvpimg-0.0.1a36/docs/setup.md +54 -0
- dvpimg-0.0.1a36/docs/tutorials/components/classification.md +69 -0
- dvpimg-0.0.1a36/docs/tutorials/components/featurization.md +86 -0
- dvpimg-0.0.1a36/docs/tutorials/components/if_qc.md +100 -0
- dvpimg-0.0.1a36/docs/tutorials/components/io.md +66 -0
- dvpimg-0.0.1a36/docs/tutorials/components/segmentation.md +101 -0
- dvpimg-0.0.1a36/docs/tutorials/workflow/config.md +1 -0
- dvpimg-0.0.1a36/docs/tutorials/workflow/logger.md +24 -0
- dvpimg-0.0.1a36/docs/tutorials/workflow/run.md +7 -0
- dvpimg-0.0.1a36/docs/usage.md +20 -0
- dvpimg-0.0.1a36/environment.yaml +27 -0
- dvpimg-0.0.1a36/pyproject.toml +99 -0
- dvpimg-0.0.1a36/src/dvpimg/__init__.py +3 -0
- dvpimg-0.0.1a36/src/dvpimg/cli.py +16 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/__init__.py +71 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_base.py +153 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_classification.py +121 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_fluorescence.py +111 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_histology.py +40 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_pipeline_validator.py +189 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_qc.py +125 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_resources.py +154 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_segmentation.py +157 -0
- dvpimg-0.0.1a36/src/dvpimg/datamodel/_transform.py +19 -0
- dvpimg-0.0.1a36/src/dvpimg/featurize.py +142 -0
- dvpimg-0.0.1a36/src/dvpimg/gm/__init__.py +30 -0
- dvpimg-0.0.1a36/src/dvpimg/gm/_distribution.py +136 -0
- dvpimg-0.0.1a36/src/dvpimg/gm/_fit.py +183 -0
- dvpimg-0.0.1a36/src/dvpimg/gm/_metric.py +203 -0
- dvpimg-0.0.1a36/src/dvpimg/gm/_utils.py +25 -0
- dvpimg-0.0.1a36/src/dvpimg/io/__init__.py +3 -0
- dvpimg-0.0.1a36/src/dvpimg/io/_lazyslide.py +504 -0
- dvpimg-0.0.1a36/src/dvpimg/logging.py +160 -0
- dvpimg-0.0.1a36/src/dvpimg/pl.py +140 -0
- dvpimg-0.0.1a36/src/dvpimg/pp/__init__.py +25 -0
- dvpimg-0.0.1a36/src/dvpimg/pp/_qc.py +138 -0
- dvpimg-0.0.1a36/src/dvpimg/pp/_spatial.py +56 -0
- dvpimg-0.0.1a36/src/dvpimg/pp/_tissue_mask.py +236 -0
- dvpimg-0.0.1a36/src/dvpimg/pp/_transform.py +172 -0
- dvpimg-0.0.1a36/src/dvpimg/resources/performance.py +91 -0
- dvpimg-0.0.1a36/src/dvpimg/resources/workers.py +215 -0
- dvpimg-0.0.1a36/src/dvpimg/utils.py +327 -0
- dvpimg-0.0.1a36/src/dvpimg/validate/__init__.py +4 -0
- dvpimg-0.0.1a36/src/dvpimg/validate/_sdata.py +18 -0
- dvpimg-0.0.1a36/tests/integration/config/config-minimal.yaml +32 -0
- dvpimg-0.0.1a36/tests/integration/config/config.yaml +228 -0
- dvpimg-0.0.1a36/tests/integration/config/samples.csv +5 -0
- dvpimg-0.0.1a36/tests/integration/data/minimal.czi +0 -0
- dvpimg-0.0.1a36/tests/integration/data/minimal.rgb.czi +0 -0
- dvpimg-0.0.1a36/tests/unit/test_datamodel/test__base.py +363 -0
- dvpimg-0.0.1a36/tests/unit/test_featurize/test_featurize.py +196 -0
- dvpimg-0.0.1a36/tests/unit/test_gm/test__distribution.py +140 -0
- dvpimg-0.0.1a36/tests/unit/test_gm/test__fit.py +93 -0
- dvpimg-0.0.1a36/tests/unit/test_gm/test__metric.py +216 -0
- dvpimg-0.0.1a36/tests/unit/test_gm/test__utils.py +470 -0
- dvpimg-0.0.1a36/tests/unit/test_io/test__lazyslide.py +607 -0
- dvpimg-0.0.1a36/tests/unit/test_pp/test__qc.py +442 -0
- dvpimg-0.0.1a36/tests/unit/test_pp/test__spatial.py +69 -0
- dvpimg-0.0.1a36/tests/unit/test_pp/test__tissue_mask.py +416 -0
- dvpimg-0.0.1a36/tests/unit/test_pp/test__transform.py +351 -0
- dvpimg-0.0.1a36/tests/unit/test_resources/test_performance.py +292 -0
- dvpimg-0.0.1a36/tests/unit/test_resources/test_workers.py +371 -0
- dvpimg-0.0.1a36/tests/unit/test_utils.py +701 -0
- dvpimg-0.0.1a36/tests/unit/test_validate/test__sdata.py +63 -0
- dvpimg-0.0.1a36/workflow/Snakefile +146 -0
- dvpimg-0.0.1a36/workflow/config/README.md +46 -0
- dvpimg-0.0.1a36/workflow/config/config.yaml +29 -0
- dvpimg-0.0.1a36/workflow/config/samples.csv +1 -0
- dvpimg-0.0.1a36/workflow/envs/.gitkeep +0 -0
- dvpimg-0.0.1a36/workflow/envs/cp3.yaml +21 -0
- dvpimg-0.0.1a36/workflow/envs/cp4.yaml +20 -0
- dvpimg-0.0.1a36/workflow/envs/lazyslide.post-deploy.sh +7 -0
- dvpimg-0.0.1a36/workflow/envs/lazyslide.yaml +7 -0
- dvpimg-0.0.1a36/workflow/envs/lazyslide_segmentation.post-deploy.sh +7 -0
- dvpimg-0.0.1a36/workflow/envs/lazyslide_segmentation.yaml +7 -0
- dvpimg-0.0.1a36/workflow/envs/minimal.yaml +12 -0
- dvpimg-0.0.1a36/workflow/envs/spatialplot.yaml +13 -0
- dvpimg-0.0.1a36/workflow/rules/cell_featurization.smk +46 -0
- dvpimg-0.0.1a36/workflow/rules/classification.smk +59 -0
- dvpimg-0.0.1a36/workflow/rules/common.smk +192 -0
- dvpimg-0.0.1a36/workflow/rules/histology.smk +109 -0
- dvpimg-0.0.1a36/workflow/rules/io.smk +90 -0
- dvpimg-0.0.1a36/workflow/rules/plot.smk +143 -0
- dvpimg-0.0.1a36/workflow/rules/segmentation.smk +50 -0
- dvpimg-0.0.1a36/workflow/rules/tissue_id.smk +42 -0
- dvpimg-0.0.1a36/workflow/schemas/.gitkeep +0 -0
- dvpimg-0.0.1a36/workflow/schemas/samples.schema.yaml +48 -0
- dvpimg-0.0.1a36/workflow/scripts/cellpose_segmentation.py +239 -0
- dvpimg-0.0.1a36/workflow/scripts/fluorescence_featurization.py +181 -0
- dvpimg-0.0.1a36/workflow/scripts/fluorescence_processing.py +362 -0
- dvpimg-0.0.1a36/workflow/scripts/gmm_classification.py +157 -0
- dvpimg-0.0.1a36/workflow/scripts/he_artifact.py +169 -0
- dvpimg-0.0.1a36/workflow/scripts/he_cell_segmentation.py +206 -0
- dvpimg-0.0.1a36/workflow/scripts/patch_embedding.py +186 -0
- dvpimg-0.0.1a36/workflow/scripts/plot_cell_overlay.py +268 -0
- dvpimg-0.0.1a36/workflow/scripts/plot_gmm_classification.py +175 -0
- dvpimg-0.0.1a36/workflow/scripts/plot_qc_distribution.py +100 -0
- dvpimg-0.0.1a36/workflow/scripts/tissue_segmentation.py +169 -0
- dvpimg-0.0.1a36/workflow/scripts/to_sdata.py +224 -0
- dvpimg-0.0.1a36/workflow/snakemake.sbatch +45 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[bumpversion]
|
|
2
|
+
current_version = 0.0.1-alpha36
|
|
3
|
+
commit = true
|
|
4
|
+
tag = true
|
|
5
|
+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)-(?P<release>[a-z]+)(?P<build>\d+)
|
|
6
|
+
serialize =
|
|
7
|
+
{major}.{minor}.{patch}-{release}{build}
|
|
8
|
+
|
|
9
|
+
[bumpversion:file:pyproject.toml]
|
|
10
|
+
search = version = "{current_version}"
|
|
11
|
+
replace = version = "{new_version}"
|
|
12
|
+
|
|
13
|
+
[bumpversion:part:release]
|
|
14
|
+
values =
|
|
15
|
+
alpha
|
|
16
|
+
beta
|
|
17
|
+
rc
|
|
18
|
+
final
|
|
19
|
+
|
|
20
|
+
[bumpversion:part:build]
|
|
21
|
+
first_value = 1
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# .github/release.yml
|
|
2
|
+
|
|
3
|
+
changelog:
|
|
4
|
+
exclude:
|
|
5
|
+
labels:
|
|
6
|
+
- bump-version
|
|
7
|
+
categories:
|
|
8
|
+
- title: 🚀 Features
|
|
9
|
+
labels:
|
|
10
|
+
- enhancement
|
|
11
|
+
- title: ⛓️💥 Breaking Changes
|
|
12
|
+
labels:
|
|
13
|
+
- breaking-change
|
|
14
|
+
- title: 📎 Other Changes
|
|
15
|
+
labels:
|
|
16
|
+
- "*"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Check Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
package:
|
|
15
|
+
runs-on: ${{ matrix.platform }}
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
platform: [ubuntu-latest, windows-latest, macos-latest]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python 3.12
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
cache: "pip"
|
|
26
|
+
cache-dependency-path: "**/pyproject.toml"
|
|
27
|
+
- name: Install build dependencies
|
|
28
|
+
run: python -m pip install --upgrade pip wheel twine build
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: python -m build
|
|
31
|
+
- name: Check package
|
|
32
|
+
run: twine check --strict dist/*.whl
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
name: Version Bump
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [closed]
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
bump:
|
|
11
|
+
description: "Select version bump type"
|
|
12
|
+
required: true
|
|
13
|
+
default: patch
|
|
14
|
+
type: choice
|
|
15
|
+
options:
|
|
16
|
+
- major
|
|
17
|
+
- minor
|
|
18
|
+
- patch
|
|
19
|
+
- release
|
|
20
|
+
- build
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
bump-version:
|
|
24
|
+
name: bump-version
|
|
25
|
+
permissions:
|
|
26
|
+
contents: write
|
|
27
|
+
pull-requests: write # Add this permission for creating PRs
|
|
28
|
+
|
|
29
|
+
# Run if PR merged or manually triggered
|
|
30
|
+
if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || (github.event_name == 'workflow_dispatch')
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout code
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
token: ${{ secrets.GITHUB_TOKEN }} # Ensure we have push permissions
|
|
39
|
+
|
|
40
|
+
- name: Set up Python
|
|
41
|
+
uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: "3.12"
|
|
44
|
+
|
|
45
|
+
- name: Install bump2version and packaging
|
|
46
|
+
run: pip install bump2version packaging
|
|
47
|
+
|
|
48
|
+
- name: Authenticate GitHub CLI
|
|
49
|
+
run: |
|
|
50
|
+
echo "${{ secrets.PR_WRITE }}" | gh auth login --with-token
|
|
51
|
+
|
|
52
|
+
- name: Set up git config
|
|
53
|
+
shell: bash
|
|
54
|
+
env:
|
|
55
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
56
|
+
run: |
|
|
57
|
+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
58
|
+
git config --global user.name "${GITHUB_ACTOR}"
|
|
59
|
+
git config -l
|
|
60
|
+
|
|
61
|
+
- name: Determine bump type
|
|
62
|
+
id: bump
|
|
63
|
+
run: |
|
|
64
|
+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
65
|
+
# Manual trigger: use input
|
|
66
|
+
echo "bump=${{ github.event.inputs.bump }}" >> $GITHUB_OUTPUT
|
|
67
|
+
else
|
|
68
|
+
# PR merge: determine bump from labels
|
|
69
|
+
# Use environment variable to safely handle JSON with special characters
|
|
70
|
+
echo "Labels: $LABELS_JSON"
|
|
71
|
+
if echo "$LABELS_JSON" | grep -q '"name": *"update-major"'; then
|
|
72
|
+
echo "bump=major" >> $GITHUB_OUTPUT
|
|
73
|
+
elif echo "$LABELS_JSON" | grep -q '"name": *"update-minor"'; then
|
|
74
|
+
echo "bump=minor" >> $GITHUB_OUTPUT
|
|
75
|
+
elif echo "$LABELS_JSON" | grep -q '"name": *"update-patch"'; then
|
|
76
|
+
echo "bump=patch" >> $GITHUB_OUTPUT
|
|
77
|
+
elif echo "$LABELS_JSON" | grep -q '"name": *"update-release"'; then
|
|
78
|
+
echo "bump=release" >> $GITHUB_OUTPUT
|
|
79
|
+
elif echo "$LABELS_JSON" | grep -q '"name": *"update-build"'; then
|
|
80
|
+
echo "bump=build" >> $GITHUB_OUTPUT
|
|
81
|
+
else
|
|
82
|
+
echo "bump=none" >> $GITHUB_OUTPUT
|
|
83
|
+
fi
|
|
84
|
+
fi
|
|
85
|
+
env:
|
|
86
|
+
LABELS_JSON: ${{ toJson(github.event.pull_request.labels) }}
|
|
87
|
+
|
|
88
|
+
- name: Preview version bump
|
|
89
|
+
if: steps.bump.outputs.bump != 'none'
|
|
90
|
+
run: |
|
|
91
|
+
BUMP_TYPE="${{ steps.bump.outputs.bump }}"
|
|
92
|
+
echo "Previewing version bump: $BUMP_TYPE"
|
|
93
|
+
bump2version --config-file .bumpversion.ini --dry-run --list $BUMP_TYPE
|
|
94
|
+
|
|
95
|
+
- name: Bump version
|
|
96
|
+
id: b2v
|
|
97
|
+
if: steps.bump.outputs.bump != 'none'
|
|
98
|
+
env:
|
|
99
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
100
|
+
run: |
|
|
101
|
+
BUMP_TYPE="${{ steps.bump.outputs.bump }}"
|
|
102
|
+
|
|
103
|
+
# Create a new branch for manual bump
|
|
104
|
+
BRANCH="bump/${BUMP_TYPE}-$(date +%Y%m%d%H%M%S)"
|
|
105
|
+
git checkout -b $BRANCH
|
|
106
|
+
|
|
107
|
+
# Perform the version bump
|
|
108
|
+
bump2version --config-file .bumpversion.ini $BUMP_TYPE
|
|
109
|
+
|
|
110
|
+
# Push the branch with tags
|
|
111
|
+
git push origin $BRANCH --tags
|
|
112
|
+
|
|
113
|
+
# Output branch name for PR step
|
|
114
|
+
echo "branch_name=$BRANCH" >> $GITHUB_OUTPUT
|
|
115
|
+
echo "Branch created: $BRANCH"
|
|
116
|
+
|
|
117
|
+
NEW_VERSION=$(grep -oP '(?<=^current_version = ).*' .bumpversion.ini)
|
|
118
|
+
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
119
|
+
|
|
120
|
+
- name: Create Pull Request (manual dispatch only)
|
|
121
|
+
if: steps.bump.outputs.bump != 'none'
|
|
122
|
+
run: |
|
|
123
|
+
# Create PR using GitHub CLI
|
|
124
|
+
gh pr create \
|
|
125
|
+
--base main \
|
|
126
|
+
--head "${{ steps.b2v.outputs.branch_name }}" \
|
|
127
|
+
--title "Version bump (${{ steps.bump.outputs.bump }}) → ${{ steps.b2v.outputs.new_version }}" \
|
|
128
|
+
--body "## Automated Version Bump
|
|
129
|
+
|
|
130
|
+
This PR bumps the version using the **${{ steps.bump.outputs.bump }}** strategy.
|
|
131
|
+
|
|
132
|
+
### Changes
|
|
133
|
+
- Version bumped via \`bump2version\`
|
|
134
|
+
- New version: ${{ steps.b2v.outputs.new_version }}
|
|
135
|
+
- Configuration file: \`.bumpversion.ini\`
|
|
136
|
+
|
|
137
|
+
### Type
|
|
138
|
+
- Bump type: \`${{ steps.bump.outputs.bump }}\`
|
|
139
|
+
"
|
|
140
|
+
|
|
141
|
+
# Set Labels
|
|
142
|
+
pr_url=$(gh pr view "${{ steps.b2v.outputs.branch_name }}" --json url -q .url)
|
|
143
|
+
gh pr edit "$pr_url" --add-label "automated" --add-label "bump-version"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Formatting + Linting
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
Formatting:
|
|
11
|
+
if: >
|
|
12
|
+
github.event_name != 'pull_request' ||
|
|
13
|
+
(
|
|
14
|
+
!contains(join(fromJSON(toJSON(github.event.pull_request.labels)).*.name), 'bump-version')
|
|
15
|
+
)
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- name: Formatting
|
|
22
|
+
uses: super-linter/super-linter@v7
|
|
23
|
+
env:
|
|
24
|
+
VALIDATE_ALL_CODEBASE: false
|
|
25
|
+
DEFAULT_BRANCH: main
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
+
VALIDATE_SNAKEMAKE_SNAKEFMT: true
|
|
28
|
+
VALIDATE_YAML_PRETTIER: true
|
|
29
|
+
|
|
30
|
+
Linting:
|
|
31
|
+
if: >
|
|
32
|
+
github.event_name != 'pull_request' ||
|
|
33
|
+
(
|
|
34
|
+
!contains(join(fromJSON(toJSON(github.event.pull_request.labels)).*.name), 'bump-version')
|
|
35
|
+
)
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
- name: Lint workflow
|
|
40
|
+
uses: snakemake/snakemake-github-action@v2
|
|
41
|
+
with:
|
|
42
|
+
directory: ./workflow
|
|
43
|
+
snakefile: workflow/Snakefile
|
|
44
|
+
args: "--lint"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_dispatch:
|
|
3
|
+
# push:
|
|
4
|
+
# branches:
|
|
5
|
+
# - main
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
name: release-please
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-please:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: googleapis/release-please-action@v4
|
|
18
|
+
with:
|
|
19
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
release-type: go # just keep a changelog, no version anywhere outside of git tags
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Upload release to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment:
|
|
13
|
+
name: pypi
|
|
14
|
+
url: https://pypi.org/p/dvpimg
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write
|
|
17
|
+
contents: read
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
with:
|
|
21
|
+
filter: blob:none
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.x"
|
|
26
|
+
cache: "pip"
|
|
27
|
+
cache-dependency-path: "**/pyproject.toml"
|
|
28
|
+
- run: pip install build
|
|
29
|
+
- run: python -m build
|
|
30
|
+
- name: Publish package distributions to PyPI
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
actions: read
|
|
5
|
+
contents: read
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main]
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
schedule:
|
|
14
|
+
- cron: "0 5 1,15 * *"
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
test:
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
23
|
+
defaults:
|
|
24
|
+
run:
|
|
25
|
+
shell: bash -e {0} # -e to fail on error
|
|
26
|
+
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
include:
|
|
31
|
+
- os: ubuntu-latest
|
|
32
|
+
python: "3.12"
|
|
33
|
+
|
|
34
|
+
name: Python ${{ matrix.python }}
|
|
35
|
+
|
|
36
|
+
env:
|
|
37
|
+
OS: ${{ matrix.os }}
|
|
38
|
+
PYTHON: ${{ matrix.python }}
|
|
39
|
+
MPLBACKEND: Agg # Non-interactive matplotlib backend
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
|
|
44
|
+
- name: Set up Python with uv
|
|
45
|
+
uses: astral-sh/setup-uv@v4
|
|
46
|
+
with:
|
|
47
|
+
version: "latest"
|
|
48
|
+
enable-cache: false
|
|
49
|
+
cache-dependency-glob: "**/pyproject.toml"
|
|
50
|
+
|
|
51
|
+
- name: Set up Python ${{ matrix.python }}
|
|
52
|
+
run: uv python install ${{ matrix.python }}
|
|
53
|
+
|
|
54
|
+
- name: Install development dependencies
|
|
55
|
+
run: |
|
|
56
|
+
uv venv
|
|
57
|
+
uv pip install -e ".[dev,test]"
|
|
58
|
+
|
|
59
|
+
- name: Run unit tests
|
|
60
|
+
run: |
|
|
61
|
+
uv run coverage run -m pytest -v --color=yes
|
|
62
|
+
uv run coverage report --ignore-errors
|
|
63
|
+
|
|
64
|
+
# - name: Run functional tests
|
|
65
|
+
# run: |
|
|
66
|
+
# hatch run dev:test-functional --tb=short -v
|
|
67
|
+
|
|
68
|
+
# - name: Validate pipeline consistency
|
|
69
|
+
# run: |
|
|
70
|
+
# hatch run workflow:dry-run
|
|
71
|
+
# continue-on-error: true
|
|
72
|
+
|
|
73
|
+
- name: Upload coverage
|
|
74
|
+
uses: codecov/codecov-action@v3
|
|
75
|
+
env:
|
|
76
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
results/**
|
|
2
|
+
resources/**
|
|
3
|
+
logs/**
|
|
4
|
+
.snakemake
|
|
5
|
+
.snakemake/**
|
|
6
|
+
.test/results/*
|
|
7
|
+
workflow/notebooks/.ipynb_checkpoints/**
|
|
8
|
+
**/.Rhistory
|
|
9
|
+
**/*.Rproj
|
|
10
|
+
**/.Rproj.user/**
|
|
11
|
+
**/.RData
|
|
12
|
+
**/Rplots.pdf
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Byte-compiled / optimized / DLL files
|
|
16
|
+
__pycache__/
|
|
17
|
+
*.py[cod]
|
|
18
|
+
*$py.class
|
|
19
|
+
|
|
20
|
+
# C extensions
|
|
21
|
+
*.so
|
|
22
|
+
|
|
23
|
+
# Distribution / packaging
|
|
24
|
+
.Python
|
|
25
|
+
build/
|
|
26
|
+
develop-eggs/
|
|
27
|
+
dist/
|
|
28
|
+
downloads/
|
|
29
|
+
eggs/
|
|
30
|
+
.eggs/
|
|
31
|
+
lib/
|
|
32
|
+
lib64/
|
|
33
|
+
parts/
|
|
34
|
+
sdist/
|
|
35
|
+
var/
|
|
36
|
+
wheels/
|
|
37
|
+
share/python-wheels/
|
|
38
|
+
*.egg-info/
|
|
39
|
+
.installed.cfg
|
|
40
|
+
*.egg
|
|
41
|
+
MANIFEST
|
|
42
|
+
|
|
43
|
+
# PyInstaller
|
|
44
|
+
# Usually these files are written by a python script from a template
|
|
45
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
46
|
+
*.manifest
|
|
47
|
+
*.spec
|
|
48
|
+
|
|
49
|
+
# Installer logs
|
|
50
|
+
pip-log.txt
|
|
51
|
+
pip-delete-this-directory.txt
|
|
52
|
+
|
|
53
|
+
# Unit test / coverage reports
|
|
54
|
+
htmlcov/
|
|
55
|
+
.tox/
|
|
56
|
+
.nox/
|
|
57
|
+
.coverage
|
|
58
|
+
.coverage.*
|
|
59
|
+
.cache
|
|
60
|
+
nosetests.xml
|
|
61
|
+
coverage.xml
|
|
62
|
+
*.cover
|
|
63
|
+
*.py,cover
|
|
64
|
+
.hypothesis/
|
|
65
|
+
.pytest_cache/
|
|
66
|
+
cover/
|
|
67
|
+
|
|
68
|
+
# Translations
|
|
69
|
+
*.mo
|
|
70
|
+
*.pot
|
|
71
|
+
|
|
72
|
+
# Django stuff:
|
|
73
|
+
*.log
|
|
74
|
+
local_settings.py
|
|
75
|
+
db.sqlite3
|
|
76
|
+
db.sqlite3-journal
|
|
77
|
+
|
|
78
|
+
# Flask stuff:
|
|
79
|
+
instance/
|
|
80
|
+
.webassets-cache
|
|
81
|
+
|
|
82
|
+
# Scrapy stuff:
|
|
83
|
+
.scrapy
|
|
84
|
+
|
|
85
|
+
# Sphinx documentation
|
|
86
|
+
docs/_build/
|
|
87
|
+
|
|
88
|
+
# PyBuilder
|
|
89
|
+
.pybuilder/
|
|
90
|
+
target/
|
|
91
|
+
|
|
92
|
+
# Jupyter Notebook
|
|
93
|
+
.ipynb_checkpoints
|
|
94
|
+
|
|
95
|
+
# IPython
|
|
96
|
+
profile_default/
|
|
97
|
+
ipython_config.py
|
|
98
|
+
|
|
99
|
+
# pyenv
|
|
100
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
101
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
102
|
+
# .python-version
|
|
103
|
+
|
|
104
|
+
# pipenv
|
|
105
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
106
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
107
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
108
|
+
# install all needed dependencies.
|
|
109
|
+
#Pipfile.lock
|
|
110
|
+
|
|
111
|
+
# UV
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
113
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
114
|
+
# commonly ignored for libraries.
|
|
115
|
+
#uv.lock
|
|
116
|
+
|
|
117
|
+
# poetry
|
|
118
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
119
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
120
|
+
# commonly ignored for libraries.
|
|
121
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
122
|
+
#poetry.lock
|
|
123
|
+
#poetry.toml
|
|
124
|
+
|
|
125
|
+
# pdm
|
|
126
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
127
|
+
#pdm.lock
|
|
128
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
129
|
+
# in version control.
|
|
130
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
131
|
+
.pdm.toml
|
|
132
|
+
.pdm-python
|
|
133
|
+
.pdm-build/
|
|
134
|
+
|
|
135
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
136
|
+
__pypackages__/
|
|
137
|
+
|
|
138
|
+
# Celery stuff
|
|
139
|
+
celerybeat-schedule
|
|
140
|
+
celerybeat.pid
|
|
141
|
+
|
|
142
|
+
# SageMath parsed files
|
|
143
|
+
*.sage.py
|
|
144
|
+
|
|
145
|
+
# Environments
|
|
146
|
+
.env
|
|
147
|
+
.venv
|
|
148
|
+
env/
|
|
149
|
+
venv/
|
|
150
|
+
ENV/
|
|
151
|
+
env.bak/
|
|
152
|
+
venv.bak/
|
|
153
|
+
|
|
154
|
+
# Spyder project settings
|
|
155
|
+
.spyderproject
|
|
156
|
+
.spyproject
|
|
157
|
+
|
|
158
|
+
# Rope project settings
|
|
159
|
+
.ropeproject
|
|
160
|
+
|
|
161
|
+
# mkdocs documentation
|
|
162
|
+
/site
|
|
163
|
+
|
|
164
|
+
# mypy
|
|
165
|
+
.mypy_cache/
|
|
166
|
+
.dmypy.json
|
|
167
|
+
dmypy.json
|
|
168
|
+
|
|
169
|
+
# Pyre type checker
|
|
170
|
+
.pyre/
|
|
171
|
+
|
|
172
|
+
# pytype static type analyzer
|
|
173
|
+
.pytype/
|
|
174
|
+
|
|
175
|
+
# Cython debug symbols
|
|
176
|
+
cython_debug/
|
|
177
|
+
|
|
178
|
+
# PyCharm
|
|
179
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
180
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
181
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
182
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
183
|
+
#.idea/
|
|
184
|
+
|
|
185
|
+
# Abstra
|
|
186
|
+
# Abstra is an AI-powered process automation framework.
|
|
187
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
188
|
+
# Learn more at https://abstra.io/docs
|
|
189
|
+
.abstra/
|
|
190
|
+
|
|
191
|
+
# Visual Studio Code
|
|
192
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
193
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
194
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
195
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
196
|
+
# .vscode/
|
|
197
|
+
|
|
198
|
+
# Ruff stuff:
|
|
199
|
+
.ruff_cache/
|
|
200
|
+
|
|
201
|
+
# PyPI configuration file
|
|
202
|
+
.pypirc
|
|
203
|
+
|
|
204
|
+
# Cursor
|
|
205
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
206
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
207
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
208
|
+
.cursorignore
|
|
209
|
+
.cursorindexingignore
|
|
210
|
+
|
|
211
|
+
# Claude
|
|
212
|
+
# Claude Code specific files and settings
|
|
213
|
+
.claude/**
|
|
214
|
+
|
|
215
|
+
# MacOS
|
|
216
|
+
.DS_Store
|
|
217
|
+
|
|
218
|
+
# Plots
|
|
219
|
+
*.png
|
|
220
|
+
*.jpeg
|
|
221
|
+
*.pdf
|
|
222
|
+
*.html
|
|
223
|
+
|
|
224
|
+
# Large files
|
|
225
|
+
*.zarr
|
|
226
|
+
*.hdf5
|
|
227
|
+
*.h5ad
|
|
228
|
+
|
|
229
|
+
# Logs
|
|
230
|
+
*.out
|
|
231
|
+
*.err
|
|
232
|
+
|
|
233
|
+
# Claude Code documentation
|
|
234
|
+
CLAUDE.md
|
|
235
|
+
REPOSITORY_REFERENCE.md
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
fail_fast: false
|
|
2
|
+
default_language_version:
|
|
3
|
+
python: python3
|
|
4
|
+
default_stages:
|
|
5
|
+
- pre-commit
|
|
6
|
+
- pre-push
|
|
7
|
+
minimum_pre_commit_version: 2.16.0
|
|
8
|
+
repos:
|
|
9
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
10
|
+
rev: v4.0.0-alpha.8
|
|
11
|
+
hooks:
|
|
12
|
+
- id: prettier
|
|
13
|
+
exclude: .bumpversion.ini
|
|
14
|
+
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
15
|
+
rev: v2.5.0
|
|
16
|
+
hooks:
|
|
17
|
+
- id: pyproject-fmt
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.8.3
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff
|
|
22
|
+
types_or: [python, pyi, jupyter]
|
|
23
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
24
|
+
- id: ruff-format
|
|
25
|
+
types_or: [python, pyi, jupyter]
|
|
26
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
27
|
+
rev: v5.0.0
|
|
28
|
+
hooks:
|
|
29
|
+
- id: detect-private-key
|
|
30
|
+
- id: check-ast
|
|
31
|
+
- id: end-of-file-fixer
|
|
32
|
+
- id: mixed-line-ending
|
|
33
|
+
args: [--fix=lf]
|
|
34
|
+
- id: trailing-whitespace
|
|
35
|
+
- id: check-case-conflict
|
|
36
|
+
# Check that there are no merge conflicts (could be generated by template sync)
|
|
37
|
+
- id: check-merge-conflict
|
|
38
|
+
args: [--assume-in-merge]
|
|
39
|
+
- repo: local
|
|
40
|
+
hooks:
|
|
41
|
+
- id: snakemake-lint
|
|
42
|
+
name: Lint with snakemake
|
|
43
|
+
language: system
|
|
44
|
+
entry: bash -c 'cd "$(git rev-parse --show-toplevel)/workflow" && snakemake --lint || echo "[Warning] snakemake --lint reported issues, but commit will proceed."'
|
|
45
|
+
|
|
46
|
+
- id: forbid-to-commit
|
|
47
|
+
name: Don't commit rej files
|
|
48
|
+
entry: |
|
|
49
|
+
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
|
|
50
|
+
Fix the merge conflicts manually and remove the .rej files.
|
|
51
|
+
language: fail
|
|
52
|
+
files: '.*\.rej$'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# configuration of display in snakemake workflow catalog: https://snakemake.github.io/snakemake-workflow-catalog
|
|
2
|
+
|
|
3
|
+
usage:
|
|
4
|
+
mandatory-flags:
|
|
5
|
+
desc: # describe your flags here in a few sentences
|
|
6
|
+
flags: # put your flags here
|
|
7
|
+
software-stack-deployment:
|
|
8
|
+
conda: true # whether pipeline works with '--sdm conda'
|
|
9
|
+
apptainer: true # whether pipeline works with '--sdm apptainer/singularity'
|
|
10
|
+
apptainer+conda: true # whether pipeline works with '--sdm conda apptainer/singularity'
|
|
11
|
+
report: true # whether creation of reports using 'snakemake --report report.zip' is supported
|