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

Hand GitHub handling over to gh. #101

Merged
merged 10 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 0 additions & 5 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ jobs:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
# use 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: '4.1'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
19 changes: 12 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ Package: tidytuesdayR
Title: Access the Weekly 'TidyTuesday' Project Dataset
Version: 1.0.3.9000
Authors@R: c(
person("Ellis", "Hughes", , "[email protected]", role = c("aut", "cre")),
person("Jon", "Harmon", , "[email protected]", role = "ctb"),
person("Jon", "Harmon", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-4781-4346")),
person("Ellis", "Hughes", , "[email protected]", role = "aut"),
person("Thomas", "Mock", , "[email protected]", role = "ctb"),
person("Data Science Learning Community", , , "[email protected]", role = "dtc")
)
Expand All @@ -20,25 +21,29 @@ BugReports: https://github.com/thebioengineer/tidytuesdayR/issues
Depends:
R (>= 3.4.0)
Imports:
httr,
cli,
gh,
glue,
jsonlite,
lubridate (>= 1.7.0),
magrittr,
purrr (>= 0.2.5),
purrr (>= 1.0.0),
readr (>= 1.0.0),
readxl (>= 1.0.0),
rlang,
rstudioapi (>= 0.2),
rvest (>= 0.3.2),
tidyr,
tools (>= 3.1.0),
usethis,
xml2 (>= 1.2.0)
Suggests:
covr,
pkgdown,
readxl (>= 1.0.0),
rstudioapi (>= 0.2),
testthat (>= 3.0.0),
tibble,
withr
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Config/testthat/edition: 3
34 changes: 1 addition & 33 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ S3method(print,tt)
S3method(print,tt_data)
S3method(print,tt_dataset_table)
S3method(print,tt_dataset_table_list)
S3method(tt_gh_error,response)
S3method(tt_gh_error,tt_response)
export("%>%")
export(github_pat)
export(last_tuesday)
export(rate_limit_check)
export(readme)
export(tt_available)
export(tt_datasets)
Expand All @@ -18,40 +14,12 @@ export(tt_download_file)
export(tt_load)
export(tt_load_gh)
export(use_tidytemplate)
importFrom(httr,GET)
importFrom(httr,add_headers)
importFrom(jsonlite,base64_dec)
importFrom(jsonlite,base64_enc)
importFrom(jsonlite,parse_json)
importFrom(lubridate,as_date)
importFrom(lubridate,day)
importFrom(lubridate,is.Date)
importFrom(lubridate,month)
importFrom(glue,glue)
importFrom(lubridate,today)
importFrom(lubridate,wday)
importFrom(lubridate,year)
importFrom(lubridate,ymd)
importFrom(magrittr,"%>%")
importFrom(purrr,map)
importFrom(purrr,walk)
importFrom(readr,read_delim)
importFrom(readxl,read_xls)
importFrom(readxl,read_xlsx)
importFrom(rlang,"%||%")
importFrom(rstudioapi,isAvailable)
importFrom(rstudioapi,viewer)
importFrom(rvest,html_node)
importFrom(rvest,html_nodes)
importFrom(rvest,html_table)
importFrom(stats,aggregate)
importFrom(stats,na.omit)
importFrom(stats,na.pass)
importFrom(stats,setNames)
importFrom(tools,file_ext)
importFrom(tools,file_path_sans_ext)
importFrom(usethis,use_template)
importFrom(utils,URLencode)
importFrom(utils,browseURL)
importFrom(utils,read.csv)
importFrom(xml2,read_html)
importFrom(xml2,write_html)
14 changes: 10 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# tidytuesdayR (1.0.3 version)
* [bug fix] Address case where when trying to test
# tidytuesdayR (development version)

# tidytuesdayR (1.0.2 version)
* [maintenance] tidytuesdayR now uses the {gh} package to manage all interactions with the GitHub API. This should make the package more stable and easier to maintain. (@jonthegeek, #78)


# tidytuesdayR 1.0.3

* [bug fix] Address case where rate limit hit when trying to test

# tidytuesdayR 1.0.2

* [bug fix] During testing it was identified that 502 errors from github servers would cause the code to error out. Now it will retry a few times before giving an error.
* [bug fix] No internet connection bug on rstudio resolved to due malformed url checks (https).
* [bug fix] No internet connection bug on rstudio resolved due to malformed url checks (https).
* [bug fix] Partial argument matching correction in `tt_download_file.character()`, `tt_parse_blob()`, and in tests. (thanks @mgirlich)

# tidytuesdayR 1.0.1
Expand Down
17 changes: 17 additions & 0 deletions R/aaa-shared.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#' Parameters used in multiple functions
#'
#' Reused parameter definitions are gathered here for easier editing.
#'
#' @param auth A GitHub token. See [gh::gh_token()] for more details.
#' @param tt A `tt` object, output from [tt_load_gh()].
#' @param files Which file names to download. Default "All" downloads all files
#' for the specified week.
#' @param week Which week number to use within a given year. Only used when `x`
#' is a valid year.
#' @param x The date of data to pull (in "YYYY-MM-dd" format), or the four-digit
#' year as a number.
#' @param year What year of TidyTuesday to use
#'
#' @name shared-params
#' @keywords internal
NULL
Loading