-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pkgdown documentation. Added one testthat test.
- Loading branch information
Ajit Londhe
committed
Aug 23, 2019
1 parent
16eb5ff
commit 0b18519
Showing
31 changed files
with
2,215 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
language: r | ||
sudo: false | ||
cache: packages | ||
|
||
branches: | ||
except: | ||
- /^*-v[0-9]/ | ||
|
||
r_packages: | ||
- covr | ||
- drat | ||
|
||
before_script: | ||
- export PKG_NAME=$(Rscript -e 'cat(paste0(devtools::as.package(".")$package))') | ||
- export PKG_TARBALL=$(Rscript -e 'pkg <- devtools::as.package("."); cat(paste0(pkg$package,"_",pkg$version,".tar.gz"))') | ||
|
||
# Build and check package | ||
script: | ||
- R CMD build . | ||
- _R_CHECK_CRAN_INCOMING_=FALSE R CMD check "${PKG_TARBALL}" --as-cran | ||
- cat ${PKG_NAME}.Rcheck/00install.out # Print out install / compile log | ||
|
||
after_success: | ||
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && perl compare_versions --tag && bash deploy.sh && curl --data "build=true" -X POST https://registry.hub.docker.com/u/ohdsi/broadsea-methodslibrary/trigger/f0b51cec-4027-4781-9383-4b38b42dd4f5/ | ||
- Rscript -e 'library(covr);codecov()' | ||
|
||
notifications: | ||
recipients: | ||
- alondhe2@its.jnj.com | ||
- mblacke@its.jnj.com | ||
- fdefalco@its.jnj.com | ||
email: | ||
on_success: change | ||
on_failure: change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(dqDashPOC) | ||
export(dqDashPOCOutput) | ||
export(executeDqChecks) | ||
export(renderDqDashPOC) | ||
export(viewDqDashboard) | ||
export(writeJsonResultsToTable) | ||
import(htmlwidgets) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
template: | ||
params: | ||
bootswatch: cosmo | ||
|
||
home: | ||
links: | ||
- text: Ask a question | ||
href: http://forums.ohdsi.org | ||
|
||
reference: | ||
- title: "Execution" | ||
desc: > | ||
Function for running data quality checks | ||
contents: | ||
- executeDqChecks | ||
- writeJsonResultsToTable | ||
- title: "View Dashboard" | ||
desc: > | ||
Function for viewing the data quality dashboard | ||
contents: | ||
- viewDqDashboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/perl | ||
|
||
open(R_VERSION, "grep 'Version' DESCRIPTION |"); | ||
$version = <R_VERSION>; | ||
close(R_VERSION); | ||
|
||
$version =~ /(\d+)\.(\d+)\.(\d+)/; | ||
$r_major = $1; | ||
$r_minor = $2; | ||
$r_mod = $3; | ||
|
||
print "New R version: $r_major-$r_minor-$r_mod\n"; | ||
|
||
open(GIT_VERSION, "git describe --tags |"); | ||
$git = <GIT_VERSION>; | ||
close(GIT_VERSION); | ||
|
||
$git =~ /v(\d+)\.(\d+)\.(\d+)/; | ||
$git_major = $1; | ||
$git_minor = $2; | ||
$git_mod = $3; | ||
|
||
print "Current git version: $git_major-$git_minor-$git_mod\n"; | ||
|
||
if ($r_major > $git_major || $r_minor > $git_minor || $r_mod > $git_mod) { | ||
$monotonic = 0; | ||
} else { | ||
$monotonic = -1; | ||
} | ||
|
||
if ($monotonic != 0) { | ||
print "Non-monotonically increasing versions numbers\n"; | ||
} | ||
|
||
if ($monotonic == 0 & $ARGV[0] eq "--tag") { | ||
|
||
open(GIT_TAG, "git tag v$r_major.$r_minor.$r_mod |"); | ||
|
||
$fail = 0; | ||
while ($line = <GIT_TAG>) { | ||
if ($line =~ /fatal/) { | ||
$fail = 1; | ||
} | ||
print "tag: $line"; | ||
} # TODO Check for errors | ||
close(GIT_TAG); | ||
print "tag: END\n\n"; | ||
|
||
if ($fail eq 1) { | ||
exit(-1); | ||
} | ||
|
||
$cmd = "git config user.name \"alondhe\"; " . | ||
"git config user.email \"alondhe2@its.jnj.com\"; " . | ||
"git tag v$r_major.$r_minor.$r_mod ; " . | ||
"git push -q https://\$GH_TOKEN\@github.com/OHDSI/\$PKG_NAME.git --tags"; | ||
|
||
print "cmd: $cmd\n"; | ||
|
||
open(GIT_PUSH, "$cmd |"); | ||
while ($line = <GIT_PUSH>) { | ||
print "push: $line"; | ||
} # TODO Check for errors | ||
close(GIT_PUSH); | ||
print "push: END\n\n"; | ||
} | ||
|
||
exit($monotonic); |
Oops, something went wrong.