Browse Source

travis

master
boB Rudis 6 years ago
parent
commit
8eb5ed1a28
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 2
      .Rbuildignore
  2. 26
      .travis.yml
  3. 3
      DESCRIPTION
  4. 2
      README.Rmd
  5. 1
      README.md
  6. 2
      tests/test-all.R
  7. 22
      tests/testthat/test-statebins.R

2
.Rbuildignore

@ -12,4 +12,4 @@
^cran-comments\.md$ ^cran-comments\.md$
^README.gfm-ascii_identifiers_files$ ^README.gfm-ascii_identifiers_files$
^README.gfm-ascii_identifiers_files/$ ^README.gfm-ascii_identifiers_files/$
^README.gfm-ascii_identifiers_files/.*$ ^README.gfm-ascii_identifiers_files/.*$

26
.travis.yml

@ -1,23 +1,5 @@
language: c # R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
before_install: language: R
- curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh sudo: false
- chmod 755 ./travis-tool.sh cache: packages
- ./travis-tool.sh bootstrap
install:
- ./travis-tool.sh install_github plyr
- ./travis-tool.sh install_deps
script: ./travis-tool.sh run_tests
on_failure:
- ./travis-tool.sh dump_logs
branches:
except:
- /-expt$/
notifications:
email:
on_success: change
on_failure: change

3
DESCRIPTION

@ -28,7 +28,8 @@ License: MIT + file LICENSE
Suggests: Suggests:
testthat, testthat,
viridis, viridis,
RColorBrewer RColorBrewer,
cdcfluview
Depends: Depends:
R (>= 3.2.0), R (>= 3.2.0),
Imports: Imports:

2
README.Rmd

@ -8,6 +8,8 @@ knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.retina=2)
options(width=120) options(width=120)
``` ```
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/statebins.svg?branch=master)](https://travis-ci.org/hrbrmstr/statebins)
# statebins # statebins
Create 'U.S.' Uniform Square State Cartogram Heatmaps Create 'U.S.' Uniform Square State Cartogram Heatmaps

1
README.md

@ -1,3 +1,4 @@
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/statebins.svg?branch=master)](https://travis-ci.org/hrbrmstr/statebins)
# statebins # statebins

2
tests/test-all.R

@ -1,2 +1,4 @@
library(testthat) library(testthat)
library(ggplot2)
test_check("statebins") test_check("statebins")

22
tests/testthat/test-statebins.R

@ -1,6 +1,26 @@
context("basic functionality") context("basic functionality")
test_that("we can do something", { test_that("we can do something", {
#expect_that(some_function(), is_a("data.frame")) require(ggplot2)
flu <- cdcfluview::ili_weekly_activity_indicators(2017)
ggplot(flu, aes(state=statename, fill=activity_level)) +
geom_statebins() +
coord_equal() +
ggplot2::facet_wrap(~weekend) +
labs(title="2017-18 Flu Season ILI Activity Level") +
theme_statebins() -> gg
gb <- ggplot_build(gg)
data(USArrests)
USArrests$state <- rownames(USArrests)
statebins(USArrests, value_col="Assault", name = "Assault") +
theme_statebins(legend_position="right") -> gg
gb <- ggplot_build(gg)
}) })

Loading…
Cancel
Save