Skip to content

Commit

Permalink
Merge pull request #30 from PetterHopp/main
Browse files Browse the repository at this point in the history
NVIdb v0.11.0
  • Loading branch information
PetterHopp authored Jan 24, 2024
2 parents 3f659a6 + 93f4e3d commit 5be4e9d
Show file tree
Hide file tree
Showing 85 changed files with 3,200 additions and 1,658 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# RStudio files
.Rproj.user/


# produced vignettes
vignettes/*.html
vignettes/*.pdf
Expand All @@ -40,7 +39,3 @@ vignettes/*.pdf
# R Environment Variables
.Renviron

# Directories that shouldn't be syncronized
nosync/
Meta
.Ruserdata
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ NVIverse packages</td>
<tr class="even">
<td style="text-align: left;">NVIrpackages</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Keeps a table of the R-Packages in
<td style="text-align: left;">Keeps a table of the R packages in
NVIverse</td>
</tr>
</tbody>
Expand Down Expand Up @@ -157,9 +157,11 @@ development guidelines below.

## Development guidelines

If you want to contribute code, you are welcome to do so. Please try to
adhere to some principles and style convention used for
`NVIverse`-packages.
If you want to contribute code, you are welcome to do so. You will find
a description of the code conventions, which have been used, in the
vignette “NVIverse code conventions” in the package `NVIpackager`. A
summary of the principles and style convention used for
`NVIverse`-packages is given below.

- Please limit the number of package dependencies for `NVIdb`. The use
of base functions is much appreciated.
Expand Down
22 changes: 10 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NVIdb
Title: Tools to facilitate the use of NVI's databases
Version: 0.10.1
Date: 2023-05-31
Version: 0.11.0
Date: 2024-01-24
Authors@R:
c(person(given = "Petter",
family = "Hopp",
Expand Down Expand Up @@ -34,29 +34,27 @@ Imports:
DBI,
dplyr,
keyring,
knitr,
magrittr,
odbc,
remotes,
rlang,
rmarkdown,
RODBC,
RPostgreSQL,
R.rsp,
shiny,
snakecase,
stats,
svDialogs,
utils,
NVIcheckmate (>= 0.4.0),
NVIrpackages
NVIcheckmate (>= 0.7.0)
Suggests:
covr,
desc,
devtools,
knitr,
R.rsp,
remotes,
rmarkdown,
spelling,
testthat,
tibble,
NVIpackager
NVIpackager,
NVIrpackages
Remotes:
NorwegianVeterinaryInstitute/NVIcheckmate,
NorwegianVeterinaryInstitute/NVIrpackages,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2021, Norwegian Veterinary Institute
Copyright (c) 2021 - 2024 Norwegian Veterinary Institute
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export(read_sonetilhorighet)
export(read_varekode)
export(remove_PAT)
export(remove_credentials)
export(retrieve_PJSdata)
export(select_PJSdata_for_value)
export(set_PAT)
export(set_credentials)
export(set_credentials_EOS)
Expand All @@ -58,5 +60,5 @@ export(set_disease_parameters)
export(standardize_PJSdata)
export(standardize_columns)
export(standardize_eos_data)
export(transform_code_combinations)
importFrom(magrittr,"%>%")
importFrom(rlang,.data)
43 changes: 34 additions & 9 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,41 +1,66 @@
NVIdb 0.10.1 - (2023-05-31)
NVIdb 0.11.0 - (2024-01-24)
----------------------------------------

New features:

- add_PJS_code_description is extended so that analytt and kjennelse at sakskonklusjon-level can be translated when using the arguments `PJS_variable_type` = "auto" and `new_column` = "auto".
- Created `retrieve_PJS_data` to retrieve and standardisation of PJSdata.

- Created `transform_code_values` to easy transform few code combinations into other values.

- Created `select_PJSdata_for_values` to perform inclusion/exclusion of rows in PJSdata based on coded values. For codes ending with "%", sub levels are included.

- `read_Prodtilskudd` now accepts the argument `exctracted_date`.

- The PJS- and EOS-wrappers for the login functions `login`, `login_by_credentials` and `login_by_input` now accepts arguments to be passed to the parent functions. Thereby, one may change login information for the databases PJS and EOS by modifying the scripts until a new version of the package `NVIconfig` is available and installed.


Bug fixes:

-
- Corrected `read_varekode` so accepts old source files in latin1.


Other changes:

- Improved help by standardising argument description for a few functions.
- Modified help for several functions.

- Modified `set_disease_parameters` to make the name of the input arguments easier to comprehend. New arguments are `analytt2delete`, `include_missing_art` and `selection_parameters`. The argument `selection_parameters` accepts both a "purpose" file and a list (as generated by as `set_disease_parameters`) as input.


BREAKING CHANGES:

-
- In `set_disease_parameters` the arguments `missing_art` and `file` is deprecated. These are replaced by `include_missing_art` and `selection_parameters`, respectively. If using the old arguments, the input will be transferred to the new arguments.

- `set_PAT`, `get_PAT`, and `remove_PAT` was deprecated.These should be replaced by corresponding functions in package `gitcreds`.


NVIdb 0.10.1 - (2023-05-31)
----------------------------------------

New features:

- `add_PJS_code_description` is extended so that analytt and kjennelse at sakskonklusjon-level can be translated when using the arguments `PJS_variable_type` = "auto" and `new_column` = "auto".


Other changes:

- Improved help by standardising argument description for a few functions.


NVIdb 0.10.0 - (2023-04-18)
----------------------------------------

New features:

- Created standardize_eos_data for standardisation of column names etc. in eos-data.
- Created `standardize_eos_data` for standardisation of column names etc. in eos-data.

- set_dir_NVI now accepts argument `slash`. set `slash = FALSE` to remove ending slash.
- `set_dir_NVI` now accepts argument `slash`. set `slash = FALSE` to remove ending slash.

- add_PJS_code_description now accepts the argument `impute_old_when_missing`.
- `add_PJS_code_description` now accepts the argument `impute_old_when_missing`.


Bug fixes:

- add_PJS_code_description now performs back translation also in the case that the code has expired ("utg\u00E5tt").
- `add_PJS_code_description` now performs back translation also in the case that the code has expired ("utg\u00E5tt").


Other changes:
Expand Down
12 changes: 10 additions & 2 deletions R/NVIdb-deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
#' versions of NVIdb only, and may be defunct as soon as the next release.
#' When possible, alternative functions are mentioned. Help pages for
#' deprecated functions are available at \code{help("<function>-deprecated")}.
#' @details \code{add_produsent} was deprecated 2022-05-02 as other properties
#' @details \code{add_produsent} was deprecated from v0.8.0 released 2022-08-25
#' as other properties
#' than 'gjeldende_prodnr8' could not be included without breaking backward
#' compatibility. Use \code{add_produsent_properties} instead and ensure
#' to set the parameter \code{impute_old_when_missing = TRUE} when translating
#' from "prodnr8" to "gjeldende_prodnr8" and set the parameter
#' \code{impute_old_when_missing = FALSE} when translating from "prodnr8" to
#' other properties.
#'
#' \code{set_PAT}, \code{get_PAT}, and \code{remove_PAT} was deprecated from
#' v0.11.0 released 2023-09-22. The functions were never taken into use.
#' Functions from the much better package \code{gitcreds} should be used instead.
#'
#' @param \dots (arguments)
#' @return (results)
#' @name NVIdb-deprecated
Expand All @@ -20,6 +25,9 @@
#'
#' @examples
#' \dontrun{
#' add_produsent(...) ### -- use \code{\link{add_produsent_properties}} instead
#' add_produsent(...) ### -- use \code{\link{add_produsent_properties}} instead.
#' set_PAT(...) ### -- use \code{\link{gitcreds::gitcreds_set}} instead.
#' get_PAT(...) ### -- use \code{\link{gitcreds::gitcreds_get}} instead.
#' remove_PAT(...) ### -- use \code{\link{gitcreds::gitcreds_delete}} instead.
#' }
NULL
1 change: 0 additions & 1 deletion R/add_MT_omrader.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,3 @@ add_MT_omrader <- function(data,

# To avoid checking of the variable kommune_fylke as default input argument in the function
utils::globalVariables("komnr_2_MT_omrader")

Loading

0 comments on commit 5be4e9d

Please sign in to comment.