Skip to content

Commit 116bbd3

Browse files
authored
Merge pull request #195 from omnideconv/fix-conda-ci
Switch to rattler-build for testing conda recipe
2 parents 6f6f66e + 472b027 commit 116bbd3

6 files changed

Lines changed: 62 additions & 39 deletions

File tree

.conda/meta.yaml renamed to .conda/recipe.yaml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
1-
{% set name = "r-immunedeconv" %}
2-
31
package:
4-
name: {{ name }}
2+
name: immunedeconv
53
version: "develop"
64

75
source:
86
path: ".."
97

108
build:
11-
script: $R CMD INSTALL --build .
9+
script: R CMD INSTALL --build .
1210
number: 0
1311
noarch: generic
14-
rpaths:
15-
- lib/R/lib/
16-
- lib/
1712

1813
requirements:
1914
host:
2015
- r-base >=4.1
2116
- r-dplyr >=0.7
2217
- r-magrittr >=1.5
23-
- r-readr >=1.1
18+
- r-readr >=1.4
2419
- r-readxl >=1.0
2520
- r-testit >=0.7
2621
- r-tibble >=1.4.2
@@ -43,7 +38,7 @@ requirements:
4338
- r-base >=4.1
4439
- r-dplyr >=0.7
4540
- r-magrittr >=1.5
46-
- r-readr >=1.1
41+
- r-readr >=1.4
4742
- r-readxl >=1.0
4843
- r-testit >=0.7
4944
- r-tibble >=1.4.2
@@ -63,19 +58,19 @@ requirements:
6358
- r-consensustme
6459
- r-mmcpcounter
6560

66-
test:
67-
commands:
68-
- '$R -e "library(''immunedeconv'')"'
61+
tests:
62+
- r:
63+
libraries:
64+
- immunedeconv
6965

7066
about:
71-
home: https://github.com/omnideconv/immunedeconv
72-
license: BSD_3_clause
67+
repository: https://github.com/omnideconv/immunedeconv
68+
homepage: https://omnideconv.org/immunedeconv/
69+
license: GPL-2.0-only
7370
summary: "collection of methods for immune cell deconvolution of bulk RNA-seq samples."
74-
license_family: BSD
7571
license_file: LICENSE
72+
description: Collection of methods for immune cell deconvolution of bulk RNA-seq samples.
7673

7774
extra:
78-
recipe-maintainers:
79-
- grst
8075
identifiers:
8176
- doi:10.1101/463828

.github/workflows/conda.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,37 @@ on:
1010
pull_request:
1111
branches: [master]
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
tests:
1519
runs-on: ${{ matrix.os }}
20+
defaults:
21+
run:
22+
shell: bash -el {0} # -l for login shell (conda), -e to fail on error
1623
name: conda ${{ matrix.os }}
1724
strategy:
1825
fail-fast: false
1926
matrix:
20-
os: ["ubuntu-latest", "macos-latest"]
27+
os: ["ubuntu-latest"]
2128

2229
steps:
23-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v4
2431

25-
- name: Setup Minoconda
26-
uses: conda-incubator/setup-miniconda@v2
32+
- name: Setup Miniconda
33+
uses: conda-incubator/setup-miniconda@v3
2734
with:
28-
auto-update-conda: true
29-
miniforge-version: latest
30-
use-mamba: true
35+
mamba-version: "*"
3136
channels: conda-forge,bioconda
32-
channel-priority: true
33-
python-version: 3.9
37+
channel-priority: strict
38+
python-version: ${{ matrix.python }}
3439

35-
- name: Set-up channels and install conda build
40+
- name: install rattler-build
3641
run: |
37-
mamba install -y conda-build conda-verify
38-
shell: bash
42+
mamba install -y rattler-build
3943
4044
- name: build and test package
4145
run: |
42-
set -euxo pipefail
43-
test -f .conda/meta.yaml
44-
conda build .conda --no-anaconda-upload
45-
shell: bash
46+
cd .conda && rattler-build build -c conda-forge -c bioconda

.github/workflows/test.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,33 @@ jobs:
5252
cd preprocessCore
5353
R CMD INSTALL --configure-args="--disable-threading" .
5454
55-
- uses: r-lib/actions/check-r-package@v2
55+
# Simpler version – re-enable once the "stack imbalance" dependency bug is fixed:
56+
# - uses: r-lib/actions/check-r-package@v2
57+
# with:
58+
# upload-snapshots: true
59+
60+
- name: R CMD check
61+
run: |
62+
results <- rcmdcheck::rcmdcheck(
63+
args = c("--no-manual"),
64+
build_args = c("--no-manual"),
65+
error_on = "never",
66+
check_dir = "check"
67+
)
68+
# Filter out known dependency bug (stack imbalance in '::' / '<-')
69+
real_warnings <- Filter(
70+
function(w) !grepl("stack imbalance", w),
71+
results$warnings
72+
)
73+
if (length(results$errors) > 0 || length(real_warnings) > 0) {
74+
print(results)
75+
stop("R CMD check found errors or warnings.")
76+
}
77+
shell: Rscript {0}
78+
79+
- name: Upload check results
80+
if: failure()
81+
uses: actions/upload-artifact@main
5682
with:
57-
upload-snapshots: true
83+
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
84+
path: check

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Imports:
1414
purrr (>= 1.0.2),
1515
dplyr (>= 0.7),
1616
magrittr (>= 1.5),
17-
readr (>= 1.1),
17+
readr (>= 1.4),
1818
readxl (>= 1.0),
1919
testit (>= 0.7),
2020
tibble (>= 1.4.2),

R/custom_deconvolution_methods.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ deconvolute_cibersort_custom <- function(gene_expression_matrix, signature_matri
6464

6565
temp.expression.file <- tempfile()
6666
temp.signature.file <- tempfile()
67-
write_tsv(as_tibble(gene_expression_matrix, rownames = "gene_symbol"), path = temp.expression.file)
68-
write_tsv(as_tibble(signature_matrix, rownames = "gene_symbol"), path = temp.signature.file)
67+
write_tsv(as_tibble(gene_expression_matrix, rownames = "gene_symbol"), file = temp.expression.file)
68+
write_tsv(as_tibble(signature_matrix, rownames = "gene_symbol"), file = temp.signature.file)
6969

7070

7171
arguments <- dots_list(temp.signature.file, temp.expression.file,

R/mouse_deconvolution_methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ deconvolute_seqimmucc <- function(gene_expression_matrix,
9595

9696
temp.expression.file <- tempfile()
9797

98-
write_tsv(as_tibble(gene_expression_matrix, rownames = "gene_symbol"), path = temp.expression.file)
98+
write_tsv(as_tibble(gene_expression_matrix, rownames = "gene_symbol"), file = temp.expression.file)
9999
perm <- 100
100100
# results = CIBERSORT(signature.path, temp.expression.file, perm, QN=FALSE, ...)
101101
# results = results %>%

0 commit comments

Comments
 (0)