Skip to content

Commit

Permalink
Covid19Mirai 3.1.1 (#269)
Browse files Browse the repository at this point in the history
* Updated status badge
* Updated renv and workflow
* new version terra
* Update system dependencies in WF
* Sp importFrom
* remove suggested packages not required
  • Loading branch information
GuidoMaggio authored May 7, 2024
1 parent 1af4422 commit 8f0c88f
Show file tree
Hide file tree
Showing 12 changed files with 420 additions and 460 deletions.
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
32 changes: 17 additions & 15 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# single OS and R version, aligned with the target deployment environment
matrix:
config:
- {os: ubuntu-latest, r: '4.2.1'}
- {os: ubuntu-latest, r: 'renv'}

env:
# Access token for GitHub
Expand All @@ -33,31 +33,33 @@ jobs:
steps:

- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
# Enable RStudio Package Manager to speed up package installation
use-public-rspm: true

# - name: Install system dependencies
# # This is not taken care of (yet) by r-lib/actions/setup-renv
# # Package distro used to get the distro for the used ubuntu-latest
# run: |
# Rscript -e "install.packages(c('remotes', 'distro'))"
# while read -r cmd
# do
# eval sudo $cmd
use-public-rspm: false

- name: Install system dependencies
# This is not taken care of (yet) by r-lib/actions/setup-renv
# See https://github.com/r-lib/actions/issues/785
run: |
# We rely on pkgdepends from the library embedded in pak
install.packages("pak", repos = "https://r-lib.github.io/p/pak/stable/")
install.packages("jsonlite")
.libPaths(c(system.file("library", package = "pak"), .libPaths()))
pkgdepends::new_pkg_installation_proposal(
names(jsonlite::read_json("renv.lock")$Packages), config = list(dependencies = FALSE)
)$solve()$install_sysreqs()
shell: Rscript {0}
# done < <(Rscript -e 'writeLines(with(distro::distro(), remotes::system_requirements(id, short_version)))')

- name: Activate renv and restore packages with cache
uses: r-lib/actions/setup-renv@v2

# - name: Install renv Development tools
# run: renv::install()
# shell: Rscript {0}


- name: Fetch and rebuild latest data
if: false && github.event_name == 'schedule' # switched off
Expand Down
8 changes: 3 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Covid19Mirai
Title: Covid-19 Data Analysis
Version: 3.1.0
Version: 3.1.1
Authors@R:
c(person("Riccardo", "Porreca", role = ("aut"),
email = "[email protected]"),
Expand Down Expand Up @@ -42,11 +42,9 @@ Imports:
zoo
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Suggests:
rsconnect,
spelling,
pkgload,
testthat (>= 3.0.0),
sf,
packrat
testthat (>= 3.0.0)
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ import(lubridate)
import(markdown)
import(purrr)
import(shiny)
import(sp)
import(stringr)
import(tidyr)
import(zoo)
Expand Down Expand Up @@ -119,4 +118,5 @@ importFrom(shiny,selectInput)
importFrom(shiny,shinyApp)
importFrom(shiny,tagList)
importFrom(shinycssloaders,withSpinner)
importFrom(sp,merge)
importFrom(stringr,str_to_title)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Covid19Mirai 3.1.1
* Updated status badge

### Covid19Mirai 3.1.0
- Added action Buttons (#262)
- Added data to RDS
Expand Down
1 change: 1 addition & 0 deletions R/mod_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ mod_map_ui <- function(id){
#' @import tidyr
#' @import leaflet
#' @import leaflet.extras
#' @importFrom sp merge
#' @noRd
mod_map_server <- function(input, output, session, orig_data_aggregate, countries_data_map){
ns <- session$ns
Expand Down
1 change: 1 addition & 0 deletions R/mod_map_calc_continent.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ mod_map_area_calc_ui <- function(id){
#' @import tidyr
#' @import leaflet
#' @import leaflet.extras
#' @importFrom sp merge
#'
#' @noRd
mod_map_area_calc_server <- function(input, output, session, df, countries_data_map, area, variable = "confirmed", max.pop = 100000, countrymap = FALSE){
Expand Down
2 changes: 1 addition & 1 deletion R/mod_map_continent.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ mod_map_cont_ui <- function(id){
#' @import dplyr
#' @import tidyr
#' @import leaflet
#' @import sp
#' @importFrom sp merge
#'
#' @noRd
mod_map_cont_server <- function(input, output, session, orig_data_aggregate, countries_data_map, area, g_palette){
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

<!-- badges: start -->

[![R build
status](https://github.com/miraisolutions/Covid19/workflows/CI-CD/badge.svg)](https://github.com/miraisolutions/Covid19/actions)
[![ci-cd](https://github.com/miraisolutions/Covid19/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/miraisolutions/Covid19/actions/workflows/ci-cd.yml)
[![eRum2020::CovidR](https://badgen.net/https/runkit.io/erum2020-covidr/badge/branches/master/vitalini-covid19?cache=300)](https://milano-r.github.io/erum2020-covidr-contest/vitalini-covid19.html)

<!-- badges: end -->

The goal of Covid19Mirai is to provide an insight on corona virus data
Expand Down Expand Up @@ -39,7 +39,7 @@ Ardia](https://ardiad.github.io/). We are very thankful to [David
Bumbeishvili](https://github.com/bumbeishvili) for his great
[work](https://github.com/bumbeishvili/covid19-daily-data)

**Update October 2023**, the app stops updating data and is frozen to `2022-09-01`.
**Update October 2023**, the app stops updating data and is frozen to `2022-06-01`.


## Data Storage
Expand Down
Loading

0 comments on commit 8f0c88f

Please sign in to comment.