-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from PetterHopp/main
NVIdb v0.5.1
- Loading branch information
Showing
3 changed files
with
85 additions
and
6 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 |
---|---|---|
@@ -1,10 +1,18 @@ | ||
Package: NVIdb | ||
Title: Facilitating use of Norwegian Veterinary Institute's databases | ||
Version: 0.4.0.9001 | ||
Date: 2021-04-07 | ||
Author: Petter Hopp <[email protected]>, | ||
Johan Åkerstedt <[email protected]> | ||
Maintainer: Petter Hopp <[email protected]> | ||
Version: 0.5.1 | ||
Date: 2021-04-08 | ||
Authors@R: | ||
c(person(given = "Petter", | ||
family = "Hopp", | ||
role = c("aut", "cre"), | ||
email = "[email protected]"), | ||
person(given = "Johan", | ||
family = "Åkerstedt", | ||
role = "aut", | ||
email = "[email protected]"), | ||
person(given = "Norwegian Veterinary Institute", | ||
role = "cph")) | ||
Description: The Norwegian Veterinary Institute has several internal databases as well as | ||
access to data from external databases. This package provides functions to facilitate | ||
downloading and processing of data from such databases, in particular PJS and EOS. The | ||
|
@@ -16,7 +24,7 @@ Description: The Norwegian Veterinary Institute has several internal databases a | |
URL: https://github.com/NorwegianVeterinaryInstitute/NVIdb | ||
BugReports: https://github.com/NorwegianVeterinaryInstitute/NVIdb/issues | ||
Depends: R (>= 3.5.0) | ||
License: Proprietary. Do not distribute outside the Norwegian Veterinary Institute | ||
License: BSD_3_clause + file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Imports: | ||
|
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,63 @@ | ||
# TEST, DOCUMENT AND BUILD NVIdb PACKAGE | ||
|
||
# Set up environment | ||
# rm(list = ls()) # Benyttes for å tømme R-environment ved behov | ||
Rlibrary <- R.home() | ||
|
||
library(devtools) | ||
library(roxygen2) | ||
library(withr) | ||
|
||
# Creates new help files | ||
# Should be run before git push when documentation for functions have been changed | ||
devtools::document() | ||
|
||
# Run tests included in ./tests. NVIdb use testthat | ||
devtools::test() | ||
|
||
# Build the vignette | ||
# devtools::build_vignettes() | ||
# vignetteRDS <- readRDS("./Meta/vignette.rds") | ||
|
||
# devtools::build_manual() | ||
|
||
# Build the package | ||
# system("R CMD build ../NVIdb") | ||
# devtools::build(binary = TRUE) | ||
devtools::build(binary = FALSE, manual = TRUE, vignettes = TRUE) | ||
|
||
version <- packageVersion("NVIdb", lib.loc = paste0(getwd(),"/..")) | ||
devtools::check_built(path = paste0("../NVIdb_", version, ".tar.gz"), manual = TRUE) | ||
|
||
# Extensive checking of package. Is done after build. Creates PDF-manual | ||
# system("R CMD check --ignore-vignettes ../NVIdb") | ||
# Alternative for creating the PDF-manual. The manual is not put in the correct directory | ||
# system(paste(shQuote(file.path(R.home("bin"), "R")), | ||
# "CMD", | ||
# "Rd2pdf", | ||
# shQuote(paste0(Rlibrary,"/library/NVIdb")))) | ||
|
||
|
||
# Innstall rebuilt package | ||
detach("package:NVIdb", unload=TRUE) | ||
|
||
with_libpaths(paste0(Rlibrary,"/library"), | ||
install(sub("notes", "", dirname(rstudioapi::getSourceEditorContext()$path)), | ||
dependencies = TRUE, | ||
upgrade=FALSE, | ||
build_vignettes = TRUE) | ||
) | ||
|
||
# # Install from binary file | ||
# remove.packages("NVIdb") | ||
# install.packages(pkgs = paste0(getwd(), "/..", "/NVIdb_", version, ".tar.gz"), | ||
# type = "source", | ||
# repos = NULL) | ||
|
||
# install.packages(paste0(getwd(), "/..", "/NVIdb_", version, ".zip"), | ||
# repos = NULL, | ||
# type = "binary") | ||
|
||
help(package="NVIdb") | ||
library(NVIdb) | ||
|