Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MIRACUM
dqa
DQAgui
Commits
541192b8
Commit
541192b8
authored
5 years ago
by
Lorenz Kapsner
Browse files
Options
Download
Email Patches
Plain Diff
added gitlab-ci, added sitename to filenames, fixed r cmd check results
parent
c6265d66
master
colored_diff_summary
development
development-Differences
feat_new_coreds
fix_no_timefiltering
fix_settings_from_env
lab-module
latest
time_compare_fix
trino
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.9
v0.1.8
v0.1.7
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
v0.0.7
v0.0.6
v0.0.4
v0.0.3
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
.Rbuildignore
+1
-0
.Rbuildignore
.gitlab-ci.yml
+88
-0
.gitlab-ci.yml
DESCRIPTION
+4
-1
DESCRIPTION
R/launch_app.R
+39
-10
R/launch_app.R
R/moduleReport.R
+4
-0
R/moduleReport.R
data-raw/devstuffs.R
+4
-2
data-raw/devstuffs.R
man/launchApp.Rd
+10
-6
man/launchApp.Rd
with
150 additions
and
19 deletions
+150
-19
.Rbuildignore
+
1
-
0
View file @
541192b8
...
...
@@ -4,3 +4,4 @@
^LICENSE\.md$
^docker$
^inst/application/_settings$
^\.gitlab-ci\.yml$
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
0 → 100644
+
88
-
0
View file @
541192b8
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
:
"
DQAgui"
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_deps(pkg = '.', upgrade = 'always')"
-
R -e "devtools::install_dev_deps(pkg = '.', upgrade = 'always')"
-
mkdir -p ci
stages
:
-
build
-
test
-
deploy
check
:
stage
:
build
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')"
This diff is collapsed.
Click to expand it.
DESCRIPTION
+
4
-
1
View file @
541192b8
...
...
@@ -13,7 +13,7 @@ URL: https://gitlab.miracum.org/miracum-dqa/dqagui
BugReports: https://gitlab.miracum.org/miracum-dqa/dqagui/issues
Encoding: UTF-8
Copyright: Universitätsklinikum Erlangen
Date
/Publication: 2019-11-05 15:25:31 UTC
Date
: 2019-11-11
Imports:
data.table,
magrittr,
...
...
@@ -30,3 +30,6 @@ Imports:
Suggests:
testthat,
processx
Remotes:
git::git@gitlab.miracum.org:miracumdqa/dqastats.git
RoxygenNote: 6.1.1
This diff is collapsed.
Click to expand it.
R/launch_app.R
+
39
-
10
View file @
541192b8
# DQAgui - A graphical user interface (GUI) to the functions implemented in the R package 'DQAstats'.
# DQAgui - A graphical user interface (GUI) to the functions implemented in the
# R package 'DQAstats'.
# Copyright (C) 2019 Universitätsklinikum Erlangen
#
# This program is free software: you can redistribute it and/or modify
...
...
@@ -18,12 +19,16 @@
#' @title Launch the DQA graphical user interface (GUI)
#'
#' @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
#' corresponding csv files.
#' @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 DQAgui Shiny application
#'
...
...
@@ -34,10 +39,34 @@
#' @export
#'
launchApp
<-
function
(
port
=
3838
,
utilspath
,
db_source
){
launchApp
<-
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
=
"DQAgui"
))
}
...
...
This diff is collapsed.
Click to expand it.
R/moduleReport.R
+
4
-
0
View file @
541192b8
...
...
@@ -93,6 +93,8 @@ moduleReportServer <- function(input,
gsub
(
"\\-|\\:| "
,
""
,
substr
(
rv
$
start.time
,
1
,
16
)),
"_"
,
rv
$
sitename
,
".pdf"
)
},
content
=
function
(
file
){
...
...
@@ -116,6 +118,8 @@ moduleReportServer <- function(input,
gsub
(
"\\-|\\:| "
,
""
,
substr
(
rv
$
start.time
,
1
,
16
)),
"_"
,
rv
$
sitename
,
".zip"
)
},
content
=
function
(
fname
)
{
...
...
This diff is collapsed.
Click to expand it.
data-raw/devstuffs.R
+
4
-
2
View file @
541192b8
...
...
@@ -21,7 +21,7 @@ my_desc$set(Title = "DQA GUI")
# The description of your package
my_desc
$
set
(
Description
=
"A graphical user interface (GUI) to the functions implemented in the R package 'DQAstats'."
)
# 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/dqagui"
)
my_desc
$
set
(
"BugReports"
,
...
...
@@ -67,8 +67,10 @@ usethis::use_package("testthat", type = "Suggests")
usethis
::
use_package
(
"processx"
,
type
=
"Suggests"
)
# Development package
# https://remotes.r-lib.org/articles/dependencies.html
devtools
::
install_git
(
url
=
"https://gitlab.miracum.org/miracum-dqa/dqastats.git"
,
ref
=
"master"
,
upgrade
=
"always"
)
usethis
::
use_dev_package
(
"DQAstats"
,
type
=
"Imports"
)
# https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html
desc
::
desc_set_remotes
(
"git::git@gitlab.miracum.org:miracumdqa/dqastats.git"
,
file
=
usethis
::
proj_get
())
# buildignore and gitignore
usethis
::
use_build_ignore
(
"docker"
)
...
...
This diff is collapsed.
Click to expand it.
man/launchApp.Rd
+
10
-
6
View file @
541192b8
...
...
@@ -9,13 +9,17 @@ launchApp(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
corresponding csv files.}
\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{
DQAgui Shiny application
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help