Skip to content

Commit

Permalink
Merge pull request #297 from cmu-delphi/use-delphidocs
Browse files Browse the repository at this point in the history
Use delphidocs
  • Loading branch information
dajmcdon authored Nov 14, 2024
2 parents 0b34808 + a6a4049 commit 0026856
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 66 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIDATR_GHACTIONS_DELPHI_EPIDATA_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -50,9 +50,9 @@ jobs:
run: |
target_ref <- "${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}"
override <- if (target_ref == "main" || target_ref == "refs/heads/main") {
list(development = list(mode = "release", version_label = "light"))
list(development = list(mode = "release"))
} else if (target_ref == "dev" || target_ref == "refs/heads/dev") {
list(development = list(mode = "devel", version_label = "success"))
list(development = list(mode = "devel"))
} else {
stop("Unexpected target_ref: ", target_ref)
}
Expand All @@ -65,7 +65,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env
/doc/
/Meta/
.secrets
epidatr.Rproj
renv.lock
renv/
.Rprofile
.Rprofile
71 changes: 43 additions & 28 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,59 +1,74 @@
Package: epidatr
Type: Package
Package: epidatr
Title: Client for Delphi's 'Epidata' API
Version: 1.2.0
Authors@R:
c(
person("Logan", "Brooks", email = "[email protected]", role = c("aut")),
person("Dmitry", "Shemetov", email = "[email protected]", role = c("aut")),
person("Samuel", "Gratzl", email = "[email protected]", role = c("aut")),
person("David", "Weber", email = "[email protected]", role = c("ctb", "cre")),
person("Nat", "DeFries", role = c("ctb")),
person("Alex", "Reinhart", role = c("ctb")),
person("Daniel", "McDonald", role = c("ctb")),
person("Kean Ming", "Tan", role = c("ctb")),
person("Will", "Townes", role = c("ctb")),
person("George", "Haff", role = c("ctb")),
person("Kathryn", "Mazaitis", role = c("ctb"))
Authors@R: c(
person("Logan", "Brooks", , "[email protected]", role = "aut"),
person("Dmitry", "Shemetov", , "[email protected]", role = "aut"),
person("Samuel", "Gratzl", , "[email protected]", role = "aut"),
person("David", "Weber", , "[email protected]", role = c("ctb", "cre")),
person("Nat", "DeFries", role = "ctb"),
person("Alex", "Reinhart", role = "ctb"),
person("Daniel J.", "McDonald", role = "ctb"),
person("Kean Ming", "Tan", role = "ctb"),
person("Will", "Townes", role = "ctb"),
person("George", "Haff", role = "ctb"),
person("Kathryn", "Mazaitis", role = "ctb")
)
URL: https://cmu-delphi.github.io/epidatr/, https://cmu-delphi.github.io/delphi-epidata/, https://github.com/cmu-delphi/epidatr
BugReports: https://github.com/cmu-delphi/epidatr/issues
Description: The Delphi 'Epidata' API provides real-time access to epidemiological surveillance data for influenza, 'COVID-19', and other diseases for the USA at various geographical resolutions, both from official government sources such as the Center for Disease Control (CDC) and Google Trends and private partners such as Facebook and Change 'Healthcare'. It is built and maintained by the Carnegie Mellon University Delphi research group. To cite this API: David C. Farrow, Logan C. Brooks, Aaron 'Rumack', Ryan J. 'Tibshirani', 'Roni' 'Rosenfeld' (2015). Delphi 'Epidata' API. <https://github.com/cmu-delphi/delphi-epidata>.
Depends: R (>= 3.5.0)
Description: The Delphi 'Epidata' API provides real-time access to
epidemiological surveillance data for influenza, 'COVID-19', and other
diseases for the USA at various geographical resolutions, both from
official government sources such as the Center for Disease Control
(CDC) and Google Trends and private partners such as Facebook and
Change 'Healthcare'. It is built and maintained by the Carnegie Mellon
University Delphi research group. To cite this API: David C. Farrow,
Logan C. Brooks, Aaron 'Rumack', Ryan J. 'Tibshirani', 'Roni'
'Rosenfeld' (2015). Delphi 'Epidata' API.
<https://github.com/cmu-delphi/delphi-epidata>.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
URL: https://cmu-delphi.github.io/epidatr/,
https://cmu-delphi.github.io/delphi-epidata/,
https://github.com/cmu-delphi/epidatr
BugReports: https://github.com/cmu-delphi/epidatr/issues
Depends:
R (>= 3.5.0)
Imports:
cachem,
checkmate,
cli,
httr,
glue,
httr,
jsonlite,
magrittr,
MMWRweek,
purrr,
openssl,
purrr,
rappdirs,
readr,
tibble,
usethis,
xml2
RoxygenNote: 7.3.2
Suggests:
dplyr,
ggplot2,
knitr,
maps,
mapproj,
rmarkdown,
maps,
rlang,
rmarkdown,
testthat (>= 3.1.5),
withr
VignetteBuilder: knitr
Language: en-US
VignetteBuilder:
knitr
Remotes:
cmu-delphi/delphidocs
Config/Needs/website: cmu-delphi/delphidocs
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Collate:
'auth.R'
'avail_endpoints.R'
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The [Delphi Epidata API](https://cmu-delphi.github.io/delphi-epidata/) provides
real-time access to epidemiological surveillance data for influenza, COVID-19,
and other diseases from both official government sources such as the [Centers
for Disease Control and Prevention
(CDC)](https://www.cdc.gov/datastatistics/index.html), private partners such as
(CDC)](https://www.cdc.gov/), private partners such as
[Facebook (now
Meta)](https://delphi.cmu.edu/blog/2020/08/26/covid-19-symptom-surveys-through-facebook/)
and [Change Healthcare](https://www.changehealthcare.com/), and other public
Expand Down Expand Up @@ -79,7 +79,7 @@ pak::pkg_install("epidatr")
pak::pkg_install("cmu-delphi/epidatr@dev")
```

Our CRAN listing is [here](https://cran.r-project.org/web/packages/epidatr/index.html).
Our CRAN listing is [here](https://CRAN.R-project.org/package=epidatr/index.html).

### API Keys

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ The [Delphi Epidata API](https://cmu-delphi.github.io/delphi-epidata/)
provides real-time access to epidemiological surveillance data for
influenza, COVID-19, and other diseases from both official government
sources such as the [Centers for Disease Control and Prevention
(CDC)](https://archive.cdc.gov/), private partners
such as [Facebook (now
(CDC)](https://www.cdc.gov/), private partners such as [Facebook (now
Meta)](https://delphi.cmu.edu/blog/2020/08/26/covid-19-symptom-surveys-through-facebook/)
and [Change Healthcare](https://www.changehealthcare.com/), and other
public datasets like [Google
Expand Down Expand Up @@ -82,7 +81,7 @@ pak::pkg_install("cmu-delphi/epidatr@dev")
```

Our CRAN listing is
[here](https://CRAN.R-project.org/package=epidatr).
[here](https://CRAN.R-project.org/package=epidatr/index.html).

### API Keys

Expand Down
38 changes: 12 additions & 26 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
# Colors should stay consistent across epipredict, epiprocess, and epidatr,
# using Carnegie Red
# https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html

# This is to give a default value to the `mode` parameter in the
# `pkgdown::build_site` function. This is useful when building the site locally,
# as it will default to `devel` mode. In practice, this should all be handled
# dynamically by the CI/CD pipeline.
development:
mode: devel
version_label: success

template:
bootstrap: 5
bootswatch: cosmo
bslib:
font_scale: 1.0
primary: "#C41230"
success: "#B4D43C"
link-color: "#C41230"

navbar:
bg: primary
type: light
package: delphidocs

url: https://cmu-delphi.github.io/epidatr/

home:
links:
- text: Get the Python client
href: https://github.com/cmu-delphi/epidatpy/
- text: View the Delphi Website
href: https://delphi.cmu.edu/
- text: Introduction to Delphi's Tooling Work
href: https://cmu-delphi.github.io/delphi-tooling-book/
- text: The epiprocess R package
href: https://cmu-delphi.github.io/epiprocess/
- text: The epipredict R package
href: https://cmu-delphi.github.io/epipredict/
- text: The epidatasets R package
href: https://cmu-delphi.github.io/epidatasets/
sidebar:
structure: [links, license, community, citation, authors, related, dev]
components:
related:
title: Delphi packages and resources
text: |
* [The epiprocess R package](https://cmu-delphi.github.io/epiprocess/)
* [The epipredict R package](https://cmu-delphi.github.io/epipredict/)
* [The epidatasets R package](https://cmu-delphi.github.io/epidatasets/)
* [Introduction to Delphi's Tooling Work](https://cmu-delphi.github.io/delphi-tooling-book/)
reference:
- title: Data source and signal discovery
Expand Down
20 changes: 20 additions & 0 deletions epidatr.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
2 changes: 1 addition & 1 deletion man/epidatr-package.Rd

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

1 change: 1 addition & 0 deletions tests/testthat/test-request.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("requesting works", {
skip("This site is down.")
res <- do_request("https://httpbin.org/status/414", list(), timeout_seconds = 10 * 60)
expect_equal(res$status_code, 414)
})

0 comments on commit 0026856

Please sign in to comment.