Skip to content

Commit

Permalink
Closes #233 #324 #332 admiraldev miscellanous documentation updates (#…
Browse files Browse the repository at this point in the history
…333)

* docs: #283 update description and news

* closes #286 commit messaging, new r-cmd vignette (#291)

* docs: #286 commit messaging, new r-cmd vignette

* chore: #286 spelling

* docs: #286 squash and merge blurb

* Update vignettes/git_usage.Rmd

Co-authored-by: Zelos Zhu <[email protected]>

* chore: #286 news update

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #271, #213, #260, #240 Documentation Update of get_datasets(); keep_source_vars argument; @family tag; compute_ functions (#287)

* docs: #271 #213 clarify get_datasets and add keep_source_vars to prog strat

* docs: #260 cleanup @family mentions

* docs: #240 add blurb about compute functions

* docs: #271 #213 #240 #260 add news blurb

* adopt suggestion for family/keywords

Co-authored-by: Ben Straub <[email protected]>

* docs #271 adopt get_dataset feedback

* docs: #213 #240 adopt recommendations from PR

* chore: #240 add BMI to WORDLIST for spellcheck

* chore: #271 #213 #260 adopt feedback

---------

Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>

* Closes #264, #288 cleanup assertions and continue deprecation process (#289)

* feat: #288 cleanup deprecation process

* feat: #264 deprecate assert_function

* test: #264 cleanup some tests in assert_function, confused how others would go

* test: #264 rewrite tests in a more logical way

* chore: #264 run styler/lintr

* chore: #288 revert back to devel test file

* chore: #288 properly fix assert_order_vars again

* feat: #264 begin deprecation of redundant assertions

* feat: #288 deprecate assert_named_exprs

* deprecate assert_has_variables properly #264

* chore: #264 run styler

* docs: #264 add blurb in news for the deprecated assertions

* chore: #264 fix description version and remove deprecated examples

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Propagate renv.lock from pharmaverse/admiralci (#294)

renv update from pharmaverse/admiralci

Co-authored-by: dgrassellyb <[email protected]>

* Closes #22 #181 #201 #292 #298 Variety of small-scale general documentation updates (#303)

* feat: #22 add documentation to friendly_type_of

* feat: #181 add the appropriate URL

* feat: #201 #292 add documentation about PR guidance and codeowners

* chore: update wordlist for codeowners

* chore: add NEWS

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #302 Adding Snapshot testing guidance to unit testing vignette (#308)

* Update unit_test_guidance.Rmd

* Update NEWS.md

* Update NEWS.md

* Closes #301:  (#307)

* #301: edoardo added as author, and author/contributor distinction implemented as in core admiral package

* #301 chore: document

* Propagate renv.lock from pharmaverse/admiralci (#310)

* renv / codespaces update from pharmaverse/admiralci

---------

Co-authored-by: galachad <[email protected]>
Co-authored-by: Adam Foryś <[email protected]>

* Closes #295 template documentation@devel (#300)

* #295 set up package extension guidance page

* #295 fix vignetteindexentry

* #295 chore: spellcheck

* #295 chore: fix encoding issues in vignettes that prevented package from being built

* #295: updates following review

* #295 Chore: spellcheck

* Update vignettes/package_extensions.Rmd

Co-authored-by: Ross Farrugia <[email protected]>

* #295 update to refer to admiraldev devel site

* #295 Chore: spellcheck

---------

Co-authored-by: Ross Farrugia <[email protected]>

* Closes #296 document_missing_value_s@devel (#311)

* #296 - `missing_value` and `missing_values` added to the table of common arguments.

* #296 - add in discussion of when to use singular vs plural arguments to programming strategy.

* #296 - run checks required for PR and update NEWS.md.

* #296 - Update according to requested changes.

* #296 - revert the 'wrapped' changes in the programming strategy vignette

* #296 - re-insert the new text into the programming strategy vignette, altered according to changes requested.

* #296 - update NEWS.md with changes requested and run the required checks for PR.

* Closes #282: Test Data Guidance vignette (#293)

* #282: add test_data_guidance.Rmd, copy from admiraldata README devel

* #282: update .yml

* #282: add link for packages, remove SDTM, add naming conventions for program name

* #282 spelling

* #282: link to two data packages

* #282: updated wordlist

* #282: update pharmaverseadam description

---------

Co-authored-by: Edoardo Mancini <[email protected]>

* Propagate renv.lock from pharmaverse/admiralci (#314)

renv / codespaces update from pharmaverse/admiralci

Co-authored-by: galachad <[email protected]>

* Propagate renv.lock from pharmaverse/admiralci (#315)

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

---------

Co-authored-by: galachad <[email protected]>

* Closes #306 argument descriptions added to table (#320)

argument descriptions added to table

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #316 remove messaging that includes "-" as year not handled (#317)

* feat: #316 remove messaging that includes "-" as year not handled

* feat: #316 replace warning message

* chore: #316 fix warning message and typos

* chore: #316 add news blurb

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #318 #321 Documentation updates around admiral.test, staged dependencies, and function arguments (#323)

* Fix hardcoded URL (#326)

Resolves #325

* Closes #312 breakup wall of text (#319)

* brick in the wall

* remove special characters from image name

* remove special characters from image name

* replaced iframe with png

* fixed image reference

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #328 add missing news entries (#329)

* feat: #295 add missing news entries

* feat: #295 add missing news entries

* fixed it

* feat: add news entry for #306

* chore: #312 missing reference

* chore: fix link that pointed to merged branch and use devel

* Update NEWS.md

---------

Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>

* feat: #233 documentation for quoting

* feat: #324 add footnotes blurb

* feat: #332 add blurb for roxygen standardization

* feat: #233 #324 #332 adopt feedback

* italicize phrase

* skip line to make markdown look correct

* chore: run use_verion("dev")

* feat: adding post-release cleanup stuff too

* forgot line

* accidental push

* chore: fix tests

* always is only a `deprecate_warn()` argument

* .github folder updates

* yaml syntax

* fix link

---------

Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>
Co-authored-by: pharmaverse-bot <[email protected]>
Co-authored-by: dgrassellyb <[email protected]>
Co-authored-by: Daniel Sjoberg <[email protected]>
Co-authored-by: Edoardo Mancini <[email protected]>
Co-authored-by: galachad <[email protected]>
Co-authored-by: Adam Foryś <[email protected]>
Co-authored-by: Ross Farrugia <[email protected]>
Co-authored-by: Sophie Shapcott <[email protected]>
Co-authored-by: Kangjie Zhang <[email protected]>
Co-authored-by: StefanThoma <[email protected]>
Co-authored-by: cicdguy <[email protected]>
  • Loading branch information
14 people authored Oct 11, 2023
1 parent cac2e41 commit aafdf33
Show file tree
Hide file tree
Showing 40 changed files with 315 additions and 377 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Please check off each taskbox as an acknowledgment that you completed the task o
- [ ] Update to all relevant roxygen headers and examples, including keywords and families. Refer to the [categorization of functions](https://pharmaverse.github.io/admiraldev/devel/articles/programming_strategy.html#categorization-of-functions) to tag appropriate keyword/family.
- [ ] Run `devtools::document()` so all `.Rd` files in the `man` folder and the `NAMESPACE` file in the project root are updated appropriately
- [ ] Address any updates needed for vignettes and/or templates
- [ ] Update `NEWS.md` if the changes pertain to a user-facing function (i.e. it has an `@export` tag) or documentation aimed at users (rather than developers)
- [ ] Update `NEWS.md` under the header `# admiral (development version)` if the changes pertain to a user-facing function (i.e. it has an `@export` tag) or documentation aimed at users (rather than developers)
- [ ] Build admiral site `pkgdown::build_site()` and check that all affected examples are displayed correctly and that all new functions occur on the "[Reference](https://pharmaverse.github.io/admiraldev/devel/reference/index.html)" page.
- [ ] Address or fix all lintr warnings and errors - `lintr::lint_package()`
- [ ] Run `R CMD check` locally and address all errors and warnings - `devtools::check()`
- [ ] Link the issue in the Development Section on the right hand side.
- [ ] Address all merge conflicts and resolve appropriately
- [ ] Address all merge conflicts and resolve appropriately
- [ ] Pat yourself on the back for a job well done! Much love to your accomplishment!
2 changes: 2 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
check:
name: Check
uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main
with:
error-on: warning # TODO: find a way to ignore specific notes
if: github.event_name == 'pull_request'
docs:
name: Documentation
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: admiraldev
Type: Package
Title: Utility Functions and Development Tools for the Admiral Package Family
Version: 0.5.0
Version: 0.5.0.9000
Authors@R: c(
person("Ben", "Straub", email = "[email protected]", role = c("aut", "cre")),
person("Stefan", "Bundfuss", role = "aut"),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export(assert_named)
export(assert_named_exprs)
export(assert_numeric_vector)
export(assert_one_to_one)
export(assert_order_vars)
export(assert_param_does_not_exist)
export(assert_s3_class)
export(assert_same_type)
Expand Down
20 changes: 20 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# admiraldev (development version)

## New Features

## Updates of Existing Functions

## Breaking Changes

- The following functions have been deprecated from previous admiral versions using the next phase of the deprecation process
- `assert_function_param()`
- `assert_named_expr()`
- `assert_has_variables()`

## Documentation

- New documentation in programming strategy around quoting/expressions and standardizing roxygen texts (#233, #332)
- New documentation on how to use footnotes when writing vignettes (#324)

## Various

# admiraldev 0.5.0

## New Features
Expand Down
64 changes: 13 additions & 51 deletions R/assertions.R
Original file line number Diff line number Diff line change
Expand Up @@ -518,36 +518,6 @@ assert_vars <- function(arg, expect_names = FALSE, optional = FALSE) {
assert_list_of(arg, "symbol", named = expect_names, optional = optional)
}

#' Is an Argument a List of Order Variables?
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' This function is *deprecated*, please use `assert_expr_list()` instead.
#'
#' Checks if an argument is a valid list of order variables/expressions created
#' using `exprs()`
#'
#' @param arg A function argument to be checked
#' @param optional Is the checked argument optional? If set to `FALSE` and `arg`
#' is `NULL` then an error is thrown
#'
#'
#' @return
#' The function throws an error if `arg` is not a list of variables or
#' expressions created using `exprs()` and returns the input invisibly
#' otherwise.
#'
#' @export
#'
#' @keywords deprecated
#' @family deprecated
assert_order_vars <- function(arg, optional = FALSE) {
assert_logical_scalar(optional)

deprecate_stop("0.4.0", "assert_order_vars()", "assert_expr_list()")
}

#' Is an Argument an Integer Scalar?
#'
#' Checks if an argument is an integer scalar
Expand Down Expand Up @@ -885,8 +855,7 @@ assert_named <- function(arg, optional = FALSE) {
#'
#' @export
assert_named_exprs <- function(arg, optional = FALSE) {
deprecate_warn("0.5.0", "assert_named_exprs()", "assert_expr_list()", always = TRUE)
assert_expr_list(arg = arg, named = TRUE)
deprecate_stop("0.5.0", "assert_named_exprs()", "assert_expr_list()")
}

#' Does a Dataset Contain All Required Variables?
Expand All @@ -910,26 +879,14 @@ assert_named_exprs <- function(arg, optional = FALSE) {
#' @keywords deprecated
#' @family deprecated
assert_has_variables <- function(dataset, required_vars) {
deprecate_warn("0.5.0", "assert_has_variables()", "assert_data_frame()")
assert_data_frame(
arg = dataset,
required_vars = set_names(
exprs(!!!syms(required_vars)),
names(required_vars)
)
)
deprecate_stop("0.5.0", "assert_has_variables()", "assert_data_frame()")
}

#' Is Argument a Function?
#'
#' Checks if the argument is a function and if all expected arguments are
#' provided by the function.
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' This function is *deprecated*, please use `assert_function_param()` instead.
#'
#' @param arg A function argument to be checked
#'
#' @param params A character vector of expected argument names
Expand All @@ -948,8 +905,9 @@ assert_has_variables <- function(dataset, required_vars) {
#'
#' @export
#'
#' @keywords deprecated
#' @family deprecated
#' @keywords assertion
#' @family assertion
#'
#' @examples
#' example_fun <- function(fun) {
#' assert_function(fun, params = c("x"))
Expand Down Expand Up @@ -1001,20 +959,24 @@ assert_function <- function(arg, params = NULL, optional = FALSE) {

#' Assert Argument is a Parameter of a Function
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' This function is *deprecated*, please use `assert_function()` instead.
#'
#' @param arg The name of a function passed as a string
#' @param params A character vector of function parameters
#'
#' @keywords assertion
#' @family assertion
#' @keywords deprecated
#' @family deprecated
#'
#' @return
#' The function throws an error if any elements of `params` is not an argument of
#' the function given by `arg`
#'
#' @export
assert_function_param <- function(arg, params) {
deprecate_warn("0.5.0", "assert_function_param()", "assert_function()", always = TRUE)
assert_function(arg = arg, params = params)
deprecate_stop("0.5.0", "assert_function_param()", "assert_function()")
}

#' Asserts That a Parameter is Provided in the Expected Unit
Expand Down
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ articles:
test_data_guidance: test_data_guidance.html
unit_test_guidance: unit_test_guidance.html
writing_vignettes: writing_vignettes.html
last_built: 2023-08-24T20:45Z
last_built: 2023-09-22T17:42Z
urls:
reference: https://pharmaverse.github.io/admiraldev/devel/reference
article: https://pharmaverse.github.io/admiraldev/devel/articles
Expand Down
2 changes: 1 addition & 1 deletion man/assert_atomic_vector.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_character_scalar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_character_vector.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_data_frame.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_date_vector.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_expr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_expr_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_filter_cond.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 25 additions & 11 deletions man/assert_function.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 8 additions & 26 deletions man/assert_function_param.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/assert_has_variables.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_integer_scalar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_list_element.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_list_of.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_logical_scalar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aafdf33

Please sign in to comment.