Skip to content

Commit

Permalink
Merge pull request #306 from DrylandEcology/feature_DecadalAggregations
Browse files Browse the repository at this point in the history
Feature decadal aggregations
  • Loading branch information
dschlaep authored Aug 5, 2018
2 parents e438646 + 00d7619 commit 45ef6ab
Show file tree
Hide file tree
Showing 406 changed files with 14,321 additions and 13,959 deletions.
13 changes: 12 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
^appveyor\.yml$
^\.appveyor_clear_cache\.txt$
^\.travis\.yml$
^codecov\.yml$
^CONDUCT\.md$
^CODE_OF_CONDUCT\.md$
^data-raw$
^.lintr$

# RStudio stuff
^.*\.Rproj$
^\.Rproj\.user$

# CRAN stuff
^cran-comments\.md$
^NEWS\.md$

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ inst/doc

# Package check files
..Rcheck
rSFSW2.Rcheck

# Package builds
*tar.gz

# Compiled source code
src/*.o
src/*.so
src/*.dll
22 changes: 22 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
linters: with_defaults(
#--- DEFAULT LINTERS
# Default line length:
line_length_linter(80L),
# Turn off default linters for now:
object_name_linter = NULL,
camel_case_linter = NULL,
snake_case_linter = NULL,
#--- NON-DEFAULT LINTERS
# Not activated non-default linters:
#extraction_operator_linter,
#implicit_integer_linter,
#todo_comment_linter,
#absolute_path_linter,
# Activated non-default linters:
T_and_F_symbol_linter,
nonportable_path_linter,
semicolon_terminator_linter,
seq_linter,
undesirable_function_linter,
undesirable_operator_linter,
unneeded_concatenation_linter)
36 changes: 22 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ sudo: false
cache: packages
warnings_are_errors: false # turn this back on for more severe testing

# next three settings (latex, r_build_args, and r_check_args -- though, the latter two
# are not used because we use our own 'script' section: see there): because unit tests take
# now too much time due to the extended unit test project; some travis runs fail due to
# taking longer than the allotted 60-min maximum; for now omit PDF vignettes and manual
# until we have proper, fast running unit tests
# Next three settings (latex, r_build_args, and r_check_args -- though, the latter two
# are not used because we use our own 'script' section: see there): because unit tests
# take now too much time due to the extended unit test project; some travis runs fail
# due to taking longer than the allotted 60-min maximum; for now omit PDF vignettes and
# manual until we have proper, fast running unit tests
latex: false
r_build_args: '--no-build-vignettes --no-manual'
r_check_args: '--ignore-vignettes --no-manual'
#r_packages: hunspell

addons:
apt:
Expand All @@ -25,19 +26,26 @@ addons:
- libnetcdf-dev

before_install:
# install dependencies of rSOILWAT2 (because rSOILWAT2 is installed 'before install' and
# thus dependencies are not installed and r_packages has not taken effect yet)
# pwd = <repo>/<repo-name>, here DrylandEcology/rSFSW2
# Install dependencies of rSOILWAT2 (because rSOILWAT2 is installed 'before install'
# and thus dependencies are not installed and r_packages has not taken effect yet)
- Rscript -e 'pkgs <- setdiff(c("blob", "DBI", "RSQLite"), installed.packages()); if (length(pkgs) > 0) utils::install.packages(pkgs)'
# obtain source code of rSOILWAT2 from github
- git clone -b master --single-branch --recursive https://github.com/Burke-Lauenroth-Lab/rSOILWAT2.git /tmp/rSOILWAT2
# install rSOILWAT2 without help pages and without vignettes
- R CMD INSTALL --no-docs --no-help /tmp/rSOILWAT2
# Obtain source code of rSOILWAT2 from github and save at DrylandEcology/rSOILWAT2
- git clone -b master --single-branch --recursive https://github.com/DrylandEcology/rSOILWAT2.git ../rSOILWAT2
# Install rSOILWAT2 without help pages and without vignettes
- R CMD INSTALL --no-docs --no-help ../rSOILWAT2
# Instead of `r_packages`, install dependencies of unit tests only if not already
# available in cached packages
- Rscript -e 'pkgs <- setdiff(c("hunspell"), installed.packages()); if (length(pkgs) > 0) utils::install.packages(pkgs)'


script:
- R CMD build --no-build-vignettes --no-manual .
# the extended unit test project (commit db3948e6aa746d012dbc4f25b0e9bb2a4186305f)
# takes too long for the default settings (> 10 min without output)
- travis_wait 30 R CMD check *tar.gz --as-cran --ignore-vignettes --no-manual
# The extended unit test project (commit db3948e6aa746d012dbc4f25b0e9bb2a4186305f)
# takes about 16 min which is too long for the default settings of 10-min and times out
# On failure, display file 'testthat.Rout.fail' for more information and fail
# - travis_wait 30 R CMD check *tar.gz --as-cran --ignore-vignettes --no-manual || { cat rSFSW2.Rcheck/tests/testthat.Rout* && 1; }
- travis_wait 30 R CMD check *tar.gz --as-cran --ignore-vignettes --no-manual && cat rSFSW2.Rcheck/tests/testthat.Rout*

after_success:
- travis_wait 30 Rscript -e 'covr::codecov()'
27 changes: 15 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
Package: rSFSW2
Title: Simulation Framework for SOILWAT2
Version: 2.7.4
Date: 2018-05-02
Authors@R: c(person("Daniel", "Schlaepfer", email = "daniel.schlaepfer@yale.edu", role = c("aut", "cre")),
person("Caitlin", "Andrews", role = "ctb"),
person("Zach", "Kramer", role = "ctb"),
person("Ryan", "Murphy", role = "ctb"))
Version: 3.0.0
Date: 2018-08-04
Authors@R: c(
person("Daniel", "Schlaepfer", email = "daniel.schlaepfer@yale.edu",
comment = c(ORCID = "0000-0001-9973-2065"), role = c("aut", "cre")),
person("Caitlin", "Andrews", role = "ctb"),
person("Zach", "Kramer", role = "ctb"),
person("Charlie", "Duso", role = "ctb"),
person("Ryan", "Murphy", role = "ctb"))
Description: Setting up, carrying out, and analyzing ecosystem water balance
simulation experiments with SOILWAT2.
Depends:
R (>= 3.3.0)
Imports:
rSOILWAT2 (>= 2.3.0),
RSQLite (>= 2.0),
DBI (>= 0.7),
rSOILWAT2 (>= 2.3.2),
RSQLite (>= 2.1.1),
DBI (>= 1.0),
Rcpp (>= 0.12.12),
raster (>= 2.5.8),
sp (>= 1.2.3),
Expand All @@ -38,7 +41,7 @@ Suggests:
dplyr,
knitr,
rmarkdown,
testthat,
testthat (>= 2.0.0),
covr,
lintr
Remotes:
Expand All @@ -49,7 +52,7 @@ LazyData: true
ByteCompile: true
NeedsCompilation: yes
License: GPL-3 + file LICENSE
URL: https://github.com/Burke-Lauenroth-Lab/rSFSW2
BugReports: https://github.com/Burke-Lauenroth-Lab/rSFSW2/issues
URL: https://github.com/DrylandEcology/rSFSW2
BugReports: https://github.com/DrylandEcology/rSFSW2/issues
RoxygenNote: 6.0.1
VignetteBuilder: knitr
44 changes: 24 additions & 20 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export(ExtractGriddedDailyWeatherFromMaurer2002_NorthAmerica)
export(ExtractGriddedDailyWeatherFromNRCan_10km_Canada)
export(Grass_ANPP)
export(GriddedDailyWeatherFromNCEPCFSR_Global)
export(PotNatVeg_Composition_Estimate_ShrubsC3C4_Fraction)
export(PotNatVeg_MonthlyBiomassPhenology_from_Climate)
export(PrepareClimateScenarios)
export(SMR_logic)
export(SMR_names)
Expand All @@ -25,8 +23,8 @@ export(TranspCoeffByVegType)
export(VWCtoSWP)
export(align_with_target_grid)
export(align_with_target_res)
export(calc_BareSoilEvaporationCoefficientsFromSoilTexture)
export(calc_ExtendSoilDatafileToRequestedSoilLayers)
export(calc_BareSoilEvapCoefs)
export(calc_RequestedSoilLayers)
export(calc_SiteClimate)
export(check_aggregated_output)
export(check_cltool)
Expand All @@ -37,27 +35,33 @@ export(check_rSFSW2_project_input_data)
export(check_weatherDB)
export(climscen_metadata)
export(compare_test_output)
export(compare_two_dbOutput)
export(compile_overall_timer)
export(convert_precipitation)
export(convert_temperature)
export(create_dbWork)
export(crs_units)
export(dbConnect2)
export(dbExecute2)
export(dbOutput_ListDesignTables)
export(dbOutput_ListInternalTables)
export(dbOutput_ListOutputTables)
export(dbOutput_Tables_have_SoilLayers)
export(dbOutput_update_OverallAggregationTable)
export(dbW_sites_with_missingClimScens)
export(dbWork_check)
export(dbWork_Ntodo)
export(dbWork_agg_timing)
export(dbWork_check_design)
export(dbWork_check_granular)
export(dbWork_check_run)
export(dbWork_check_status)
export(dbWork_clean)
export(dbWork_redo)
export(dbWork_report_completion)
export(dbWork_timing)
export(dbWork_todos)
export(dbWork_update_job)
export(delete_test_output)
export(determine_simulation_size)
export(dir_safe_create)
export(doQmapQUANT_drs)
export(do_ExtractSkyDataFromNCEPCFSR_Global)
export(do_OneSite)
export(do_compare)
export(do_prior_TableLookups)
Expand All @@ -66,15 +70,19 @@ export(downscale.deltahybrid)
export(downscale.deltahybrid3mod)
export(downscale.raw)
export(enable_debug_dump)
export(estimate_PotNatVeg_biomass)
export(estimate_PotNatVeg_composition)
export(exit_SFSW2_cluster)
export(export_objects_to_workers)
export(extract_SFSW2_cells_from_raster)
export(extract_SFSW2_cells_from_shp)
export(extract_SFSW2_points_from_shp)
export(extract_blocks)
export(extract_climate_NCEPCFSR)
export(extract_daily_weather_from_livneh)
export(extract_from_external_raster_old)
export(extract_rSFSW2)
export(find_sites_with_bad_weather)
export(gather_objects_for_export)
export(generate_OverallAggregation_fields)
export(generate_RNG_streams)
Expand All @@ -100,9 +108,11 @@ export(it_sim0)
export(it_sim2)
export(it_site)
export(it_site2)
export(kill_seedling)
export(list.dbTables)
export(list.dbVariables)
export(list.dbVariablesOfAllTables)
export(load_preprocessed_inputs)
export(local_weatherDirName)
export(lock_access)
export(lock_attempt)
Expand All @@ -114,9 +124,9 @@ export(missing_Pids_outputDB)
export(move_output_to_dbOutput)
export(mpi_work)
export(populate_rSFSW2_project_with_data)
export(prepare_climatedata_netCDF_files)
export(prepare_climatedata_netCDFs)
export(quickprepare_dbOutput_dbWork)
export(read_SOILWAT2_FileDefaults)
export(read_SOILWAT2_DefaultInputs)
export(read_time_netCDF)
export(reaggregate_raster)
export(reaggregate_shapefile)
Expand All @@ -126,7 +136,6 @@ export(remove_lock)
export(run_simulation_experiment)
export(run_test_projects)
export(save_to_rds_with_backup)
export(setFALSE_SeedlingSurvival_1stSeason)
export(set_RNG_stream)
export(set_full_RNG)
export(set_options_warn_error)
Expand All @@ -137,22 +146,17 @@ export(setup_rSFSW2_project_infrastructure)
export(setup_spatial_simulation)
export(simulate_SOILWAT2_experiment)
export(unlock_access)
export(update_actions)
export(update_intracker)
export(upgrade_datafile)
export(upgrade_prodin_v10_to_v11)
export(upgrade_soilsin_v11_to_v12)
export(weighted.agg)
import(RSQLite)
import(methods)
importClassesFrom(raster,Raster)
importClassesFrom(sp,SpatialPoints)
importClassesFrom(sp,SpatialPolygons)
importFrom(Rcpp,evalCpp)
importFrom(Rcpp,sourceCpp)
importFrom(methods,"slot<-")
importFrom(methods,as)
importFrom(methods,isGeneric)
importFrom(methods,new)
importFrom(methods,setGeneric)
importFrom(methods,setMethod)
importFrom(methods,signature)
importFrom(methods,slot)
useDynLib(rSFSW2, .registration = TRUE)
Loading

0 comments on commit 45ef6ab

Please sign in to comment.