Skip to content

Commit

Permalink
Merge pull request #51 from iNZightVIT/release/1.5.4
Browse files Browse the repository at this point in the history
Release/1.5.4
  • Loading branch information
tmelliott authored Jun 28, 2020
2 parents 6ba52ab + 70a7867 commit b649464
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 126 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/R-CMD-CHECK.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
on: [push, pull_request]

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: windows-latest, r: '3.6'}
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'devel'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
64 changes: 64 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on: [push, pull_request]

name: test-coverage

jobs:
test-coverage:
runs-on: ${{ matrix.config.os }}

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

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: iNZightTS
Type: Package
Title: Time Series for 'iNZight'
Version: 1.5.3
Version: 1.5.4
Authors@R: c(
person("Tom", "Elliott", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-7815-6318")),
person("Junjie", "Zeng", role = "aut"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.Md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## iNZightTS 1.5.4
- fix bug which meant passing `recompose = TRUE` to the plot method for decomposition objects was being ignored

## iNZightTS 1.5.3
- fix small bug in detecting time information where `[` subset operator returns tibble/dataframe (not vector)
Expand Down
31 changes: 13 additions & 18 deletions R/decomposition.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ plot.inzdecomp <- function(x, recompose.progress = c(0, 0),
}
td <- dplyr::filter(td, dplyr::between(td$Date, xlim[1], xlim[2]))

if (recompose && all(recompose.progress == 0)) {
recompose.progress <- c(1, nrow(td))
}


## Create ONE SINGLE plot
## but transform the SEASONAL and RESIDUAL components below the main data
Expand Down Expand Up @@ -234,7 +238,7 @@ plot.inzdecomp <- function(x, recompose.progress = c(0, 0),
)
) +
ylim(extendrange(datarange, f = 0.05))
if (recompose && any(recompose > 0)) {
if (recompose && any(recompose.progress > 0)) {
ri <- ifelse(recompose.progress[1] == 0,
recompose.progress[2],
nrow(td)
Expand Down Expand Up @@ -263,24 +267,15 @@ plot.inzdecomp <- function(x, recompose.progress = c(0, 0),
.data$residual
)
)
if (!FINAL)
pdata <- pdata +
geom_path(
aes_(y = ~z),
data = rtd[-(1:(ri-1)),],
colour = colour[3]
)

pdata <- pdata +
# geom_path(
# aes(y = ~trend),
# data = rtd[1:ri, ]
# ) +
geom_path(
aes_(y = ~z),
data = rtd[-(1:(ri-1)),],
colour = colour[3]
) +
# geom_segment(
# aes_(
# y = ~value, yend = ~value - residual,
# xend = ~Date
# ),
# data = rtd[1:ri,],
# colour = colour[3]
# ) +
geom_path(
aes_(y = ~value),
data = rtd[1:ri,],
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# iNZightTS: Time Series Visualisation and Forecasting
[![Travis-CI Build Status](https://travis-ci.org/iNZightVIT/iNZightTS.svg?branch=master)](https://travis-ci.org/iNZightVIT/iNZightTS)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/iNZightVIT/iNZightTS?branch=master&svg=true)](https://ci.appveyor.com/project/iNZightVIT/iNZightTS)
![R-CMD-check](https://github.com/iNZightVIT/iNZightTS/workflows/R-CMD-check/badge.svg)
[![Codecov test coverage](https://codecov.io/gh/iNZightVIT/iNZightTS/branch/master/graph/badge.svg)](https://codecov.io/gh/iNZightVIT/iNZightTS?branch=master)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
[![CRAN](https://www.r-pkg.org/badges/version/iNZightTS)](https://CRAN.R-project.org/package=iNZightTS)
73 changes: 0 additions & 73 deletions appveyor.yml

This file was deleted.

0 comments on commit b649464

Please sign in to comment.