Source
...
Target
Commits (23)
Showing with 190 additions and 56 deletions
+190 -56
......@@ -7,3 +7,4 @@
^inst/application/_utilities/MDR/XLSX$
^inst/application/_utilities/MDR/XSD$
^inst/application/_utilities/MDR/\.~lock\.mdr\.csv#$
^\.gitlab-ci\.yml$
......@@ -19,6 +19,7 @@
!/inst/
!/man/
!/NAMESPACE
!/.gitlab-ci.yml
/inst/application/_settings/
.Rproj.user
*.Rproj
......
variables:
_R_CHECK_CRAN_INCOMING_: "false"
_R_CHECK_FORCE_SUGGESTS_: "true"
CI_IMAGE_NAME: "rocker/verse"
CI_IMAGE_TAG: "3.6.1"
R_PKG_NAME: "miRacumDQA"
default:
image: ${CI_IMAGE_NAME}:${CI_IMAGE_TAG}
before_script:
- echo "options('repos' = 'https://ftp.fau.de/cran/')" >> /usr/local/lib/R/etc/Rprofile.site
- R -e "devtools::install_dev_deps(pkg = '.', upgrade = 'always')"
- mkdir -p ci
stages:
- build
- test
- deploy
check:
stage: build
allow_failure: true # necessary when having development-packages (in remotes-section of DESCRIPTION)
script:
- R -e "devtools::check(pkg = '.', args = c('--no-tests'), build_args = c('--no-build-vignettes'), check_dir = '${CI_PROJECT_DIR}/ci')"
artifacts:
paths:
- "${CI_PROJECT_DIR}/ci/*.Rcheck"
when: on_failure # upload check artifacts when job fails!
expire_in: 1 week
create_manual:
stage: build
script:
- R -e "devtools::build_manual(pkg = '.', path = '${CI_PROJECT_DIR}/ci')"
artifacts:
paths:
- "${CI_PROJECT_DIR}/ci/*.pdf"
expire_in: 1 week
build_source:
stage: build
script:
- R -e "devtools::build(pkg = '.', path = '${CI_PROJECT_DIR}/ci', binary = FALSE, vignettes = FALSE)"
artifacts:
paths:
- "${CI_PROJECT_DIR}/ci/*.tar.gz"
expire_in: 1 week
build_binary:
stage: build
script:
- R -e "devtools::build(pkg = '.', path = '${CI_PROJECT_DIR}/ci', binary = TRUE, vignettes = FALSE)"
artifacts:
paths:
- "${CI_PROJECT_DIR}/ci/*.tar.gz"
expire_in: 1 week
# To have the coverage percentage appear as a gitlab badge follow these
# instructions:
# https://docs.gitlab.com/ee/user/project/pipelines/settings.html#test-coverage-parsing
# The coverage parsing string is
# Coverage: \d+\.\d+
coverage:
stage: test
allow_failure: true
when: on_success
script:
- R -e "install.packages('DT')"
- R -e "covr::gitlab(quiet = FALSE)"
artifacts:
paths:
- public
testing:
stage: test
allow_failure: true
when: on_success
script:
- R -e "devtools::test(pkg = '.')"
# To produce a code coverage report as a GitLab page see
# https://about.gitlab.com/2016/11/03/publish-code-coverage-report-with-gitlab-pages/
install:
stage: deploy
script:
- R -e "devtools::install(pkg = '.', upgrade = 'always')"
Package: miRacumDQA
Title: MIRACUM DQA Tool
Version: 2.0.0
Version: 2.0.1
Authors@R:
c(person(given = "Lorenz A.",
family = "Kapsner",
......@@ -16,11 +16,12 @@ URL: https://gitlab.miracum.org/miracum-dqa/miRacumDQA
BugReports: https://gitlab.miracum.org/miracum-dqa/miRacumDQA/issues
Encoding: UTF-8
Copyright: Universitätsklinikum Erlangen
Date/Publication: 2019-09-26 06:21:25 UTC
Date: 2019-11-12
Imports:
shiny,
DQAstats (>= 0.0.2),
DQAgui (>= 0.0.2)
shiny
Remotes:
url::https://gitlab.miracum.org/miracum-dqa/dqagui/-/archive/v0.0.3/dqagui-v0.0.3.zip,
url::https://gitlab.miracum.org/miracum-dqa/dqastats/-/archive/v0.0.3/dqastats-v0.0.3.zip
Suggests:
testthat,
processx
......
# Generated by roxygen2: do not edit by hand
export(launchDQAtool)
import(DQAgui)
import(shiny)
......@@ -17,26 +17,61 @@
#' @title Launch the MIRACUM DQA Tool
#'
#' @param port The port, the MIRACUM DQA Tool is running on (default: 3838)
#' @param utilspath The path to the utilities-folder, containing the metadata repository files (`mdr.csv` inside the folder `MDR`),
#' JSON files with SQL statements (inside the folder `SQL`), config files for the database connection (`settings_default.yml`)
#' and the email address used for the data map (`email.yml`), a JSON file containing site names (inside the folder `MISC`) and a
#' markdown templated to create the PDF report (`DQA_report.Rmd` inside the folder `RMD`).
#' @param db_source The name of the source database. Currently, the only allowed argument is `p21csv` used for the import of the
#' @param utilspath The path to the utilities-folder, containing the metadata
#' repository files (`mdr.csv` inside the folder `MDR`), JSON files with
#' SQL statements (inside the folder `SQL`), config files for the database
#' connection (`settings_default.yml`) and the email address used for the
#' data map (`email.yml`), a JSON file containing site names (inside the
#' folder `MISC`) and a markdown templated to create the PDF report
#' (`DQA_report.Rmd` inside the folder `RMD`).
#' @param db_source The name of the source database. Currently, the only
#' allowed argument is `p21csv` used for the import of the
#' corresponding csv files.
#'
#' @return the MIRACUM DQA Tool Shiny application
#'
#' @import DQAgui shiny
#' @import shiny
#'
#' @export
#'
launchDQAtool <- function(port=3838, utilspath, db_source){
launchDQAtool <- function(port=3838,
utilspath,
db_source){
global_env_hack <- function(key,
val,
pos) {
assign(
key,
val,
envir = as.environment(pos)
)
}
global_env_hack(
key = "utilspath",
val = utilspath,
pos = 1L
)
global_env_hack(
key = "db_source",
val = db_source,
pos = 1L
)
options(shiny.port = port)
assign("utilspath", utilspath, envir = .GlobalEnv)
assign("db_source", db_source, envir = .GlobalEnv)
shiny::shinyAppDir(appDir = system.file("application", package = "miRacumDQA"))
cat(paste0("\nVersion DQAstats: ", utils::packageVersion("DQAstats"),
"\nVersion DQAgui: ", utils::packageVersion("DQAgui"),
"\n"))
shiny::shinyAppDir(
appDir = system.file("application", package = "miRacumDQA")
)
}
# debugging
......
......@@ -16,13 +16,13 @@ my_desc$set("Copyright", "Universitätsklinikum Erlangen")
# Remove some author fields
my_desc$del("Maintainer")
# Set the version
my_desc$set_version("2.0.0")
my_desc$set_version("2.0.1")
# The title of your package
my_desc$set(Title = "MIRACUM DQA Tool")
# The description of your package
my_desc$set(Description = "The MIRACUM consortium's data quality assessment tool.")
# The description of your package
my_desc$set("Date/Publication" = paste(as.character(Sys.time()), "UTC"))
my_desc$set("Date" = as.character(Sys.Date()))
# The urls
my_desc$set("URL", "https://gitlab.miracum.org/miracum-dqa/miRacumDQA")
my_desc$set("BugReports",
......@@ -52,8 +52,15 @@ usethis::use_gpl3_license(name="Universitätsklinikum Erlangen")
# Imports
usethis::use_package("shiny", type = "Imports")
usethis::use_dev_package("DQAstats", type = "Imports")
usethis::use_dev_package("DQAgui", type = "Imports")
# Development package
# https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html
devtools::install_git(url = "https://gitlab.miracum.org/miracum-dqa/dqastats.git", ref = "v0.0.3", upgrade = "always")
devtools::install_git(url = "https://gitlab.miracum.org/miracum-dqa/dqagui.git", ref = "v0.0.3", upgrade = "always")
desc::desc_set_remotes(c("url::https://gitlab.miracum.org/miracum-dqa/dqagui/-/archive/v0.0.3/dqagui-v0.0.3.zip",
"url::https://gitlab.miracum.org/miracum-dqa/dqastats/-/archive/v0.0.3/dqastats-v0.0.3.zip"),
file = usethis::proj_get())
# Suggests
usethis::use_package("testthat", type = "Suggests")
......
# https://hub.docker.com/r/rocker/shiny/
FROM rocker/shiny-verse
FROM rocker/shiny-verse:3.6.1
# install necessary system dependencies for r packages (e.g. devtools, RPostgres)
RUN apt-get update && apt-get install -y --no-install-recommends \
......@@ -13,22 +12,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gpg-agent \
git
ARG p_base="devtools \
tinytex"
RUN for package in $p_base; do \
R -q -e "p <- \"$package\"; if (isFALSE(p %in% installed.packages()[,\"Package\"])){; cat(paste(\"Installing package:\", p, \"\n\n\")); install.packages(p, repos = \"https://ftp.fau.de/cran/\", quiet=T);} else {;cat(paste(\"Package\", p, \"is already installed\n\n\"));}"; \
done
# set cran repo
RUN echo "options('repos' = 'https://ftp.fau.de/cran/')" >> /usr/local/lib/R/etc/Rprofile.site
# install tinytex
RUN R -q -e "remotes::update_packages(packages = \"tinytex\", upgrade = \"always\")"
USER shiny
RUN R -q -e 'tinytex::install_tinytex()'
RUN R -q -e "tinytex::install_tinytex()"
USER root
ENV PATH="/home/shiny/bin:${PATH}"
# install required LaTeX-Packages
RUN ./home/shiny/.TinyTeX/bin/x86_64-linux/tlmgr update --self
RUN ./home/shiny/.TinyTeX/bin/x86_64-linux/tlmgr install \
RUN tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet && \
tlmgr update --self && \
tlmgr install \
multirow \
xcolor \
colortbl \
......@@ -59,11 +58,7 @@ RUN ./home/shiny/.TinyTeX/bin/x86_64-linux/tlmgr install \
latex-graphics-dev \
geometry \
ec \
ifxetex \
ifluatex
# add TeX-installation to PATH
ENV PATH="/home/shiny/bin:${PATH}"
iftex
# repository name
ARG REPO_NAME=dqastats
......
......@@ -5,9 +5,9 @@ mkdir addfolder
cd addfolder
# clone repositories
git clone -b v0.0.2 https://gitlab.miracum.org/miracum-dqa/dqastats.git
git clone -b v0.0.2 https://gitlab.miracum.org/miracum-dqa/dqagui.git
git clone -b v2.0.0 https://gitlab.miracum.org/miracum-dqa/miracumdqa.git
git clone -b v0.0.3 https://gitlab.miracum.org/miracum-dqa/dqastats.git
git clone -b v0.0.3 https://gitlab.miracum.org/miracum-dqa/dqagui.git
git clone -b v2.0.1 https://gitlab.miracum.org/miracum-dqa/miracumdqa.git
cd ..
docker build -f Dockerfile -t dqa-miracum .
......
......@@ -17,9 +17,9 @@ printf "\n\ncloning repo ...\n"
mkdir addfolder
cd addfolder
# clone repository
git clone -b v0.0.2 https://gitlab.miracum.org/miracum-dqa/dqastats.git
git clone -b v0.0.2 https://gitlab.miracum.org/miracum-dqa/dqagui.git
git clone -b v2.0.0 https://gitlab.miracum.org/miracum-dqa/miracumdqa.git
git clone -b v0.0.3 https://gitlab.miracum.org/miracum-dqa/dqastats.git
git clone -b v0.0.3 https://gitlab.miracum.org/miracum-dqa/dqagui.git
git clone -b v2.0.1 https://gitlab.miracum.org/miracum-dqa/miracumdqa.git
cd ..
printf "\n\nbuilding images ...\n"
......
......@@ -3,14 +3,14 @@ version: '3'
services:
dqatool:
container_name: dqa-miracum
image: docker.miracum.org/dqa/miracumdqa:2.0.0
image: docker.miracum.org/dqa/miracumdqa:2.0.1
restart: unless-stopped
volumes:
- /home/i2b2/start/Input:/home/input
ports:
- "3838:3838"
- "3838:3838"
networks:
- miracum-net
- miracum-net
networks:
miracum-net:
......
#!/bin/bash
./deploy_image.sh docker.miracum.org/dqa miracumdqa 2.0.0
./deploy_image.sh docker.miracum.org/dqa miracumdqa 2.0.1
......@@ -18,7 +18,7 @@
\usepackage{caption}
\captionsetup[figure]{labelformat=empty}
\usepackage[ngerman]{babel}
\usepackage{graphicx,grffile}
\usepackage{graphicx}
\usepackage{float}
\usepackage{pdflscape}
\usepackage{longtable}
......
......@@ -124,7 +124,11 @@ $if(tables)$
\usepackage{longtable,booktabs}
$endif$
$if(graphics)$
\usepackage{graphicx,grffile}
\usepackage{graphicx}
% grffile has become a legacy package: https://ctan.org/pkg/grffile
\IfFileExists{grffile.sty}{%
\usepackage{grffile}
}{}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
......@@ -199,7 +203,7 @@ $if(compact-title)$
\usepackage{titling}
% Create subtitle command for use in maketitle
\newcommand{\subtitle}[1]{
\providecommand{\subtitle}[1]{
\posttitle{
\begin{center}\large#1\end{center}
}
......@@ -279,7 +283,6 @@ $endif$
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
}
\newpage
$endif$
$if(lot)$
\listoftables
......
......@@ -9,12 +9,16 @@ launchDQAtool(port = 3838, utilspath, db_source)
\arguments{
\item{port}{The port, the MIRACUM DQA Tool is running on (default: 3838)}
\item{utilspath}{The path to the utilities-folder, containing the metadata repository files (`mdr.csv` inside the folder `MDR`),
JSON files with SQL statements (inside the folder `SQL`), config files for the database connection (`settings_default.yml`)
and the email address used for the data map (`email.yml`), a JSON file containing site names (inside the folder `MISC`) and a
markdown templated to create the PDF report (`DQA_report.Rmd` inside the folder `RMD`).}
\item{utilspath}{The path to the utilities-folder, containing the metadata
repository files (`mdr.csv` inside the folder `MDR`), JSON files with
SQL statements (inside the folder `SQL`), config files for the database
connection (`settings_default.yml`) and the email address used for the
data map (`email.yml`), a JSON file containing site names (inside the
folder `MISC`) and a markdown templated to create the PDF report
(`DQA_report.Rmd` inside the folder `RMD`).}
\item{db_source}{The name of the source database. Currently, the only allowed argument is `p21csv` used for the import of the
\item{db_source}{The name of the source database. Currently, the only
allowed argument is `p21csv` used for the import of the
corresponding csv files.}
}
\value{
......