Skip to content

Commit

Permalink
tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
leeper committed Apr 22, 2018
1 parent bb068a3 commit 6185d15
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 34 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.travis.yml
travis-tool.sh
CONTRIBUTING.md
drat.sh
^\.github.?
^revdep.?
29 changes: 29 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Contributions to **imguR** are welcome from anyone and are best sent as pull requests on [the GitHub repository](https://github.com/cloudyr/imguR/). This page provides some instructions to potential contributors about how to add to the package.

1. Contributions can be submitted as [a pull request](https://help.github.com/articles/creating-a-pull-request/) on GitHub by forking or cloning the [repo](https://github.com/cloudyr/imguR/), making changes and submitting the pull request.

2. The cloudyr project follows [a consistent style guide](http://cloudyr.github.io/styleguide/index.html) across all of its packages. Please refer to this when editing package code.

3. 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.

4. All contributions must be submitted consistent with the package license ([GPL-2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)).

5. Non-trivial contributions need to be noted in the `Authors@R` field in the [DESCRIPTION](https://github.com/cloudyr/imguR/blob/master/DESCRIPTION). Just follow the format of the existing entries to add your name (and, optionally, email address). Substantial contributions should also be noted in [`inst/CITATION`](https://github.com/cloudyr/imguR/blob/master/inst/CITATION).

6. The cloudyr project use 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.

7. Please run `R CMD BUILD imguR` and `R CMD CHECK imguR_VERSION.tar.gz` before submitting the pull request to check for any errors.

Some specific types of changes that you might make are:

1. Bug fixes. Great!

2. Documentation-only changes (e.g., to Rd files, README, vignettes). This is great! All contributions are welcome.

3. New functionality. This is fine, but should be discussed on [the GitHub issues page](https://github.com/cloudyr/imguR/issues) before submitting a pull request.

3. Changes requiring a new package dependency should also be discussed on [the GitHub issues page](https://github.com/cloudyr/imguR/issues) 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.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Please specify whether your issue is about:

- [ ] a possible bug
- [ ] a question about package functionality
- [ ] a suggested code or documentation change, improvement to the code, or feature request

If you are reporting (1) a bug or (2) a question about code, please supply:

- [a fully reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) using a publicly available dataset (or provide your data)
- if an error is occurring, include the output of `traceback()` run immediately after the error occurs
- the output of `sessionInfo()`

Put your code here:

```R
## load package
library("imguR")

## code goes here


## session info for your system
sessionInfo()
```

9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Please ensure the following before submitting a PR:

- [ ] if suggesting code changes or improvements, [open an issue](https://github.com/cloudyr/imguR/issues/new) first
- [ ] for all but trivial changes (e.g., typo fixes), add your name to [DESCRIPTION](https://github.com/cloudyr/imguR/blob/master/DESCRIPTION)
- [ ] for all but trivial changes (e.g., typo fixes), document your change in [NEWS.md](https://github.com/cloudyr/imguR/blob/master/NEWS.md) with a parenthetical reference to the issue number being addressed
- [ ] if changing documentation, edit files in `/R` not `/man` and run `devtools::document()` to update documentation
- [ ] add code or new test files to [`/tests`](https://github.com/cloudyr/imguR/tree/master/tests/testthat) for any new functionality or bug fix
- [ ] make sure `R CMD check` runs without error before submitting the PR

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ r_packages:
- covr
- drat
after_success:
- Rscript -e 'library("covr");codecov()'
- R -q -e 'library("covr");codecov()'
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash
drat.sh
env:
Expand Down
7 changes: 3 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: imguR
Type: Package
Title: An Imgur.com API Client Package
Title: 'Imgur.com' API Client Package
Version: 1.0.4
Date: 2016-05-28
Date: 2018-04-22
Authors@R: c(person("Thomas J.", "Leeper",
role = c("aut", "cre"),
email = "[email protected]",
Expand All @@ -11,10 +11,9 @@ Authors@R: c(person("Thomas J.", "Leeper",
email = "[email protected]"),
person("Yihui", "Xie", role = c("ctb"))
)
Maintainer: Thomas J. Leeper <[email protected]>
Imports: tools, graphics, grDevices, httr, png, jpeg
Suggests: testthat
Description: A complete API client for the image hosting service Imgur.com, including the an imgur graphics device, enabling the easy upload and sharing of plots.
Description: A complete API client for the image hosting service 'Imgur.com', including the an 'imgur' graphics device, enabling the easy upload and sharing of plots.
License: GPL-3
URL: https://github.com/cloudyr/imguR
BugReports: https://github.com/cloudyr/imguR/issues
12 changes: 5 additions & 7 deletions NEWS → NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# CHANGES TO imguR 1.0.3 #
# imguR 1.0.3

* Added a test suite and travis-CI testing. (#7)
* Migrated imguR to the cloudyr project.

# CHANGES TO imguR 1.0.2 #
# imguR 1.0.2

* Fixed an error related to passing headers through httr functions. (#6)

# CHANGES TO imguR 1.0.1 #
# imguR 1.0.1

* Fix R CMD check NAMESPACE notes.

# CHANGES TO imguR 1.0.0 #

## SIGNIFICANT USER-VISIBLE CHANGES ##
# imguR 1.0.0

* Thomas Leeper takes over as maintainer.
* Package now works with the Imgur v3 API (including OAuth 2.0 support as well as anonymously).

# CHANGES TO imgur 0.1 #
# imgur 0.1

* Initial package released by Aaron Statham
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# imguR #
# imguR API Client

**imguR** enables intuitive uploading of plots created in R to the free image hosting service [Imgur](http://www.imgur.com) simply, quickly, and intuitively via the [Imgur v3 API](http://api.imgur.com). The package is a complete client library for the Imgur API, meaning that one can also delete, favorite, and comment on images, as well as organize them in albums and galleries, among other operations.

By default, all images are loaded to Imgur anonymously. Optionally, using an OAuth2.0 login (see examples below), users can also gain full access to their own Imgur user account.


### The Imgur Graphics Device ###
### The Imgur Graphics Device

The two workhorse functions for anonymously uploading images to Imgur are `imgur` and `imgur_off`, the latter of which wraps `dev.off` and completes the image upload.

Expand All @@ -27,7 +27,7 @@ imgur_off(i)
```


### OAuth2.0 Support ###
### OAuth2.0 Support

By default, all operations in **imguR** are performed anonymously using an API key attached to the **imguR** package and registered by the package maintainer. To use the package in a non-anonymous fashion (and to obtain higher API rate limits), operations needs to include an `token` argument, which must contain an OAuth2.0 token object. Note: Some operations cannot be performed anonymously and must be performed with the `token` argument; these operations produce an error if no `token` is supplied.

Expand Down Expand Up @@ -70,7 +70,7 @@ imgur_off(i)
Note: `imgur_login` uses OAuth credentials registered to the package maintainer. If you intend to make a very large number of API requests, it may be appropriate [to register your own application](https://api.imgur.com/oauth2/addclient). You can check user- and package-level rate limits with `rate_limit`.


### Managing Images ###
### Managing Images

If operations (e.g., `upload_image`) are performed with a `token` argument, they can subsequently be modified (e.g., `update_image`) by passing the relevant identifiers:

Expand Down Expand Up @@ -99,26 +99,26 @@ update_image(u$deletehash, title = 'My graph', description = 'A simple graph')

This procedure can also be used for other API operations, such as modifying albums. Not all operations can be performed anonymously, however.

## Requirements and Installation ##
## Requirements and Installation

[![CRAN Version](http://www.r-pkg.org/badges/version/imguR)](https://cran.r-project.org/package=imguR)
![Downloads](http://cranlogs.r-pkg.org/badges/imguR)
[![CRAN Version](https://www.r-pkg.org/badges/version/imguR)](https://cran.r-project.org/package=imguR)
![Downloads](https://cranlogs.r-pkg.org/badges/imguR)
[![Travis-CI Build Status](https://travis-ci.org/cloudyr/imguR.png?branch=master)](https://travis-ci.org/cloudyr/imguR)
[![codecov.io](http://codecov.io/github/cloudyr/imguR/coverage.svg?branch=master)](http://codecov.io/github/cloudyr/imguR?branch=master)
[![codecov.io](https://codecov.io/github/cloudyr/imguR/coverage.svg?branch=master)](https://codecov.io/github/cloudyr/imguR?branch=master)

The current stable version **imguR** can be installed from [CRAN](http://cran.r-project.org/package=imguR) using:

```
install.packages('imguR')
```

The development version can be installed directly from GitHub using `ghit`:
The development version can be installed directly from GitHub using `remotes`:

```
if(!require('ghit')) {
install.packages('ghit')
if (!require('remotes')) {
install.packages('remotes')
}
ghit::install_github('cloudyr/imguR')
remotes::install_github('cloudyr/imguR')
```

[![cloudyr project logo](http://i.imgur.com/JHS98Y7.png)](https://github.com/cloudyr)
18 changes: 9 additions & 9 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ citHeader("To cite package 'imguR' in publications use:")
vers <- paste("R package version", meta$Version)

citEntry(entry="Manual",
title = "imguR: imgur Client Package for R",
author = personList(as.person("Thomas J. Leeper")),
year = year,
note = vers,
textVersion =
paste("Thomas J. Leeper (",
year,
"). imguR: imgur Client Package for R. ",
vers, ".", sep=""))
title = "imguR: imgur Client Package for R",
author = personList(as.person("Thomas J. Leeper")),
year = year,
note = vers,
textVersion =
paste("Thomas J. Leeper (",
year,
"). imguR: imgur Client Package for R. ",
vers, ".", sep=""))

0 comments on commit 6185d15

Please sign in to comment.