Skip to content

Commit

Permalink
fixes PecanProject#1073 and tests that packages listed in check.all.s…
Browse files Browse the repository at this point in the history
…h match packages in all/data/pecan.packages.csv
  • Loading branch information
dlebauer committed Aug 31, 2012
1 parent 97b6598 commit b8c91ab
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 43 deletions.
1 change: 1 addition & 0 deletions .bzrignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ running
.project
.settings
.buildpath
all/inst/tests/$HOME
5 changes: 3 additions & 2 deletions all/data/pecan.packages.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
1;2;3;4;5;6;7;8;9;10;11;12
"utils";"common";"db";"modules/meta.analysis";"modules/uncertainty";"modules/emulator";"modules/assim.batch";"modules/assim.sequential";"modules/data.land";"models/c4photo";"models/ed";"models/sipnet";"all"
1;2;3;4;5;6;7;8;9;10;11;12;13;14
"utils";"common";"db";"modules/meta.analysis";"modules/uncertainty";"modules/emulator";"modules/assim.batch";"modules/assim.sequential";"modules/data.land";"modules/rtm";"models/c4photo";"models/ed";"models/sipnet";"all"


9 changes: 0 additions & 9 deletions all/inst/tests/checkall.R

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
test_that("take.samples works";{
test_that("take.samples works",{
expect_equal(take.samples(summary = data.frame(mean = 1, stat = NA)), 1)
set.seed(0)
test.sample <- take.samples(summary = data.frame(mean = 1, stat = 1),
sample.size = 2)
expect_equal(test.sample, c(2.26295428488079, 0.673766639294351))
})

test_that("derive.trait works";{
test_that("derive.traits works",{
set.seed(0)
input <- list(x = data.frame(mean = 1, stat = 1, n = 1))
test.derived <- derive.trait(FUN = function(x){1/x},
Expand Down
3 changes: 1 addition & 2 deletions models/c4photo/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export(remove.config.SIPNET)
export(remove.config.c4photo)
export(write.config.c4photo)
import(PEcAn.utils)
27 changes: 0 additions & 27 deletions models/c4photo/R/write.configs.c4photo.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,6 @@ write.config.c4photo <- function(defaults = NULL,
}
#==================================================================================================#


#--------------------------------------------------------------------------------------------------#
##'
##' @name write.run.generic
##' @title Function to generate generic model run script files
##' @author
##' @import PEcAn.utils
#--------------------------------------------------------------------------------------------------#
write.run.generic <- function(settings){
run.script.template = system.file("data", "run.template.generic", package="PEcAn.generic")
run.text <- scan(file = run.script.template,
what="character",sep='@', quote=NULL, quiet=TRUE)
run.text <- gsub('TMP', paste("/scratch/",Sys.getenv("USER"),sep=""), run.text)
run.text <- gsub('BINARY', settings$run$host$ed$binary, run.text)
run.text <- gsub('OUTDIR', settings$run$host$outdir, run.text)
runfile <- paste(settings$outdir, 'run', sep='')
writeLines(run.text, con = runfile)
if(settings$run$host$name == 'localhost') {
system(paste('cp ', runfile, settings$run$host$rundir))
}else{
system(paste("rsync -outi ", runfile , ' ', settings$run$host$name, ":",
settings$run$host$rundir, sep = ''))
}
}
#==================================================================================================#


#--------------------------------------------------------------------------------------------------#
##'
##' Clear out previous config and parameter files.
Expand Down
2 changes: 1 addition & 1 deletion scripts/check.all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
for f in common utils db modules/meta.analysis modules/uncertainty modules/rtm models/ed
for f in utils common db modules/meta.analysis modules/uncertainty modules/emulator modules/assim.batch modules/assim.sequential modules/data.land modules/rtm models/c4photo models/ed models/sipnet all
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
Expand Down

0 comments on commit b8c91ab

Please sign in to comment.