Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #419 migrate addin_format_testthat addin to pharmaverse4devs #449

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ strategy. (#353)

- Increased minimum R version required to 4.0 to match {admiral}. (#382)

- `addin_format_testthat` addin has been moved to `{pharmaverse4devs}` package. (#419)


# admiraldev 1.0.0

Expand Down
107 changes: 0 additions & 107 deletions R/addin_format_testthat.R

This file was deleted.

4 changes: 0 additions & 4 deletions inst/rstudio/addins.dcf

This file was deleted.

49 changes: 0 additions & 49 deletions tests/testthat/test-addin_format_testthat.R

This file was deleted.

2 changes: 1 addition & 1 deletion vignettes/admiraldev.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Tools are loosely defined as follows:

* Utility Functions used in `{admiral}` and `{admiral}` extension functions for doing custom checks and providing custom messages, warnings and errors. These custom messages, warnings and errors are succinct, but helpful messaging around what a function expects as inputs. The inputs to admiral functions are many, but generally fit into three categories: datasets, variables and arguments. Most of the functions start with `assert_`, `is_` or `get_`.

* Addins and utility functions that help with documentation, testing and checking on health of the code base in all admiral packages.
* Utility functions that help with documentation, testing and checking on health of the code base in all admiral packages.

* Vignettes on working on `{admiral}` functions, developing unit testing, releases process, vignette writing and other documentation needs. These vignettes are intended for use across all admiral packages.

Expand Down
Binary file modified vignettes/unit_test_format_tests.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions vignettes/unit_test_guidance.Rmd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like all this can stay in and just point out that a developer has to devtools::install_github() to get the addin.

Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,21 @@ knitr::include_graphics("./unit_test_toc.png")
```


## Addin `admiraldev::format_test_that_file()`
## Addin `pharmaverse4devs::format_test_that_file()`

To ease the burden on developers for writing and adding tests we have developed an Addin for formatting test_that test files according to admiral programming standards. The Addin will add and update comments as well as number or re-numbers the tests. Just use the Addin button and select the "Format
To ease the burden on developers for writing and adding tests we have developed an Addin for formatting test_that test files according to admiral programming standards. The Addin will add and update comments as well as number or re-numbers the tests. To access the Addin, be sure to install the {pharmaverse4devs} from Github.

To install the latest development version of the package directly from
GitHub use the following code:
```r
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}

remotes::install_github("pharmaverse/pharmaverse4devs")
```

Then use the Addin button and select the "Format
test_that test file" as seen in the image. Be sure to have the test-file open and selected when calling the Addin.

```{r echo=FALSE, out.width='120%'}
Expand Down
Loading