Skip to content

Commit

Permalink
Deploying to gh-pages from @ a1e766d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Oct 28, 2024
1 parent ab0aa14 commit 028e804
Show file tree
Hide file tree
Showing 39 changed files with 143 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
args: [--style_pkg=spaceout, --style_fun=spaceout_style]
additional_dependencies:
- ropensci-review-tools/spaceout
- id: roxygenize
# - id: roxygenize
# codemeta must be above use-tidy-description when both are used
# - id: codemeta-description-updated
- id: use-tidy-description
Expand Down
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gtfsrouter
Title: Routing with 'GTFS' (General Transit Feed Specification) Data
Version: 0.1.2.014
Version: 0.1.2.018
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")),
person("Marcin", "Stepniak", , "marcinstepniak@ucm.es", role = "aut",
Expand All @@ -18,6 +18,7 @@ Depends:
Imports:
cli,
data.table,
fs,
geodist,
methods,
Rcpp (>= 0.12.6)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Minor changes:

- Fix bug with return values of traveltimes (#116; thanks to @FlxPo)
- Use 'fs' package for all file path manipulations.

---

Expand Down
6 changes: 3 additions & 3 deletions R/extract-gtfs.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ unzip_gtfs <- function (filename, quiet = FALSE) {
)
}

flist <- utils::unzip (filename, exdir = tempdir ())
flist <- utils::unzip (filename, exdir = fs::path_temp ())

if (!quiet) {
message ("\r", cli::col_green (
Expand All @@ -106,7 +106,7 @@ check_extract_pars <- function (filename, stn_suffixes) {
if (is.null (filename)) {
stop ("filename must be given")
}
if (!file.exists (filename)) {
if (!fs::file_exists (filename)) {
stop ("filename ", filename, " does not exist")
}
if (!(is.null (stn_suffixes) || is.character (stn_suffixes))) {
Expand Down Expand Up @@ -191,7 +191,7 @@ extract_objs_into_env <- function (flist, quiet = FALSE) {
value = fout,
envir = e
)
chk <- file.remove (flist [f]) # nolint
chk <- fs::file_delete (flist [f]) # nolint
}

if (!quiet) {
Expand Down
4 changes: 2 additions & 2 deletions R/go_home_work.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ go_home_work <- function (home = TRUE, wait, start_time) {

vars <- get_envvars ()
fname <- get_rds_name (vars$file)
if (!file.exists (fname)) {
if (!fs::file_exists (fname)) {
stop (
"This function requires the GTFS data to be pre-processed ",
"with 'process_gtfs_local'."
Expand Down Expand Up @@ -145,7 +145,7 @@ get_envvars <- function () {
}

f <- (Sys.getenv ("gtfs_data"))
if (!file.exists (f)) {
if (!fs::file_exists (f)) {
stop (
"File ", f, " specified by environmental variable ",
"'gtfs_data' does not exist"
Expand Down
4 changes: 2 additions & 2 deletions R/transfers.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ dl_net <- function (gtfs) {
stops <- gtfs$stops [, c ("stop_lon", "stop_lat")]
requireNamespace ("digest")
hash <- digest::digest (stops)
net_name <- file.path (tempdir (), paste0 ("net", hash, ".Rds"))
net_name <- fs::path (fs::path_temp (), paste0 ("net", hash, ".Rds"))

if (!file.exists (net_name)) {
if (!fs::file_exists (net_name)) {
requireNamespace ("dodgr")
net <- dodgr::dodgr_streetnet_sc (pts = stops)
saveRDS (net, file = net_name)
Expand Down
8 changes: 4 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ berlin_gtfs_to_zip <- function () {
si <- strsplit (i, ".txt") [[1]]
res <- tryCatch (
data.table::fwrite (f [[si]],
file.path (tempdir (), i),
fs::path (fs::path_temp (), i),
quote = TRUE
),
error = function (e) e
Expand All @@ -33,10 +33,10 @@ berlin_gtfs_to_zip <- function () {
stop ("Unable to write files to tempdir()")
} # nocov

flist <- file.path (tempdir (), flist)
zipname <- file.path (tempdir (), "vbb.zip")
flist <- fs::path (fs::path_temp (), flist)
zipname <- fs::path (fs::path_temp (), "vbb.zip")
utils::zip (zipname, files = flist, flags = "-q")
chk <- file.remove (flist)
chk <- fs::file_delete (flist)

return (zipname)
}
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codeRepository": "https://github.com/UrbanAnalyst/gtfsrouter",
"issueTracker": "https://github.com/UrbanAnalyst/gtfsrouter/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.2.014",
"version": "0.1.2.018",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
4 changes: 2 additions & 2 deletions docs/404.html

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

14 changes: 7 additions & 7 deletions docs/articles/gtfsrouter.html

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

4 changes: 2 additions & 2 deletions docs/articles/index.html

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

6 changes: 3 additions & 3 deletions docs/articles/transfers.html

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

8 changes: 4 additions & 4 deletions docs/articles/traveltimes.html

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

8 changes: 4 additions & 4 deletions docs/authors.html

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

4 changes: 2 additions & 2 deletions docs/index.html

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

4 changes: 2 additions & 2 deletions docs/news/index.html

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

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pandoc: 3.1.11
pkgdown: 2.1.0
pkgdown: 2.1.1
pkgdown_sha: ~
articles:
gtfsrouter: gtfsrouter.html
transfers: transfers.html
traveltimes: traveltimes.html
last_built: 2024-08-21T09:06Z
last_built: 2024-10-28T11:37Z
Loading

0 comments on commit 028e804

Please sign in to comment.