Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Change branches in ci config #2

Merged
merged 5 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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, master]
pull_request:
branches: [main, master]

name: R-CMD-check

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@v3

- 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
82 changes: 0 additions & 82 deletions .github/workflows/check-standard.yaml

This file was deleted.

84 changes: 42 additions & 42 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
on:
push:
branches:
- dev
push:
branches:
- master

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

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

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

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

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Suggests:
testthat,
knitr,
rmarkdown
RoxygenNote: 7.1.0
RoxygenNote: 7.2.3
Imports:
magrittr,
dplyr,
Expand Down
4 changes: 3 additions & 1 deletion R/utils-pipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
#' @noRd
#' @param lhs A value or the magrittr placeholder.
#' @param rhs A function call using the magrittr semantics.
#' @return The result of calling `rhs(lhs)`.
NULL
7 changes: 0 additions & 7 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#' @param quotes A logical to indicate whether or not to encase in quotes
#'
#' @return A SPARQL-compatible string of the values
#' @examples
#' .collapse_as_values(c("GO:0006936", "GO:0008152"))
.collapse_as_values <- function(item_vector, quotes = FALSE) {
unique_items <- stringr::str_trim(unique(item_vector))

Expand All @@ -21,8 +19,6 @@
#' @param column The column of the dataframe to substitute
#'
#' @return A character vector
#' @examples
#' .remove_wdt_url("http://www.wikidata.org/entity/Q18031649")
.remove_wdt_url <- function(column) {
stringr::str_replace_all(
column, "http://www.wikidata.org/entity/",
Expand All @@ -35,9 +31,6 @@
#' @param species_name The scientific name of the species
#'
#' @return The Wikidata item for said species
#'
#' @examples
#' .get_species_item("Homo sapiens")
.get_species_item <- function(species_name) {
values <- c("Q15978631", "Q83310")
names(values) <- c("Homo sapiens", "Mus musculus")
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ devtools::load_all()


<!-- badges: start -->
[![R build status](https://github.com/jvfe/go2cell/workflows/R-CMD-check/badge.svg)](https://github.com/jvfe/go2cell/actions)
[![docs](https://github.com/jvfe/go2cell/workflows/pkgdown/badge.svg)](https://jvfe.github.io/go2cell/index.html)
[![R-CMD-check](https://github.com/jvfe/go2cell/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jvfe/go2cell/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

By using [Wikidata](https://www.wikidata.org/wiki/Wikidata:Main_Page), go2cell links Gene Ontology terms to cell types, therefore enriching Omics results with open semantic knowledge.
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

<!-- badges: start -->

[![R build
status](https://github.com/jvfe/go2cell/workflows/R-CMD-check/badge.svg)](https://github.com/jvfe/go2cell/actions)
[![docs](https://github.com/jvfe/go2cell/workflows/pkgdown/badge.svg)](https://jvfe.github.io/go2cell/index.html)
[![R-CMD-check](https://github.com/jvfe/go2cell/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jvfe/go2cell/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

By using [Wikidata](https://www.wikidata.org/wiki/Wikidata:Main_Page),
Expand Down Expand Up @@ -36,11 +35,11 @@ go_ids <- c("GO:0006936", "GO:0009100")
results <- go2cell(go_ids)
```

| cell\_type | cell\_typeLabel | go\_ids | go\_termLabel | geneLabel |
| :------------ | :------------------ | :----------- | :----------------- | :-------- |
| wd:Q101404903 | human myocyte | <GO:0006936> | muscle contraction | ANKRD2 |
| wd:Q101404861 | human fibroblast | <GO:0006936> | muscle contraction | TBX20 |
| wd:Q101405077 | human cardiomyocyte | <GO:0006936> | muscle contraction | TBX20 |
| wd:Q101405077 | human cardiomyocyte | <GO:0006936> | muscle contraction | CKMT2 |
| wd:Q101405077 | human cardiomyocyte | <GO:0006936> | muscle contraction | MYBPC3 |
| wd:Q101404903 | human myocyte | <GO:0006936> | muscle contraction | MYH1 |
| cell_type | cell_typeLabel | go_ids | go_termLabel | geneLabel |
|:--------------|:----------------------------|:-------------|:-------------------|:----------|
| wd:Q101404903 | human myocyte | <GO:0006936> | muscle contraction | ACTN2 |
| wd:Q101405077 | human cardiomyocyte | <GO:0006936> | muscle contraction | ACTN2 |
| wd:Q101404861 | human fibroblast | <GO:0006936> | muscle contraction | TBX20 |
| wd:Q101405077 | human cardiomyocyte | <GO:0006936> | muscle contraction | TBX20 |
| wd:Q68620817 | human hepatic stellate cell | <GO:0006936> | muscle contraction | DES |
| wd:Q101404901 | human smooth muscle cell | <GO:0006936> | muscle contraction | DES |
3 changes: 0 additions & 3 deletions man/dot-collapse_as_values.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/dot-get_species_item.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/dot-remove_wdt_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/pipe.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.