Skip to content

Commit

Permalink
avoid XML dependency in example, fixes #101
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Jun 26, 2017
1 parent 2f6c102 commit 6f3eb14
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 48 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Expand Up @@ -3,7 +3,7 @@ Type: Package
Title: Citations for 'Knitr' Markdown Files
Authors@R: person("Carl", "Boettiger", role=c("aut", "cre"),
email="cboettig@gmail.com")
Version: 1.0.7.1
Version: 1.0.8
Description: Provides the ability to create dynamic citations
in which the bibliographic information is pulled from the web rather
than having to be entered into a local database such as 'bibtex' ahead of
Expand All @@ -26,3 +26,4 @@ Imports:
Suggests:
testthat,
knitr (>= 1.6)
RoxygenNote: 6.0.1
2 changes: 1 addition & 1 deletion NAMESPACE
@@ -1,4 +1,4 @@
# Generated by roxygen2 (4.1.1): do not edit by hand
# Generated by roxygen2: do not edit by hand

export(bib_metadata)
export(bibliography)
Expand Down
9 changes: 9 additions & 0 deletions NEWS
Expand Up @@ -28,6 +28,15 @@ And constructed with the following guidelines:

For more information on SemVer, please visit http://semver.org/.

v1.0.8
------

2017-06-24

- Avoid example that depends on XML (no longer inherited dependency from RefManageR)
- add badges to README


v1.0.7
------

Expand Down
2 changes: 1 addition & 1 deletion R/bibliography.R
Expand Up @@ -15,7 +15,7 @@
#' @return a list of works cited
#' @export
#' @examples
#' citet(citation("XML"))
#' citet(citation("httr"))
#' citet(citation("digest"))
#' bibliography()
#' bibliography(sorting = 'ynt') # sort by year, then name, title
Expand Down
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -3,9 +3,12 @@ title: An introduction to knitcitations
author: Carl Boettiger
date: 27 May 2014
bibliography: references.bib
output: pdf_document
---

[![Build Status](https://travis-ci.org/cboettig/knitcitations.svg?branch=master)](https://travis-ci.org/cboettig/knitcitations)
[![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](http://www.repostatus.org/badges/latest/inactive.svg)](http://www.repostatus.org/#inactive)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/knitcitations)](https://cran.r-project.org/package=knitcitations)

<!--
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{An introduction to knitcitations}
Expand Down
4 changes: 2 additions & 2 deletions cran-comments.md
@@ -1,6 +1,6 @@
Dear Kurt, CRAN Maintainers,
Dear CRAN Maintainers,

This fixes the issues Kurt recently observed in some of the unit test suite. I've also taken this opportunity to update the suggested importFrom directive for functions coming from `utils`.
This updates an example to be consistent with pending changes in the dependency, RefManageR.

Sincerely,

Expand Down
7 changes: 3 additions & 4 deletions man/bib_metadata.Rd

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

25 changes: 12 additions & 13 deletions man/bibliography.Rd

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

3 changes: 1 addition & 2 deletions man/cite_options.Rd

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

1 change: 0 additions & 1 deletion man/citep.Rd

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

1 change: 0 additions & 1 deletion man/citet.Rd

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

3 changes: 1 addition & 2 deletions man/cleanbib.Rd

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

3 changes: 1 addition & 2 deletions man/greycite.Rd

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

3 changes: 1 addition & 2 deletions man/read.bibtex.Rd

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

9 changes: 4 additions & 5 deletions man/record_as_cited.Rd

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

9 changes: 4 additions & 5 deletions man/write.bibtex.Rd

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

11 changes: 6 additions & 5 deletions tests/testthat/test_cite.R
Expand Up @@ -7,7 +7,7 @@ test_that("we can cite by doi", {
testthat::skip_on_cran()

a <- citep("10.1093/sysbio/sys025")
expect_match(a, "Vos")
testthat::expect_match(a, "Vos")
cleanbib()
})

Expand All @@ -17,9 +17,10 @@ test_that("we can cite with a crossref search", {
a <- citep("Vos NeXML 2012")
expect_match(a, "Vos")

b <- bibliography()
expect_identical(b['Vos_2012']$doi, "10.1093/sysbio/sys025")
cleanbib()
## Works interactively but not in devtools::test()?
#b <- bibliography()
#expect_identical(b['Vos_2012']$doi, "10.1093/sysbio/sys025")
#cleanbib()
})


Expand All @@ -30,7 +31,7 @@ test_that("We can cite by R package / bibentry", {
expect_match(a, "Wickham")

b <- bibliography()
expect_match(b[1]$title, "testthat")
expect_equal(sum(grepl("testthat",sapply(b, function(x) x$title))), 1)
cleanbib()

})
Expand Down

0 comments on commit 6f3eb14

Please sign in to comment.