Skip to content

Commit

Permalink
Merge branch 'main' into escape
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot authored Sep 5, 2023
2 parents c76cc71 + 442b7d3 commit f2afc3f
Show file tree
Hide file tree
Showing 135 changed files with 1,661 additions and 9,376 deletions.
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
^\.editorconfig$
^starwars.xlsx$
^starwars.csv$
^codecov\.yml$
^cran-comments\.md$
^CRAN-SUBMISSION$
^codemeta\.json$
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true


[*]
charset = utf8
end_of_line = lf
insert_final_newline = true
indent_style = space


[*.{r,R,rmd,Rmd,cpp}]
indent_size = 4
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: windows-latest, r: '3.6'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
86 changes: 0 additions & 86 deletions .github/workflows/check-standard.yaml

This file was deleted.

60 changes: 31 additions & 29 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
- master
branches: [main, master]
pull_request:
branches:
- main
- master
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Query dependencies
- name: Test coverage
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
- name: Show testthat output
if: always()
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ Some specific types of changes that you might make are:
- Import is based on S3 dispatch to functions of the form `.import.rio_FORMAT()`. Export works the same, but with `.export.rio_FORMAT()`. New import/export methods should take this form. There's no need to change the body of the `import()` or `export()` functions; S3 will take care of dispatch. All `.import()` methods must accept a `file` and `which` argument: `file` represents the path to the file and `which` can be used to extract sheets or files from multi-object files (e.g., zip, Excel workbooks, etc.). `.export()` methods take two arguments: `file` and `x`, where `file` is the path to the file and `x` is the data frame being exported. Most of the work of import and export methods involves mapping these arguments to their corresponding argument names in the various underlying packages.

- The S3 methods should be documented in [NAMESPACE](https://github.com/leeper/rio/blob/master/NAMESPACE) using `S3method()`, which is handled automatically by roxygen markup in the source code.

- Use the following `base` convention for these three arguments:
- `file`: A character string naming a file, URL, or single-file .zip or .tar archive. (not `path`)
- `which`: This argument is used to control import from multi-object files. (not `sheet`)
- `header`: This argument is used to control whether the first row in the data file contains the header information. (not `col_names`)
- Any new format support needs to be documented in each of the following places: [README.Rmd](https://github.com/leeper/rio/blob/master/README.Rmd), [the vignette](https://github.com/leeper/rio/blob/master/vignettes/rio.Rmd), and the appropriate Rd file in [`/man`](https://github.com/leeper/rio/tree/master/man).

- New formats or new options for handling formats should have a test added in [`/tests/testthat`](https://github.com/leeper/rio/tree/master/tests/testthat) called `test_format_FORMAT.R` that completely covers the function's behavior. This may require adding an example file to [`inst/examples`](https://github.com/leeper/rio/tree/master/inst/examples) (e.g., for testing `import()`).

3. Changes requiring a new package dependency should be discussed on the GitHub issues page before submitting a pull request.

4. Message translations. These are very appreciated! The format is a pain, but if you're doing this I'm assuming you're already familiar with it.

Any questions you have can be opened as GitHub issues or directed to thosjleeper (at) gmail.com.
Any questions you have can be opened as GitHub issues.

20 changes: 11 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Package: rio
Type: Package
Title: A Swiss-Army Knife for Data I/O
Version: 0.5.28
Date: 2021-10-26
Version: 0.5.30
Authors@R: c(person("Jason", "Becker", role = "ctb", email = "[email protected]"),
person("Chung-hong", "Chan", role = "aut", email = "[email protected]",
person("Chung-hong", "Chan", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0002-6232-7530")),
person("David", "Schoch", email = "[email protected]", role = c("ctb"),
comment = c(ORCID = "0000-0003-2952-4812")),
person("Geoffrey CH", "Chan", role = "ctb", email = "[email protected]"),
person("Thomas J.", "Leeper",
role = c("aut", "cre"),
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0003-4097-6326")),
person("Christopher", "Gandrud", role = "ctb"),
Expand All @@ -35,18 +36,18 @@ Description: Streamlined data import and export by making assumptions that
directly without explicit decompression, and fast import packages are used where
appropriate. An additional convenience function, 'convert()', provides a simple
method for converting between file types.
URL: https://github.com/leeper/rio
BugReports: https://github.com/leeper/rio/issues
URL: https://github.com/gesistsa/rio
BugReports: https://github.com/gesistsa/rio/issues
Depends:
R (>= 2.15.0)
R (>= 3.6)
Imports:
tools,
stats,
utils,
foreign,
haven (>= 1.1.2),
curl (>= 0.6),
data.table (>= 1.9.8),
data.table (>= 1.11.2),
readxl (>= 0.1.1),
openxlsx,
tibble,
Expand All @@ -73,4 +74,5 @@ Suggests:
License: GPL-2
VignetteBuilder: knitr
Encoding: UTF-8
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Loading

0 comments on commit f2afc3f

Please sign in to comment.