From a4fcd51d0479cb7aa9e9f5a574ccda9a40574f9c Mon Sep 17 00:00:00 2001 From: Daniel Herszenhut Date: Sat, 3 Apr 2021 21:00:11 -0300 Subject: [PATCH] version 0.1.0 release --- .Rbuildignore | 1 + DESCRIPTION | 5 +++-- NEWS.md | 12 ++---------- R/import_gtfs.R | 4 ++-- _pkgdown.yml | 21 +++++++++++++++++++++ codemeta.json | 7 ++++--- cran-comments.md | 24 ++++++++++++++++++++++++ inst/tinytest/test_import_gtfs.R | 2 +- man/gtfsio.Rd | 9 +++++++-- 9 files changed, 65 insertions(+), 20 deletions(-) create mode 100644 _pkgdown.yml create mode 100644 cran-comments.md diff --git a/.Rbuildignore b/.Rbuildignore index cd969e2..5d8f6af 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,4 @@ ^README\.Rmd$ ^codecov\.yml$ ^cran-comments\.md$ +^_pkgdown\.yml$ diff --git a/DESCRIPTION b/DESCRIPTION index 321e677..aa722ba 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: gtfsio Title: Read and Write General Transit Feed Specification (GTFS) Files -Version: 0.0.0.9036 +Version: 0.1.0 Authors@R: c(person(given = "Daniel", family = "Herszenhut", @@ -35,7 +35,8 @@ Description: Tools for the development of packages related to General by packages that depend on it. And offers utility functions that support checking the structure of GTFS objects. License: MIT + file LICENSE -URL: https://github.com/r-transit/gtfsio +URL: https://r-transit.github.io/gtfsio/, + https://github.com/r-transit/gtfsio BugReports: https://github.com/r-transit/gtfsio/issues Imports: data.table, diff --git a/NEWS.md b/NEWS.md index cecaac5..642824b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,3 @@ -# gtfsio (development version) +# gtfsio 0.1.0 -## New features - -### Functions - -- `get_gtfs_standards()` - returns the standards for reading and writing GTFS feeds with R as a named list. Each element (also a list) represents a distinct GTFS text file, and describes: whether this file is required, optional or conditionally required; the fields that compose each file, including which R data type is best suited to represent it, whether the field is required, optional or conditionally required, and which values it can assume (most relevant to GTFS `ENUM`s. -- `import_gtfs()` - imports GTFS transit feeds from either a local `.zip` file or an URL. Columns are parsed according to the standards specified in `get_gtfs_standards()`. -- `new_gtfs()` - `gtfs` objects constructor, mostly useful for package authors who may want to either create `gtfs` objects in their packages or create subclasses of the main `gtfs` class. - -## Notes +- First CRAN release! diff --git a/R/import_gtfs.R b/R/import_gtfs.R index f7c22eb..3c59b74 100644 --- a/R/import_gtfs.R +++ b/R/import_gtfs.R @@ -290,8 +290,8 @@ read_files <- function(file, if (!is.null(fields_misspec) & !identical(fields_misspec, character(0))) stop( - "The following fields were specified in 'extra_spec' but either were not ", - "specified in 'fields' or do not exist: ", + "The following fields were specified in 'extra_spec' but either were ", + "not specified in 'fields' or do not exist: ", paste0("'", fields_misspec, "'", collapse = ", ") ) diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..2d9cb0b --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,21 @@ +reference: + - title: GTFS standards + - contents: + - get_gtfs_standards + - title: Input/output + - contents: + - import_gtfs + - export_gtfs + - title: Checking + - contents: + - check_files_exist + - check_fields_exist + - check_fields_types + - title: Constructor/validator + - contents: + - new_gtfs + - assert_gtfs + - title: Methods + - contents: + - print.gtfs + - "[.gtfs" diff --git a/codemeta.json b/codemeta.json index 299165c..1e6be6c 100644 --- a/codemeta.json +++ b/codemeta.json @@ -10,7 +10,7 @@ "codeRepository": "https://github.com/r-transit/gtfsio", "issueTracker": "https://github.com/r-transit/gtfsio/issues", "license": "https://spdx.org/licenses/MIT", - "version": "0.0.0.9036", + "version": "0.1.0", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -143,7 +143,7 @@ "sameAs": "https://CRAN.R-project.org/package=zip" } ], - "fileSize": "124.038KB", + "fileSize": "124.787KB", "keywords": [ "r", "gtfs" @@ -151,5 +151,6 @@ "releaseNotes": "https://github.com/r-transit/gtfsio/blob/master/NEWS.md", "contIntegration": "https://codecov.io/gh/r-transit/gtfsio?branch=master", "developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html", - "readme": "https://github.com/r-transit/gtfsio/blob/master/README.md" + "readme": "https://github.com/r-transit/gtfsio/blob/master/README.md", + "relatedLink": "https://r-transit.github.io/gtfsio/" } diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..b0c58bd --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,24 @@ +## Test environments + +- Local Ubuntu 20.04 installation (R 4.0.5) +- GitHub Actions: + - Windows (release, oldrel) + - MacOS (release, oldrel) + - Ubuntu 20.04 (devel, release, oldrel) +- win-builder (devel, release, oldrel) +- r-hub: + - Windows Server 2008 R2 SP1, R-devel, 32/64 bit + - Ubuntu Linux 20.04.1 LTS, R-release, GCC + - Fedora Linux, R-devel, clang, gfortran + +## R CMD check results + +0 errors | 0 warnings | 1 note + +* checking CRAN incoming feasibility ... NOTE + Maintainer: ‘Daniel Herszenhut ’ + New submission + Possibly mis-spelled words in DESCRIPTION: + GTFS (3:59, 31:33, 32:18, 33:33, 36:39) + +This is gtfsio first submission. GTFS is an acronym for General Transit Feed Specification. The full specification name is provided both in the package title and description. diff --git a/inst/tinytest/test_import_gtfs.R b/inst/tinytest/test_import_gtfs.R index d4badb1..b317556 100644 --- a/inst/tinytest/test_import_gtfs.R +++ b/inst/tinytest/test_import_gtfs.R @@ -29,7 +29,7 @@ expect_error( ) expect_error( - import_gtfs(path, extra_spec = list(levels = (elevation = "factor"))), + import_gtfs(path, extra_spec = list(levels = c(elevation = "factor"))), pattern = paste0( "Only character, integer and numeric ", "are supported in 'extra_spec'\\." diff --git a/man/gtfsio.Rd b/man/gtfsio.Rd index 639f96c..125c074 100644 --- a/man/gtfsio.Rd +++ b/man/gtfsio.Rd @@ -7,12 +7,17 @@ \alias{gtfsio-package} \title{gtfsio: Read and Write General Transit Feed Specification (GTFS) Data} \description{ -Provides a \code{gtfs} class to represent General Transit Feed Specification -(GTFS) files, and fast and flexible tools to read and write such files. +Tools for the development of GTFS-related packages. Establishes a standard +for representing GTFS feeds using R data types. Provides fast and flexible +functions to read and write GTFS feeds while sticking to this standard. +Defines a basic \code{gtfs} class which is meant to be extended by packages +that depend on it. And offers utility functions that support checking the +structure of GTFS objects. } \seealso{ Useful links: \itemize{ + \item \url{https://r-transit.github.io/gtfsio/} \item \url{https://github.com/r-transit/gtfsio} \item Report bugs at \url{https://github.com/r-transit/gtfsio/issues} }