Skip to content

Commit

Permalink
bump version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
luisDVA committed Jan 24, 2024
1 parent d5ed1a7 commit a9ee926
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
^codecov\.yml$
^cran-comments\.md$
^CRAN-SUBMISSION$
^doc$
^Meta$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.RData
.Ruserdata
inst/doc
/doc/
/Meta/
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
Package: annotater
Title: Annotate Package Load Calls
Version: 0.2.2
Authors@R:
Authors@R: c(
person(given = "Luis D.",
family = "Verde Arregoitia",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0001-9520-6543"))
comment = c(ORCID = "0000-0001-9520-6543")),
person("Juan","Cruz Rodriguez",role="ctb"),
person("Hadley","Wickham",role="ctb"))
Description: Provides non-invasive annotation of package load calls
such as \code{library()}, \code{p_load()}, and \code{require()} so that we can have an idea of what
the packages we are loading are meant for.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Imports:
stringr,
purrr,
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# annotater 0.2.3

* Fix failing tests
* Better annotations for packages installed from R-universe
* Dataset annotation added
* Modern tidyselect syntax (thanks to PR by Hadley Wickham)

# annotater 0.2.2

* Bug fixes
Expand Down
3 changes: 2 additions & 1 deletion R/annotate_fun_calls.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#' @return text string with function call annotations. Will make note of
#' packages not currently installed. Lines with existing comments or
#' annotations are ignored by the regular expression that matches package
#' names.
#' names. Be aware that package-specific methods (e.g., print or summary
#' methods) will be annotated too.
#'
#' @examples
#' test_string <- c("library(boot)\nrequire(lattice)\ncanonical.theme()")
Expand Down
3 changes: 2 additions & 1 deletion R/annotate_repostitle.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ annotate_repostitle <- function(string_og) {
"CRAN" ~ "CRAN",
.data$repo == "Bioconductor" ~ "Bioconductor",
.data$repo == "none" ~ "not installed on this machine",
str_detect(.data$repo,"universe")~.data$repo,# for Runiverse pkgs
TRUE ~ repo_details(.data$pkgname_clean)
), annotation = dplyr::case_when(stringr::str_detect(
user_repo,
"/"
"/(?!.+r-universe.+)"
) ~ paste0("[", .data$repo, "::", user_repo, "]"), TRUE ~ user_repo))
pck_descs <- dplyr::mutate(pck_descs, version = pkg_version(gsub("[\'\"]", "", .data$package_name)))

Expand Down
2 changes: 2 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Thanks to [Juan Cruz Rodriguez](https://github.com/jcrodriguez1989), we can now

<img src='https://raw.githubusercontent.com/luisdva/annotater/master/inst/media/jcruz.gif' align="center" width="400px" />

As of version 0.2.3, loaded datasets can also be added as annotations.

## `pacman` compatibility

Users of the [`pacman`](https://cran.r-project.org/package=pacman) package can now use all `annotater` functions on `p_load` calls. This includes calls with multiple package names (e.g. `p_load(ggplot2,purrr)`), which will be split up across lines for readability.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ script.

<img src='https://raw.githubusercontent.com/luisdva/annotater/master/inst/media/jcruz.gif' align="center" width="400px" />

As of version 0.2.3, loaded datasets can also be added as annotations.

## `pacman` compatibility

Users of the [`pacman`](https://cran.r-project.org/package=pacman)
Expand Down
3 changes: 2 additions & 1 deletion man/annotate_fun_calls.Rd

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

6 changes: 6 additions & 0 deletions man/annotater-package.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-overall-annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ library(stringi)"
)
expect_match(
annotate_repo_source(test_string),
"p_load.*tidyr\\s*# CRAN v.*library.stringi.*CRAN v.*"
"p_load.*tidyr\\s*# .+ v.*library.stringi.* .+ v.*"
)
})

Expand Down

0 comments on commit a9ee926

Please sign in to comment.