Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/jiajic/GiottoClass
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Sep 6, 2023
2 parents fa82659 + 4ca961b commit 051a384
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 42 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/dev_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
R-CMD-check:
name: R CMD Check
env:
GITHUB_PAT: ${{ secrets.WORKFLOW_PAT }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -107,6 +107,7 @@ jobs:
)
shell: Rscript {0}

# add code cov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down Expand Up @@ -139,7 +140,7 @@ jobs:
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
LINTR_ERROR_ON_LINT: false



52 changes: 26 additions & 26 deletions .github/workflows/prod_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
jobs:
R-CMD-check:
env:
GITHUB_PAT: ${{ secrets.WORKFLOW_PAT }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
Expand Down Expand Up @@ -159,31 +159,31 @@ jobs:
# LINTR_ERROR_ON_LINT: true


render-rmarkdown:
name: Update README.Rmd
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-renv@v2

- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'

- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit results
run: |
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"
# render-rmarkdown:
# name: Update README.Rmd
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repo
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - uses: r-lib/actions/setup-pandoc@v2
#
# - uses: r-lib/actions/setup-r@v2
#
# - uses: r-lib/actions/setup-renv@v2
#
# - name: Install rmarkdown
# run: Rscript -e 'install.packages("rmarkdown")'
#
# - name: Render README
# run: Rscript -e 'rmarkdown::render("README.Rmd")'
#
# - name: Commit results
# run: |
# git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
# git push origin || echo "No changes to commit"



31 changes: 17 additions & 14 deletions tests/testthat/test-GiottoInstructions.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@ options('giotto.use_conda' = FALSE)
# silence deprecated internals
rlang::local_options(lifecycle_verbosity = "quiet")

instrs = createGiottoInstructions(
show_plot = TRUE,
return_plot = NULL,
save_plot = FALSE,
save_dir = NULL,
plot_format = "png",
dpi = 300,
units = NULL,
height = NULL,
width = NULL,
is_docker = FALSE,
plot_count = 0,
fiji_path = NULL)
suppressWarnings({
instrs = createGiottoInstructions(
show_plot = TRUE,
return_plot = NULL,
save_plot = FALSE,
save_dir = NULL,
plot_format = "png",
dpi = 300,
units = NULL,
height = NULL,
width = NULL,
is_docker = FALSE,
plot_count = 0,
fiji_path = NULL)
})


expression_matrix = matrix(1:100, nrow = 10)
colnames(expression_matrix) = paste0("cell",1:10)
Expand All @@ -37,7 +40,7 @@ test_that("Instructions are created", {

# readGiottoInstructions
test_that("readGiottoInstructions reads a few giotto object params correctly", {

expect_type(readGiottoInstructions(gobject, param = "show_plot"), "logical")
expect_type(readGiottoInstructions(gobject, param = "plot_format"), "character")
expect_type(readGiottoInstructions(gobject, param = "dpi"), "double")
Expand Down

0 comments on commit 051a384

Please sign in to comment.