Skip to content

Commit 12b273e

Browse files
Backport PR #852 and #851 to 1.0.x (#853)
1 parent 2963adb commit 12b273e

File tree

678 files changed

+10195
-2653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

678 files changed

+10195
-2653
lines changed

.github/workflows/create-documentation-pr.yml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,8 @@ on:
1313
- '*'
1414

1515
jobs:
16-
list:
17-
runs-on: ubuntu-latest
18-
19-
outputs:
20-
component_matrix: ${{ steps.set_matrix.outputs.components }}
21-
workflow_matrix: ${{ steps.set_matrix.outputs.workflows }}
22-
steps:
23-
- uses: actions/checkout@v4
24-
25-
- uses: viash-io/viash-actions/setup@v5
26-
27-
- id: ns_list_components
28-
uses: viash-io/viash-actions/ns-list@v5
29-
with:
30-
platform: docker
31-
format: json
32-
query_namespace: ^(?!workflows)
33-
34-
- id: ns_list_workflows
35-
uses: viash-io/viash-actions/ns-list@v5
36-
with:
37-
format: json
38-
query_namespace: ^workflows
39-
40-
- id: set_matrix
41-
run: |
42-
echo "components=$(jq -c '[ .[] |
43-
{
44-
"name": .functionality.name,
45-
"namespace_separator": .platforms | map(select(.type == "docker"))[0].namespace_separator,
46-
"namespace": .functionality.namespace,
47-
"config": .info.config,
48-
"dir": .info.config | capture("^(?<dir>.*\/)").dir
49-
}
50-
]' ${{ steps.ns_list_components.outputs.output_file }} )" >> $GITHUB_OUTPUT
51-
52-
echo "workflows=$(jq -c '[ .[] |
53-
{
54-
"name": $config.functionality.name,
55-
"namespace": $config.functionality.namespace,
56-
"main_script": ((.info.config | capture("^(?<dir>.*\/)").dir) + "/" + (.functionality.test_resources | map(select(.type == "nextflow_script")) | unique | .[].path )),
57-
"config": .info.config,
58-
"entry": .functionality.test_resources | map(select(.type == "nextflow_script")) | .[].entrypoint
59-
}
60-
]' ${{ steps.ns_list_workflows.outputs.output_file }} )" >> $GITHUB_OUTPUT
61-
6216
push_documentation:
6317
runs-on: ubuntu-latest
64-
needs: [ list ]
6518

6619
steps:
6720
- uses: actions/checkout@v4
@@ -74,7 +27,7 @@ jobs:
7427
path: website
7528
token: ${{ secrets.GTHB_PAT }}
7629

77-
- uses: viash-io/viash-actions/setup@v5
30+
- uses: viash-io/viash-actions/setup@v6
7831

7932
- name: Get tag to use
8033
id: get_tag
@@ -83,15 +36,30 @@ jobs:
8336
TAG_OR_BRANCH_NAME=${INPUT_TAG:-"${{ github.ref_name }}"}
8437
echo "tag=$TAG_OR_BRANCH_NAME" >> $GITHUB_OUTPUT
8538
86-
- uses: viash-io/viash-actions/pro/generate-documentation-qmd@v5
39+
- uses: viash-io/viash-actions/pro/generate-documentation-qmd@v6
40+
with:
41+
project_directory: openpipelines
42+
src: src
43+
query: '^(?!workflows|test_workflows)'
44+
output_dir: ../website/components/modules/
45+
dest_path: "{namespace}/{name}.qmd"
46+
viash_pro_token: ${{ secrets.GTHB_PAT }}
47+
tools_version: main_build
48+
ref: "${{ steps.get_tag.outputs.tag }}"
49+
clean: true
50+
51+
52+
- uses: viash-io/viash-actions/pro/generate-documentation-qmd@v6
8753
with:
8854
project_directory: openpipelines
89-
src: ./
55+
src: src
56+
query: '^workflows'
9057
output_dir: ../website/components/
91-
dest_path: "{type}s/{namespace}/{name}.qmd"
58+
dest_path: "{namespace}/{name}.qmd"
9259
viash_pro_token: ${{ secrets.GTHB_PAT }}
9360
tools_version: main_build
9461
ref: "${{ steps.get_tag.outputs.tag }}"
62+
clean: true
9563

9664
- name: Create Pull Request
9765
env:

.github/workflows/integration-test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
cache_key: ${{ steps.cache.outputs.cache_key }}
3636

3737
steps:
38-
- uses: viash-io/viash-actions/project/sync-and-cache-s3@v5
38+
- uses: viash-io/viash-actions/project/sync-and-cache-s3@v6
3939
id: cache
4040
with:
4141
s3_bucket: $s3_bucket
@@ -65,7 +65,7 @@ jobs:
6565
with:
6666
ref: 'integration_build'
6767

68-
- uses: viash-io/viash-actions/setup@v5
68+
- uses: viash-io/viash-actions/setup@v6
6969

7070
- uses: nf-core/[email protected]
7171

@@ -100,6 +100,17 @@ jobs:
100100
find ./resources_test/ "${to_not_remove[@]}" -type f -exec rm {} +
101101
tree ./resources_test/
102102
103+
- name: Build test dependencies
104+
uses: viash-io/viash-actions/ns-build@v6
105+
with:
106+
config_mod: |
107+
.functionality.version := 'integration_build'
108+
.platforms[.type == 'docker'].target_tag := 'integration_build'
109+
platform: 'docker|nextflow'
110+
src: ${{ matrix.component.dir }}
111+
query: "^test_workflows"
112+
setup: build
113+
103114
- name: Run integration test
104115
timeout-minutes: 60
105116
run: |

.github/workflows/main-build.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,41 +131,39 @@ jobs:
131131
git fetch origin ${{github.ref_name}}
132132
git checkout -f --no-overlay origin/${{github.ref_name}} -- '.'
133133
134-
- uses: viash-io/viash-actions/setup@v5
134+
- uses: viash-io/viash-actions/setup@v6
135135

136136
- name: Remove target folder from .gitignore
137137
run: |
138138
# allow publishing the target folder
139139
sed -i '/^\/target\/$/d' .gitignore
140140
141-
- uses: viash-io/viash-actions/ns-build@v5
141+
- uses: viash-io/viash-actions/ns-build@v6
142142
with:
143143
config_mod: |
144144
.functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
145145
.platforms[.type == 'docker'].target_tag := '${{ github.event_name == 'push' && (inputs.version || format('{0}_build', github.ref_name)) || inputs.target_tag }}'
146146
parallel: true
147-
query: ^(?!workflows)
147+
query: ^(?!workflows|test_workflows)
148148

149-
- uses: viash-io/viash-actions/ns-build@v5
149+
- uses: viash-io/viash-actions/ns-build@v6
150150
with:
151151
config_mod: .functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
152152
parallel: true
153153
query: ^workflows
154154

155155
- name: Build nextflow schemas
156-
uses: viash-io/viash-actions/pro/build-nextflow-schemas@v5
156+
uses: viash-io/viash-actions/pro/build-nextflow-schemas@v6
157157
with:
158-
components: src
159-
workflows: src
158+
target_dir: target/nextflow
160159
viash_pro_token: ${{ secrets.GTHB_PAT }}
161160
tools_version: 'main_build'
162161
enable_dataset_input: true
163162

164163
- name: Build parameter files
165-
uses: viash-io/viash-actions/pro/build-nextflow-params@v5
164+
uses: viash-io/viash-actions/pro/build-nextflow-params@v6
166165
with:
167-
workflows: src
168-
components: src
166+
target_dir: target/nextflow
169167
viash_pro_token: ${{ secrets.GTHB_PAT }}
170168
tools_version: 'main_build'
171169

@@ -178,16 +176,16 @@ jobs:
178176
branch: ${{ !inputs.deploy_branch && format('{0}_build', github.ref_name) || inputs.deploy_branch }}
179177
- name: "List components"
180178
id: ns_list
181-
uses: viash-io/viash-actions/ns-list@v5
179+
uses: viash-io/viash-actions/ns-list@v6
182180
with:
183181
platform: docker
184182
src: src
185183
format: json
186-
query_namespace: ^(?!workflows)
184+
query_namespace: ^(?!workflows|test_workflows)
187185

188186
- name: "List workflows"
189187
id: ns_list_workflows
190-
uses: viash-io/viash-actions/ns-list@v5
188+
uses: viash-io/viash-actions/ns-list@v6
191189
with:
192190
src: src
193191
format: json
@@ -235,10 +233,10 @@ jobs:
235233

236234
- uses: actions/checkout@v4
237235

238-
- uses: viash-io/viash-actions/setup@v5
236+
- uses: viash-io/viash-actions/setup@v6
239237

240238
- name: Build container
241-
uses: viash-io/viash-actions/ns-build@v5
239+
uses: viash-io/viash-actions/ns-build@v6
242240
with:
243241
config_mod: |
244242
.functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
@@ -255,7 +253,7 @@ jobs:
255253
password: ${{ secrets.GTHB_PAT }}
256254

257255
- name: Push container
258-
uses: viash-io/viash-actions/ns-build@v5
256+
uses: viash-io/viash-actions/ns-build@v6
259257
with:
260258
config_mod: .functionality.version := "${{ inputs.version || format('{0}_build', github.ref_name) }}"
261259
platform: docker

.github/workflows/release-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
cache_key: ${{ steps.cache.outputs.cache_key }}
2929

3030
steps:
31-
- uses: viash-io/viash-actions/project/sync-and-cache-s3@v5
31+
- uses: viash-io/viash-actions/project/sync-and-cache-s3@v6
3232
id: cache
3333
with:
3434
s3_bucket: $s3_bucket
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
ref: 'integration_build'
6060

61-
- uses: viash-io/viash-actions/setup@v5
61+
- uses: viash-io/viash-actions/setup@v6
6262

6363
- uses: nf-core/[email protected]
6464

@@ -123,7 +123,7 @@ jobs:
123123

124124
- uses: actions/checkout@v4
125125

126-
- uses: viash-io/viash-actions/setup@v5
126+
- uses: viash-io/viash-actions/setup@v6
127127

128128
# use cache
129129
- name: Cache resources data

.github/workflows/viash-test.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,32 @@ jobs:
4141
with:
4242
fetch-depth: 0
4343

44-
- uses: viash-io/viash-actions/setup@v5
44+
# Remove unnecessary files to free up space. Otherwise, we get 'no space left on device.'
45+
- uses: data-intuitive/reclaim-the-bytes@v2
46+
47+
- uses: viash-io/viash-actions/setup@v6
4548

4649
- name: Check if all config can be parsed if there is no unicode support
4750
run: |
4851
LANG=C viash ns list > /dev/null
52+
JAVA_TOOL_OPTIONS=-Dfile.encoding=ascii viash ns build --parallel --setup meh > /dev/null
4953
50-
- uses: viash-io/viash-actions/project/sync-and-cache-s3@v5
54+
- uses: viash-io/viash-actions/project/sync-and-cache-s3@v6
5155
id: cache
5256
with:
5357
s3_bucket: $s3_bucket
5458
dest_path: resources_test
5559
cache_key_prefix: resources_test__
5660

5761
- id: ns_list
58-
uses: viash-io/viash-actions/ns-list@v5
62+
uses: viash-io/viash-actions/ns-list@v6
5963
with:
6064
platform: docker
6165
format: json
62-
query_namespace: ^(?!workflows)
66+
query_namespace: ^(?!workflows|test_workflows)
6367

6468
- id: ns_list_filtered
65-
uses: viash-io/viash-actions/project/detect-changed-components@v5
69+
uses: viash-io/viash-actions/project/detect-changed-components@v6
6670
with:
6771
input_file: "${{ steps.ns_list.outputs.output_file }}"
6872

@@ -95,7 +99,7 @@ jobs:
9599

96100
- uses: actions/checkout@v4
97101

98-
- uses: viash-io/viash-actions/setup@v5
102+
- uses: viash-io/viash-actions/setup@v6
99103

100104
# use cache
101105
- name: Cache resources data
@@ -163,10 +167,10 @@ jobs:
163167
password: ${{ env.NVIDIA_PASSWORD }}
164168

165169
- name: Run test
166-
timeout-minutes: 30
170+
timeout-minutes: 40
167171
run: |
168172
viash test \
169173
"${{ matrix.component.config }}" \
170174
--cpus 4 \
171-
--memory "12gb"
175+
--memory "14gb"
172176

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# openpipelines 1.0.3
2+
3+
## BUG FIXES
4+
5+
* `qc/calculate_qc_metrics`: increase total counts accuracy with low precision floating dtypes as input layer (PR # , backported from PR #852).
6+
17
# openpipelines 1.0.2
28

39
## BUG FIXES

resources_test_scripts/pbmc_1k_protein_v3.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ target/docker/convert/from_10xh5_to_h5mu/from_10xh5_to_h5mu \
4545
--input "${OUT}_filtered_feature_bc_matrix.h5" \
4646
--input_metrics_summary "${OUT}_metrics_summary.csv" \
4747
--output "${OUT}_filtered_feature_bc_matrix.h5mu"
48-
49-
target/docker/convert/from_10xh5_to_h5mu/from_10xh5_to_h5mu \
50-
--input "${OUT}_raw_feature_bc_matrix.h5" \
51-
--input_metrics_summary "${OUT}_metrics_summary.csv" \
52-
--output "${OUT}_raw_feature_bc_matrix.h5mu"
5348

5449
# run single sample
5550
NXF_VER=21.10.6 nextflow \

src/correction/cellbender_remove_background/config.vsh.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ functionality:
274274
- type: python_script
275275
path: test.py
276276
# normally cellbender should only be run on unfiltered data, but for the purposes of the unit test the filtered data will do.
277-
- path: /resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu
277+
- path: /resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu
278278
platforms:
279279
- type: docker
280280
image: nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04
@@ -296,6 +296,7 @@ platforms:
296296
packages:
297297
# Use this version of mudata because it is the last one that supports python 3.7
298298
- mudata~=0.2.1
299+
- lxml[html_clean]
299300
- cellbender~=0.3.0
300301
- type: nextflow
301302
directives:

src/correction/cellbender_remove_background/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from scipy.sparse import csr_matrix
88
from cellbender.remove_background.downstream import anndata_from_h5
99
## VIASH START
10-
file_input = "./resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu"
10+
file_input = "./resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"
1111

1212
par = {
1313
# inputs

src/correction/cellbender_remove_background/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
## VIASH END
1111

12-
file_input = meta["resources_dir"] + "/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu"
12+
file_input = meta["resources_dir"] + "/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"
1313
file_output = "output.h5mu"
1414

1515
print("> Check whether cellbender works when it should be working")

0 commit comments

Comments
 (0)