Skip to content

Commit

Permalink
Sorely needed update
Browse files Browse the repository at this point in the history
  • Loading branch information
abarbour committed Aug 13, 2023
1 parent f7b7dcf commit 9bc36a4
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 142 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ vignettes/figure
^cran-comments\.md$
^codecov\.yml$
^CRAN-RELEASE$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

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: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: kitagawa
Type: Package
Title: Spectral Response of Water Wells to Harmonic Strain and Pressure Signals
Version: 3.1.0
Date: 2020-06-21
Version: 3.1.1
Date: 2023-08-13
Authors@R:
c(person(given = c("Andrew","J."),
family = "Barbour",
Expand Down Expand Up @@ -55,4 +55,4 @@ Suggests:
covr
VignetteBuilder: knitr
Encoding: UTF-8
RoxygenNote: 7.1.0
RoxygenNote: 7.2.3
16 changes: 14 additions & 2 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ sensing_volume <- function(rad_grout, len_grout, rad_screen, len_screen){
#' @param t.ratio numeric; the ratio of minor to major tick lengths.
#' @param major.ticks numeric; the axis limits.
#' @param base numeric; the base of the logarithm (somewhat experimental)
#' @param ticks.only logical; on the axis
#' @param ... additional parameters passed to the \code{axis} call for the major ticks.
#'
#' @author A. J. Barbour <andy.barbour@@gmail.com>
Expand All @@ -199,9 +200,16 @@ sensing_volume <- function(rad_grout, len_grout, rad_screen, len_screen){
#' @examples
#' x <- 10^(0:8)
#' y <- 1:9
#'
#' plot(log10(x),y,xaxt="n",xlab="x",xlim=c(0,9))
#' logticks()
#' logticks(ax=3, ticks.only=TRUE)
#'
#' par(tcl=0.5) # have tick marks show up on inside instead
#' plot(log10(x),y,xaxt="n",xlab="x",xlim=c(0,9))
#' logticks()
logticks <- function(ax=1, n.minor=9, t.lims, t.ratio=0.5, major.ticks=NULL, base=c("ten","ln","two"), ...){
#' logticks(ax=3, ticks.only=TRUE)
logticks <- function(ax=1, n.minor=9, t.lims, t.ratio=0.5, major.ticks=NULL, base=c("ten","ln","two"), ticks.only=FALSE, ...){
# axis limits
lims <- par("usr")
# x or y axis
Expand All @@ -222,7 +230,11 @@ logticks <- function(ax=1, n.minor=9, t.lims, t.ratio=0.5, major.ticks=NULL, bas
base <- switch(base, two=2, ln="e", ten=10)

# create tick label expressions
tick.labels <- sapply(major.ticks, function(i) as.expression(bquote(.(base) ^ .(i))) )
tick.labels <- if (ticks.only){
FALSE
} else {
sapply(major.ticks, function(i) as.expression(bquote(.(base) ^ .(i))) )
}
# add major ticks
axis(ax, at=major.ticks, labels=tick.labels, ...)

Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ Tools to calculate the theoretical spectral response
of fluid-pressure in a water well
to harmonic strains (e.g., tides, long-period seismic waves).


[![Travis Build Status](https://travis-ci.org/abarbour/kitagawa.svg)](https://travis-ci.org/abarbour/kitagawa) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/abarbour/kitagawa?branch=master&svg=true)](https://ci.appveyor.com/project/abarbour/kitagawa) [![Code Coverage](https://codecov.io/gh/abarbour/kitagawa/branch/master/graph/badge.svg)](https://codecov.io/gh/abarbour/kitagawa?branch=master) [![License](https://img.shields.io/badge/license-GPL-orange.svg)](https://www.gnu.org/licenses/gpl-2.0.html) [![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/kitagawa)](https://cran.r-project.org/package=kitagawa) [![Downloads](https://cranlogs.r-pkg.org/badges/kitagawa)](https://www.r-pkg.org/pkg/kitagawa)

<!-- badges: start -->
[![R-CMD-check](https://github.com/abarbour/kitagawa/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/abarbour/kitagawa/actions/workflows/R-CMD-check.yaml)\
[![Code Coverage](https://codecov.io/gh/abarbour/kitagawa/branch/master/graph/badge.svg)](https://codecov.io/gh/abarbour/kitagawa?branch=master)\
[![License](https://img.shields.io/badge/license-GPL-orange.svg)](https://www.gnu.org/licenses/gpl-2.0.html)\
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/kitagawa)](https://cran.r-project.org/package=kitagawa)\
[![Downloads](https://cranlogs.r-pkg.org/badges/kitagawa)](https://www.r-pkg.org/pkg/kitagawa)
<!-- badges: end -->

## Models of spectral response

This code calculates the response at two types of wells: a sealed well and
Expand Down
5 changes: 0 additions & 5 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
*** open_well_response [X]
*** well_response [ ]

[ ] Method to estimate transfer function between two series
*** MT CSD <-- perhaps include in psd

[ ] Datasets:
*** Honshu timeseries [X] <-- in psd
*** PBO-PP well information (and calculated sensing volumes)
*** Slug test series???


52 changes: 0 additions & 52 deletions appveyor.yml

This file was deleted.

12 changes: 0 additions & 12 deletions codecov.yml

This file was deleted.

11 changes: 3 additions & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
## Test environments
* local R installation, R 4.0.1
* Debian Linux (on rhub)
* remote R installation (on travis-ci), R devel (2020-06-22 r78735)
* ubuntu 16.04 (on travis-ci), R 4.0.1 (and devel)
* win-builder (devel)
## R CMD check results

* This fixes build errors caused by removal of linked package 'sapa'
0 errors | 0 warnings | 1 note

Thanks for all you do for the community!
* This is a new release.
6 changes: 4 additions & 2 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ News for package \kitagawa{}: \CRANpkg{kitagawa} -- \GITpkg{kitagawa} --

\encoding{UTF-8}

\section{CHANGES IN VERSION 3.1 (2020-06-21)}{
\section{CHANGES IN VERSION 3.1+ (last updated 2023-08-13)}{
\itemize{
\item Added the model of Wang et al (2018; \href{https://doi.org/10.1029/2018WR022793}{10.1029/2018WR022793}),
\item 3.1.1: added a \code{ticks.only} option to \code{logticks}

\item 3.1: Added the model of Wang et al (2018; \href{https://doi.org/10.1029/2018WR022793}{10.1029/2018WR022793}),
to the model toolbox and to the ResponseModels toolbox. Thanks to \JK for contributing this.
\item New test validating Wang model against Hsieh model (they are equivalent when specific leakage is zero).
Thanks to \JK for contributing this.
Expand Down
10 changes: 10 additions & 0 deletions man/logticks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Platform

|field |value |
|:--------|:----------------------------|
|version |R version 4.0.1 (2020-06-06) |
|os |macOS Mojave 10.14.6 |
|system |x86_64, darwin17.0 |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/Los_Angeles |
|date |2020-06-22 |
|field |value |
|:--------|:-----------------------------|
|version |R version 4.2.3 (2023-03-15) |
|os |macOS Catalina 10.15.7 |
|system |x86_64, darwin17.0 |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |UTC |
|date |2023-08-13 |
|pandoc |3.1.1 @ /opt/local/bin/pandoc |

# Dependencies

Expand Down
Loading

0 comments on commit 9bc36a4

Please sign in to comment.