git clone https://github.com/<yourgithubusername>/rredlist.git
rredlist
at ropensci/rredlist
) by doing git remote add upstream https://github.com/ropensci/rredlist.git
. Before making changes make sure to pull changes in from upstream by doing either git fetch upstream
then merge later or git pull upstream
to fetch and merge in one stepropensci/rredlist
This package uses vcr
on top of testthat
for testing: HTTP requests and responses are saved so that when running tests, the cached things ("cassettes") are used instead of repeated calls to web services.
If you're new to such a testing setup, read HTTP testing in R.
In practice, it means:
For new tests you should add vcr::use_cassette()
around your function calls that use HTTP, or around whole tests. Check out existing test files. Running a new test the first time will create cassettes in tests/fixtures/
(i.e., YAML files containing HTTP requests and response). Please commit the cassette with your test.
If you edit the HTTP request a function or a test is making, delete the corresponding cassette before running the tests. Then commit the changes to the cassette with your changes to the test.
rredlist
requires an API key to work. When testing locally, you will need to use your own API key to generate new cassettes. The API key would normally be recorded in HTTP requests and responses. However, we've set it up so that vcr
filters this sensitive data out of the cassettes. Make sure to never include your own API key when making changes to the codebase, including tests.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.