NA
Source:CONTRIBUTING.md
Contributions to rio are welcome from anyone and are best sent as pull requests on the GitHub repository. This page provides some instructions to potential contributors about how to add to the package.
Contributions can be submitted as a pull request on GitHub by forking or cloning the repo, making changes and submitting the pull request.
Pull requests should involve only one commit per substantive change. This means if you change multiple files (e.g., code and documentation), these changes should be committed together. If you don’t know how to do this (e.g., you are making changes in the GitHub web interface) just submit anyway and the maintainer will clean things up.
All contributions must be submitted consistent with the package license (GPL-2).
All contributions need to be noted in the
Authors@R
field in the DESCRIPTION. Just follow the format of the existing entries to add your name (and, optionally, email address). Substantial contributions should also be noted ininst/CITATION
.This package uses royxgen code and documentation markup, so changes should be made to roxygen comments in the source code
.R
files. If changes are made, roxygen needs to be run. The easiest way to do this is a command line call to:Rscript -e devtools::document()
. Please resolve any roxygen errors before submitting a pull request.Please run
R CMD BUILD rio
andR CMD CHECK rio_VERSION.tar.gz
before submitting the pull request to check for any errors.
Some specific types of changes that you might make are:
Documentation-only changes (e.g., to Rd files, README, vignettes). This is great! All contributions are welcome.
Addition of new file format imports or exports. This is also great! Some advice:
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 theimport()
orexport()
functions; S3 will take care of dispatch. All.import()
methods must accept afile
andwhich
argument:file
represents the path to the file andwhich
can be used to extract sheets or files from multi-object files (e.g., zip, Excel workbooks, etc.)..export()
methods take two arguments:file
andx
, wherefile
is the path to the file andx
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. See the Vignette:remap
.The S3 methods should be documented in NAMESPACE using
S3method()
, which is handled automatically by roxygen markup in the source code.Any new format support needs to be documented in each of the following places: README.Rmd, the vignette, and the appropriate Rd file in
/man
.New formats or new options for handling formats should have a test added in
/tests/testthat
calledtest_format_FORMAT.R
that completely covers the function’s behavior. This may require adding an example file toinst/examples
(e.g., for testingimport()
).
Changes requiring a new package dependency should be discussed on the GitHub issues page before submitting a pull request.
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.