Skip to content

Commit

Permalink
fix import and docs closes #86 opens #96
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheld83 committed Aug 3, 2021
1 parent b1ec73e commit 3f3486a
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Check
run: |
shinytest::installDependencies()
devtools::check(document = FALSE, error_on = "error")
devtools::check(document = FALSE)
- name: Test Coverage
run: covr::codecov()
- name: Build Package Website
Expand Down
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ Suggests:
memoise (>= 2.0.0),
cachem (>= 1.0.4),
httptest (>= 4.0.0),
shinyjs (>= 2.0.0)
shinyjs (>= 2.0.0),
htmlwidgets (>= 1.5.3)
Remotes:
subugoe/[email protected],
subugoe/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export(is_doi_from_ra)
export(is_doi_ish)
export(is_doi_resolvable)
export(regex_doi)
export(renderView_doi_matches)
export(resolve_doi)
export(str_extract_all_doi)
export(str_extract_doi)
export(view_doi_matches)
export(view_doi_matchesOutput)
import(vctrs)
14 changes: 11 additions & 3 deletions R/doi.R
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,17 @@ one_doi <- function(value) {

#' View HTML rendering of matched DOIs
#' htmlwidget to show how DOIs are matched in strings.
#'
#' @details
#' Highlighting DOIs matching the regular expression
#' can help users troubleshoot their input,
#' for example inside shiny apps.
#'
#' @inheritParams stringr::str_view_all
#' @examples
#' view_doi_matches("lorem ipsum 10.1000/foo dolor ist 10.1000/bar")
#' @family doi
#' @noRd
#' @export
view_doi_matches <- function(string) {
stringr::str_view_all(
string = string,
Expand All @@ -611,7 +619,7 @@ view_doi_matches <- function(string) {
#' @describeIn view_doi_matches
#' Shiny output widget to show matched DOIs
#' @inheritParams htmlwidgets::shinyWidgetOutput
#' @noRd
#' @export
view_doi_matchesOutput <- function(outputId, width = "100%", height = "auto") {
require_namespace2("htmlwidgets")
htmlwidgets::shinyWidgetOutput(
Expand All @@ -626,7 +634,7 @@ view_doi_matchesOutput <- function(outputId, width = "100%", height = "auto") {
#' @describeIn view_doi_matches
#' Shiny render function to show matched DOIs
#' @inheritParams htmlwidgets::shinyRenderWidget
#' @noRd
#' @export
renderView_doi_matches <- function(expr, env = parent.frame(), quoted = FALSE) {
require_namespace2("htmlwidgets")
if (!quoted) {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

In bibliometric analysis, we frequently work with specialised identifiers, such as [Digital Object Identifiers (DOIs)](https://www.doi.org) or [Research Organisation Registry IDs (RORs)](https://ror.org).
The goal of biblids is to help you work with these identifiers.

## Vctrs S3 Classes

Biblids implements bibliometric identifiers as S3 classes based on the [vctrs](https://vctrs.r-lib.org) package.
Expand Down
3 changes: 2 additions & 1 deletion man/doi.Rd

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

3 changes: 2 additions & 1 deletion man/doiEntry.Rd

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

3 changes: 2 additions & 1 deletion man/doi_api.Rd

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

3 changes: 2 additions & 1 deletion man/doi_examples.Rd

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

3 changes: 2 additions & 1 deletion man/doi_ra.Rd

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

3 changes: 2 additions & 1 deletion man/regex_doi.Rd

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

68 changes: 68 additions & 0 deletions man/view_doi_matches.Rd

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

0 comments on commit 3f3486a

Please sign in to comment.