Skip to content

Commit

Permalink
add r cmd pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
vapolonio committed May 16, 2024
1 parent b47c333 commit 371fc3f
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 3 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
^doc$
^Meta$
^\.github$
.lintr
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main]
pull_request:
branches: [main]

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ renv
.DS_Store
doc
.Rproj.user
PathwaySpace.Rcheck
..Rcheck
*.tar.gz
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### PathwaySpace: Spatial projection of network signals along geodesic paths

<!-- badges: start -->
[![R-CMD-check](https://github.com/sysbiolab/PathwaySpace/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/sysbiolab/PathwaySpace/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
*PathwaySpace* is an R package that creates landscape images from graphs containing vertices (nodes), edges (lines), and a signal associated with the vertices. The package processes the signal using a convolution algorithm that considers the graph's topology to project the signal on a 2D space.

*PathwaySpace* could have various applications, such as visualizing network data in a graphical format that highlights the relationships and signal strengths between vertices.
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-plotImageSpace.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ test_that("Execution test of circularProjection", {
pspace_toy <- buildPathwaySpace(toy_graph, mar = 0.2, verbose = FALSE)
pspace_projection <- circularProjection(pspace_toy, knn = 1, pdist = 0.4, verbose = FALSE)
# pspace_plot <- plotImageSpace(pspace_projection, marks = TRUE, verbose = FALSE)

plotImageSpace(pspace_projection, marks = c("n3","n4"), theme = "th2")
# print(class(pspace_plot))

expect_equal(class(pspace_projection@gxyz), c("matrix", "array"))
})

0 comments on commit 371fc3f

Please sign in to comment.