Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor climdex.r into modular R scripts #36

Merged
merged 84 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
ce18316
Add date factor for meteorological seasons
QSparks Oct 12, 2023
094eff5
Clean up comments
QSparks Oct 12, 2023
3b7fabc
Add seasonal frequency to applicable indices and docs.
QSparks Oct 19, 2023
1515a0c
Add tests for seasonal date factor
QSparks Oct 19, 2023
25a454b
Add rx5day and rx1day to tests
QSparks Oct 20, 2023
439fe42
Add NA tests for all clim vars & month-season case
QSparks Oct 24, 2023
38d9b17
Document season definitions, increment version.
QSparks Nov 1, 2023
e51ae3f
Undo updates to changelog and description.
QSparks Nov 4, 2023
0df8567
Break seasonal indices tests up and correct comments.
QSparks Nov 6, 2023
dce1e7b
Remove redundant quantile validity check
QSparks Nov 6, 2023
7c4de3b
Refactor seasonal tests and add related list constants
QSparks Nov 6, 2023
2b4b5e3
Add R-CMD-Check workflow
QSparks Nov 6, 2023
99362de
Address i29 and R CMD Check warning
QSparks Nov 6, 2023
8ed9fc1
Run roxygenize before R CMD Check
QSparks Nov 6, 2023
61729d3
Fix indentation in .yaml
QSparks Nov 7, 2023
5331c67
Build docs in R-CMD-Check job
QSparks Nov 7, 2023
445ab55
Add lifecycle to extra-packages
QSparks Nov 7, 2023
cbd9cfa
Run cross-platform checks on PR only
QSparks Nov 9, 2023
e7763fe
Merge branch 'CI-workflow' into feature/output-extreme-event-timing
QSparks Nov 20, 2023
fc0a566
Introduce 'as.df' parameter to return exact dates
QSparks Nov 24, 2023
c041a5e
Add exact date tests for n or x, rxnday and spells
QSparks Nov 26, 2023
3fa3744
Add exact dates tests for GSL
QSparks Nov 26, 2023
bf64d0e
Update expected.GSL for southern hemisphere and leap years
QSparks Nov 28, 2023
d5b10e3
Directly access non-exported climdex.pcic functions
QSparks Nov 28, 2023
e276175
Add 'next' call in rxnday tests when expected.value is NA
QSparks Nov 28, 2023
5ac63d3
Resolve 'cannot coerce class "PCICt" to a data.frame'
QSparks Nov 29, 2023
770e767
Add NA checks for values in n or x tests
QSparks Nov 29, 2023
34bf591
Clarify ‘include.exact.dates’ param, fix seasonal na mask
QSparks Dec 5, 2023
43d5fb2
End-of-year tests, rename as.df to include.exact.dates
QSparks Dec 5, 2023
f405ef5
Use checkIdentical in place of checkEqualsNumeric
QSparks Dec 5, 2023
e0cd347
Adjust spell and GSL df structure
QSparks Dec 6, 2023
157d25c
Add check lengths and test dates in factors
QSparks Dec 6, 2023
46b291b
Set non-ending GSL to end at EOY, use checkTrue for old-rel
QSparks Dec 7, 2023
9996b12
Add test center.mean.on…, not.all.na & equal length
QSparks Dec 7, 2023
c1c4e96
Custom checkEquals, fix expected s.h. GSL duration
QSparks Dec 8, 2023
ac76bf6
Use '==' in place of '%in%' to index expected n or x dates
QSparks Dec 8, 2023
af8cd59
Test n or x in winter season
QSparks Dec 8, 2023
57fd447
Add exact dates test for spells.can.span.years
QSparks Dec 11, 2023
8bb8cf6
Add leap year spell & random data tests. Use period.sep
QSparks Dec 12, 2023
1fd7b77
Add tavg namasks, comments and improve NA seasons test
QSparks Dec 13, 2023
60ad825
Consistent nday.consec.prec.max. arg order
QSparks Dec 14, 2023
988e763
Check consistent types with and without exact dates
QSparks Dec 14, 2023
95de2d5
Use idx lists from constants to set test indices
QSparks Jan 19, 2024
273122c
Update CHANGELOG and increment version for 1.2-0 release
QSparks Jan 19, 2024
6dee23e
Update CHANGELOG
QSparks Jan 22, 2024
4441b95
Clarify 1.2-0 release notes
QSparks Jan 22, 2024
0ef6817
Clarify 1.2-0 Exact Dates notes
QSparks Jan 22, 2024
1527014
Refactor climdex.r into modular R scripts
QSparks Sep 17, 2024
67ded79
Update R and Rcpp dependencies
QSparks Sep 17, 2024
b7db139
Revert dependency updates, clarify x86 check in tests
QSparks Sep 18, 2024
56debd8
rm debug code
QSparks Sep 18, 2024
c4e7921
Test Intel macOS runner
QSparks Sep 18, 2024
7a6b455
Remove test on macOS runner
QSparks Sep 18, 2024
3107e95
Add separate file for climdexInput validation
QSparks Sep 18, 2024
d052683
Add tests for seasonal date factor
QSparks Oct 19, 2023
c34a8d1
Document season definitions, increment version.
QSparks Nov 1, 2023
797635f
Undo updates to changelog and description.
QSparks Nov 4, 2023
002c1ed
Break seasonal indices tests up and correct comments.
QSparks Nov 6, 2023
86e182c
Add R-CMD-Check workflow
QSparks Nov 6, 2023
7d5847a
Run roxygenize before R CMD Check
QSparks Nov 6, 2023
12e3113
Fix indentation in .yaml
QSparks Nov 7, 2023
5fdb70c
Build docs in R-CMD-Check job
QSparks Nov 7, 2023
a0b9b39
Add lifecycle to extra-packages
QSparks Nov 7, 2023
0ebee14
Run cross-platform checks on PR only
QSparks Nov 9, 2023
fb4c719
Update expected.GSL for southern hemisphere and leap years
QSparks Nov 28, 2023
388fb5a
Add 'next' call in rxnday tests when expected.value is NA
QSparks Nov 28, 2023
79c9b15
Clarify ‘include.exact.dates’ param, fix seasonal na mask
QSparks Dec 5, 2023
4da6a9e
End-of-year tests, rename as.df to include.exact.dates
QSparks Dec 5, 2023
4b5197c
Add test center.mean.on…, not.all.na & equal length
QSparks Dec 7, 2023
206ac09
Custom checkEquals, fix expected s.h. GSL duration
QSparks Dec 8, 2023
6907f0d
Add exact dates test for spells.can.span.years
QSparks Dec 11, 2023
1fa99c6
Add leap year spell & random data tests. Use period.sep
QSparks Dec 12, 2023
326d65c
Add tavg namasks, comments and improve NA seasons test
QSparks Dec 13, 2023
d3ab2d7
Check consistent types with and without exact dates
QSparks Dec 14, 2023
2e784f1
Use idx lists from constants to set test indices
QSparks Jan 19, 2024
ce73407
Update CHANGELOG and increment version for 1.2-0 release
QSparks Jan 19, 2024
cfe3364
Update CHANGELOG
QSparks Jan 22, 2024
fc0e43b
Clarify 1.2-0 release notes
QSparks Jan 22, 2024
69f5750
Clarify 1.2-0 Exact Dates notes
QSparks Jan 22, 2024
5908df9
Resolve missed rebase conflict
QSparks Oct 7, 2024
e7c9317
Fix diff disagreement after rebase
QSparks Oct 7, 2024
d5e7040
Update date and changelog
QSparks Oct 7, 2024
b460b10
Merge release 1.2.0 after rebase
QSparks Oct 8, 2024
a7840f1
Merge branch 'master' into i35-refactor-climdex-into-submodules
QSparks Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check-on-PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
# - {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand Down
21 changes: 19 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ Maintainer: James Hiebert <[email protected]>
Depends:
R (>= 2.12.0),
PCICt (>= 0.5-4)
Encoding: UTF-8
Imports:
methods,
Rcpp (>= 0.11.4)
Rcpp (>= 0.11.4),
stats,
utils
Suggests:
compiler,
RUnit
Expand All @@ -23,4 +26,18 @@ License: GPL-3
URL: https://www.r-project.org
LazyData: yes
BugReports: https:/pacificclimate/climdex.pcic/issues/
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Collate:
'input_utils.R'
'climdexInput_class.R'
'climdex.pcic-package.R'
'constants.R'
'date_utils.R'
'precipitation_indices.R'
'series_utils.R'
'stats_utils.R'
'temperature_indices.R'
'threshold_indices.R'
'threshold_utils.R'

10 changes: 8 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(climdex.bootstrap.idx.list)
export(climdex.cdd)
export(climdex.csdi)
export(climdex.cwd)
Expand All @@ -9,6 +12,8 @@ export(climdex.mean.idx.list)
export(climdex.bootstrap.idx.list)
export(climdex.gsl)
export(climdex.id)
export(climdex.mean.idx.list)
export(climdex.min.max.idx.list)
export(climdex.prcptot)
export(climdex.quantile)
export(climdex.r10mm)
Expand Down Expand Up @@ -48,6 +53,7 @@ exportClasses(climdexInput)
import(PCICt)
import(Rcpp)
import(methods)
importFrom("stats", "quantile")
importFrom("utils", "head", "read.csv")
importFrom(stats,quantile)
importFrom(utils,head)
importFrom(utils,read.csv)
useDynLib(climdex.pcic, .registration = TRUE)
5 changes: 3 additions & 2 deletions R/climdex.pcic-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#'
#' @name climdex.pcic
#' @aliases climdex.pcic-package
#' @docType package
#' @keywords internal
"_PACKAGE"
#' @seealso \code{\link{climdexInput.raw}}, \code{\link{climdexInput.csv}},
#' \code{\link{climdexInput-class}}.
#' @references \url{http://etccdi.pacificclimate.org/list_27_indices.shtml}
Expand All @@ -43,7 +44,7 @@
#' Zhang, X., 2005: Avoiding inhomogeneity in percentile-based indices of
#' temperature extremes. Journal of Climate 18.11 (2005):1641-.
#' @keywords climate ts
#' @useDynLib climdex.pcic
#' @useDynLib climdex.pcic, .registration = TRUE
#' @import PCICt Rcpp methods
NULL

Expand Down
Loading
Loading