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

Commit 0f0167c

Browse files
committed
streamline and upgrade muggle closes #260
1 parent d2843d7 commit 0f0167c

File tree

19 files changed

+74
-242
lines changed

19 files changed

+74
-242
lines changed

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Dockerfile
88
.dockerignore
99
^\.github$
10-
^\.deps$
1110
.rstudio
1211
hoad.code-workspace
1312
^R/.add_emails\.R$
@@ -17,3 +16,5 @@ hoad.code-workspace
1716
^R/.scoap\.R$
1817
^R/.unpaywall_integration\.R$
1918
.vscode
19+
.azure
20+
^\.Rproj\.user$

.github/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

.github/workflows/main.yaml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ jobs:
88
run:
99
shell: Rscript {0}
1010
container:
11-
# this needs to be the same as in Dockerfile
12-
image: subugoe/muggle-onbuild:f60004c31979947dab53fbf9cfbb0e7f1c4bea55
11+
# update muggle here and in Dockerfile
12+
image: subugoe/muggle-buildtime-onbuild:0.1.1-20210126
13+
env:
14+
MUGGLE_PKG_NAME: ${{ github.event.repository.name }}
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1316
steps:
1417
- uses: actions/checkout@v2
1518
- name: Cache R Packages
@@ -26,18 +29,17 @@ jobs:
2629
R_LIBS_SITE: $R_LIBS_APP_GH
2730
run: remotes::install_deps(dependencies = TRUE)
2831
- name: Check
29-
run: muggle::rcmdcheck2()
32+
# TODO error out on all but note again https://github.com/subugoe/hoad/issues/194
33+
run: devtools::check(error_on = "error")
3034
- name: Test Coverage
3135
run: covr::codecov()
3236
- name: Build Package Website
33-
run: |
34-
# extra step is necessary to build index.md to integrate readme and landing page
35-
rmarkdown::render("pkgdown/index.Rmd")
36-
pkgdown::build_site(override = list(new_process = FALSE))
37-
- uses: docker/build-push-action@v1
38-
name: Build Dev Image
37+
run: muggle::build_site2(new_process = FALSE)
38+
- name: Build Buildtime Image
39+
uses: docker/build-push-action@v1
3940
with:
40-
repository: ${{ github.repository }}/hoad-dev
41+
repository: ${{ github.repository }}/${{ env.MUGGLE_PKG_NAME }}-buildtime
42+
target: buildtime
4143
username: ${{ github.actor }}
4244
password: ${{ secrets.GITHUB_TOKEN }}
4345
registry: docker.pkg.github.com
@@ -48,14 +50,21 @@ jobs:
4850
tags: ${{ github.sha }}
4951
add_git_labels: true
5052
push: ${{ github.event_name != 'pull_request' }}
51-
- name: Setup GCP Cloud SDK
52-
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
53+
- name: Build Runtime Image
54+
uses: docker/build-push-action@v1
5355
with:
54-
project_id: ${{ secrets.GCP_PROJECT_ID }}
55-
service_account_key: ${{ secrets.GCP_SA_KEY }}
56-
export_default_credentials: true
57-
- run: gcloud info
58-
shell: bash
56+
repository: ${{ github.repository }}/${{ env.MUGGLE_PKG_NAME }}-runtime
57+
target: runtime
58+
username: ${{ github.actor }}
59+
password: ${{ secrets.GITHUB_TOKEN }}
60+
registry: docker.pkg.github.com
61+
# this will set "latest" if master as per https://github.com/docker/build-push-action
62+
tag_with_ref: true
63+
# we're relying on long shas only to keep things easy
64+
tag_with_sha: false
65+
tags: ${{ github.sha }}
66+
add_git_labels: true
67+
push: ${{ github.event_name != 'pull_request' }}
5968
- name: Deploy Shiny Application to shinyapps.io ref
6069
env:
6170
SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }}
@@ -73,4 +82,3 @@ jobs:
7382
uses: maxheld83/ghpages@github-token
7483
env:
7584
BUILD_DIR: docs
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
.Rhistory
33
.RData
44
.Ruserdata
5-
*.DS_Store
65
docs/
7-
.rstudio/

DESCRIPTION

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: hoad
22
Title: Hybrid Open Access Dashboard
3-
Version: 1.0.0
3+
Version: 1.0.1.9000
44
Authors@R:
55
c(
66
person(
@@ -41,7 +41,8 @@ Authors@R:
4141
role = c("dtc")
4242
)
4343
)
44-
Description: Analytics to increase cost transparency in business model transformation towards open access publishing.
44+
Description:
45+
Analytics to increase cost transparency in business model transformation towards open access publishing.
4546
License: AGPL-3
4647
Encoding: UTF-8
4748
Language: en
@@ -62,7 +63,6 @@ Suggests:
6263
DT,
6364
writexl,
6465
echarts4r,
65-
metar,
6666
DBI,
6767
dbplyr,
6868
haven,
@@ -75,10 +75,12 @@ Suggests:
7575
httr,
7676
purrr,
7777
covr,
78-
testthat
78+
testthat,
79+
subugoetheme,
80+
shinycaas
7981
URL: https://subugoe.github.io/hoad, https://github.com/subugoe/hoad/
8082
BugReports: https://github.com/subugoe/hoad/issues
81-
RoxygenNote: 7.1.1
83+
RoxygenNote: 7.1.1.9999
8284
Imports:
8385
dplyr,
8486
checkmate,
@@ -88,4 +90,5 @@ Imports:
8890
ggplot2,
8991
rlang
9092
Remotes:
91-
subugoe/metar@7ccc2a0
93+
subugoe/subugoetheme@1.1.1,
94+
subugoe/shinycaas@1.0.0

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
FROM subugoe/muggle-onbuild:f60004c31979947dab53fbf9cfbb0e7f1c4bea55
1+
ARG MUGGLE_TAG=0.1.1-20210126
2+
FROM subugoe/muggle-buildtime-onbuild:${MUGGLE_TAG} as buildtime
3+
FROM subugoe/muggle-runtime-onbuild:${MUGGLE_TAG} as runtime
4+
CMD shinycaas::shiny_opts_az(); hoad::runHOAD()

NEWS.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

R/plots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#' Color palettes
2-
#' Colors used in the hybrid open access dashboard, based on [metar::ugoe_pal()]
2+
#' Colors used in the hybrid open access dashboard, based on [subugoetheme::ugoe_pal()]
33
#' @family visualisation functions
44
#' @name colors
55
NULL

README.md

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
# hoad
2-
31
<!-- badges: start -->
42
[![Main](https://github.com/subugoe/hoad/workflows/.github/workflows/main.yaml/badge.svg)](https://github.com/subugoe/hoad/actions)
3+
[![Codecov test coverage](https://codecov.io/gh/subugoe/hoad/branch/master/graph/badge.svg)](https://codecov.io/gh/subugoe/hoad?branch=master)
54
[![CRAN status](https://www.r-pkg.org/badges/version/hoad)](https://CRAN.R-project.org/package=hoad)
65
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
7-
[![Codecov test coverage](https://codecov.io/gh/subugoe/hoad/branch/master/graph/badge.svg)](https://codecov.io/gh/subugoe/hoad?branch=master)
86
<!-- badges: end -->
97

8+
<div class="jumbotron">
9+
<h1>Hybrid OA Dashboard</h1>
10+
<p>
11+
Bibliometric data analytics to increase cost transparency in hybrid open access transformation contracts.
12+
</p>
13+
<p>
14+
<a class="btn btn-danger btn-lg" href="articles/interactive.html" role="button">
15+
Try out the dashboard
16+
</a>
17+
<a class="btn btn-primary btn-lg" href="newsletter.html" role="button">
18+
Sign up to the newsletter (german only)
19+
</a>
20+
</p>
21+
</div>
1022

1123
## Overview
1224

@@ -26,21 +38,3 @@ The project is based on data gathered by the [Crossref](http://www.crossref.org/
2638
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.
2739

2840
An early prototype of the application, including the interactive web frontend is available at https://subugoe.github.io/hoad/.
29-
30-
31-
## Installation
32-
33-
```r
34-
remotes::install_github("subugoe/hoad")
35-
```
36-
37-
38-
## Getting Started
39-
40-
```r
41-
library(hoad)
42-
```
43-
44-
You can start the dashboard locally, by running `runHOAD()`.
45-
46-
More functions and data will be exposed in the future for modular reuse.

0 commit comments

Comments
 (0)