Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
streamline and upgrade muggle closes #260
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheld83 committed Feb 10, 2021
1 parent d2843d7 commit b5f3077
Show file tree
Hide file tree
Showing 19 changed files with 69 additions and 242 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Dockerfile
.dockerignore
^\.github$
^\.deps$
.rstudio
hoad.code-workspace
^R/.add_emails\.R$
Expand All @@ -17,3 +16,5 @@ hoad.code-workspace
^R/.scoap\.R$
^R/.unpaywall_integration\.R$
.vscode
.azure
^\.Rproj\.user$
25 changes: 0 additions & 25 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

106 changes: 0 additions & 106 deletions .github/CONTRIBUTING.md

This file was deleted.

44 changes: 26 additions & 18 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ jobs:
run:
shell: Rscript {0}
container:
# this needs to be the same as in Dockerfile
image: subugoe/muggle-onbuild:f60004c31979947dab53fbf9cfbb0e7f1c4bea55
# update muggle here and in Dockerfile
image: subugoe/muggle-buildtime-onbuild:0.1.1-20210126
env:
MUGGLE_PKG_NAME: ${{ github.event.repository.name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Cache R Packages
Expand All @@ -26,18 +29,17 @@ jobs:
R_LIBS_SITE: $R_LIBS_APP_GH
run: remotes::install_deps(dependencies = TRUE)
- name: Check
run: muggle::rcmdcheck2()
# TODO error out on all but note again https://github.com/subugoe/hoad/issues/194
run: devtools::check(error_on = "error")
- name: Test Coverage
run: covr::codecov()
- name: Build Package Website
run: |
# extra step is necessary to build index.md to integrate readme and landing page
rmarkdown::render("pkgdown/index.Rmd")
pkgdown::build_site(override = list(new_process = FALSE))
- uses: docker/build-push-action@v1
name: Build Dev Image
run: muggle::build_site2(new_process = FALSE)
- name: Build Buildtime Image
uses: docker/build-push-action@v1
with:
repository: ${{ github.repository }}/hoad-dev
repository: ${{ github.repository }}/${{ env.MUGGLE_PKG_NAME }}-buildtime
target: buildtime
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
Expand All @@ -48,14 +50,21 @@ jobs:
tags: ${{ github.sha }}
add_git_labels: true
push: ${{ github.event_name != 'pull_request' }}
- name: Setup GCP Cloud SDK
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
- name: Build Runtime Image
uses: docker/build-push-action@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- run: gcloud info
shell: bash
repository: ${{ github.repository }}/${{ env.MUGGLE_PKG_NAME }}-runtime
target: runtime
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
# this will set "latest" if master as per https://github.com/docker/build-push-action
tag_with_ref: true
# we're relying on long shas only to keep things easy
tag_with_sha: false
tags: ${{ github.sha }}
add_git_labels: true
push: ${{ github.event_name != 'pull_request' }}
- name: Deploy Shiny Application to shinyapps.io ref
env:
SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }}
Expand All @@ -73,4 +82,3 @@ jobs:
uses: maxheld83/ghpages@github-token
env:
BUILD_DIR: docs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
.Rhistory
.RData
.Ruserdata
*.DS_Store
docs/
.rstudio/
13 changes: 7 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: hoad
Title: Hybrid Open Access Dashboard
Version: 1.0.0
Version: 1.0.1.9000
Authors@R:
c(
person(
Expand Down Expand Up @@ -41,7 +41,8 @@ Authors@R:
role = c("dtc")
)
)
Description: Analytics to increase cost transparency in business model transformation towards open access publishing.
Description:
Analytics to increase cost transparency in business model transformation towards open access publishing.
License: AGPL-3
Encoding: UTF-8
Language: en
Expand All @@ -62,7 +63,6 @@ Suggests:
DT,
writexl,
echarts4r,
metar,
DBI,
dbplyr,
haven,
Expand All @@ -75,10 +75,11 @@ Suggests:
httr,
purrr,
covr,
testthat
testthat,
subugoetheme
URL: https://subugoe.github.io/hoad, https://github.com/subugoe/hoad/
BugReports: https://github.com/subugoe/hoad/issues
RoxygenNote: 7.1.1
RoxygenNote: 7.1.1.9999
Imports:
dplyr,
checkmate,
Expand All @@ -88,4 +89,4 @@ Imports:
ggplot2,
rlang
Remotes:
subugoe/metar@7ccc2a0
subugoe/[email protected]
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM subugoe/muggle-onbuild:f60004c31979947dab53fbf9cfbb0e7f1c4bea55
FROM subugoe/muggle-buildtime-onbuild:0.1.1-20210126
5 changes: 0 additions & 5 deletions NEWS.md

This file was deleted.

2 changes: 1 addition & 1 deletion R/plots.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' Color palettes
#' Colors used in the hybrid open access dashboard, based on [metar::ugoe_pal()]
#' Colors used in the hybrid open access dashboard, based on [subugoetheme::ugoe_pal()]
#' @family visualisation functions
#' @name colors
NULL
Expand Down
36 changes: 15 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
# hoad

<!-- badges: start -->
[![Main](https://github.com/subugoe/hoad/workflows/.github/workflows/main.yaml/badge.svg)](https://github.com/subugoe/hoad/actions)
[![Codecov test coverage](https://codecov.io/gh/subugoe/hoad/branch/master/graph/badge.svg)](https://codecov.io/gh/subugoe/hoad?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/hoad)](https://CRAN.R-project.org/package=hoad)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![Codecov test coverage](https://codecov.io/gh/subugoe/hoad/branch/master/graph/badge.svg)](https://codecov.io/gh/subugoe/hoad?branch=master)
<!-- badges: end -->

<div class="jumbotron">
<h1>Hybrid OA Dashboard</h1>
<p>
Bibliometric data analytics to increase cost transparency in hybrid open access transformation contracts.
</p>
<p>
<a class="btn btn-danger btn-lg" href="articles/interactive.html" role="button">
Try out the dashboard
</a>
<a class="btn btn-primary btn-lg" href="newsletter.html" role="button">
Sign up to the newsletter (german only)
</a>
</p>
</div>

## Overview

Expand All @@ -26,21 +38,3 @@ The project is based on data gathered by the [Crossref](http://www.crossref.org/
The package is at the [Göttingen State and University Libary](https://www.sub.uni-goettingen.de/) as part of the [DFG](https://www.dfg.de)-funded eponymous Hybrid Open Access Dashboard project.

An early prototype of the application, including the interactive web frontend is available at https://subugoe.github.io/hoad/.


## Installation

```r
remotes::install_github("subugoe/hoad")
```


## Getting Started

```r
library(hoad)
```

You can start the dashboard locally, by running `runHOAD()`.

More functions and data will be exposed in the future for modular reuse.
8 changes: 0 additions & 8 deletions hoad.code-workspace

This file was deleted.

2 changes: 1 addition & 1 deletion inst/app/dashboard.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
css: !expr metar::subugoe_template()$assets$css
css: !expr subugoetheme::pkgdown_template()$assets$css
runtime: shiny
---

Expand Down
15 changes: 9 additions & 6 deletions man/colors.Rd

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

Loading

0 comments on commit b5f3077

Please sign in to comment.