Skip to content

Commit

Permalink
big commit with license (fixes PecanProject#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed Jul 16, 2012
1 parent d426452 commit edd21de
Show file tree
Hide file tree
Showing 163 changed files with 1,366 additions and 214 deletions.
2 changes: 1 addition & 1 deletion .bzrignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data/FIA/tmp/
web/STATUS

# files generated by updatedescription.sh
DESCRIPTION-e
DESCRIPTION.bak

# files generated by autobuild.sh
autobuild
Expand Down
2 changes: 1 addition & 1 deletion all/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Package
Title: PEcAn functions used for ecological forecasts and
reanalysis
Version: 1.2
Date: 2012-06-13
Date: 2012-07-15
Author: David LeBauer, Mike Dietze, Xiaohui Feng, Dan Wang,
Mike Dietze, Carl Davidson, Rob Kooper, Shawn Serbin
Maintainer: David LeBauer <[email protected]>
Expand Down
8 changes: 8 additions & 0 deletions all/inst/tests/test.bety.depreciation.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------

## test for feature 896
test_that("all references to BETY have been removed from source code",{
Expand Down
8 changes: 8 additions & 0 deletions all/inst/tests/test.workflow.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
context("tests of overall workflow")

settings <<- read.settings("test.settings.xml")
Expand Down
2 changes: 1 addition & 1 deletion common/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Package
Title: PEcAn functions used for ecological forecasts and
reanalysis
Version: 1.2
Date: 2012-06-01
Date: 2012-07-15
Author: David LeBauer, Mike Dietze, Xiaohui Feng, Dan Wang,
Mike Dietze, Carl Davidson, Rob Kooper, Shawn Serbin
Maintainer: David LeBauer <[email protected]>
Expand Down
Empty file modified common/R/help.R
100755 → 100644
Empty file.
8 changes: 8 additions & 0 deletions common/inst/tests/test.read.settings.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
## require(XML)

## context("tests for read.settings and related functions")
Expand Down
8 changes: 8 additions & 0 deletions common/tests/run.all.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
library(testthat)
library(PEcAn.common)

Expand Down
2 changes: 1 addition & 1 deletion db/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: PEcAn.DB
Type: Package
Title: PEcAn functions used for ecological forecasts and reanalysis
Version: 1.2
Date: 2012-06-01
Date: 2012-07-15
Author: David LeBauer, Mike Dietze, Xiaohui Feng, Dan Wang, Mike Dietze, Carl
Davidson, Rob Kooper, Shawn Serbin
Maintainer: David LeBauer <[email protected]>
Expand Down
8 changes: 8 additions & 0 deletions db/R/get.trait.data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------#
##'
##' @name get.trait.data
Expand Down
8 changes: 8 additions & 0 deletions db/R/query.allom.data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
## Module to grab allometric information from the raw data table
## Will grab both original field data and tallied equations
##
Expand Down
8 changes: 8 additions & 0 deletions db/R/query.base.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#---------------- Base database query function. ---------------------------------------------------#
##' Generic function to query trait database
##'
Expand Down
8 changes: 8 additions & 0 deletions db/R/query.pft.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------#
##' select plant id's associated with pft
##'
Expand Down
8 changes: 8 additions & 0 deletions db/R/query.prior.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------#
##' Query priors associated with a string of traits and plant functional type
##'
Expand Down
8 changes: 8 additions & 0 deletions db/R/query.trait.data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------#
##' Queries data from the trait database and transforms statistics to SE
##'
Expand Down
8 changes: 8 additions & 0 deletions db/R/query.traits.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------#
##' Query available trait data associated with a given pft and a list of traits
##'
Expand Down
8 changes: 8 additions & 0 deletions db/inst/tests/derive.traits.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
test_that("take.samples works";{
expect_equal(take.samples(summary = data.frame(mean = 1, stat = NA)), 1)
set.seed(0)
Expand Down
8 changes: 8 additions & 0 deletions db/inst/tests/test.query.base.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
## This won't work for me remotely. We need to figure out how to connect remotely for this test.
#test_that("query.base does not keep opening connections without closing them", {
# newcon <- function() dbConnect("MySQL", group = "ebi_analysis", dbname = "ebi_analysis", password = "b742xsAu", username = "ebi_analys_user", host = 'ebi-forecast.igb.uiuc.edu', port=3306)
Expand Down
8 changes: 8 additions & 0 deletions db/tests/run.all.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
library(testthat)
library(PEcAn.DB)

Expand Down
8 changes: 8 additions & 0 deletions db/working/query.trait.data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------#
##' Queries data from BETY and transforms statistics to SE
##'
Expand Down
8 changes: 8 additions & 0 deletions db/working/query.trait.data.new.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------#
##'
##'
Expand Down
8 changes: 8 additions & 0 deletions db/working/test.query.bety.trait.data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
dvr <- dbDriver("MySQL")
newcon <- function() dbConnect(dvr, group = "bety", dbname = "bety", password = "3Magic", username = "dlebauer")
lapply(dbListConnections(drv = drv), dbDisconnect)
Expand Down
8 changes: 8 additions & 0 deletions db/working/transform.trait.data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------#
##'
##' Transforms statistics to SE for data queried from the database and scales relevant traits to a common temperature
Expand Down
4 changes: 2 additions & 2 deletions depreciated/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: PEcAn
Type: Package
Title: PEcAn functions used for ecological forecasts and reanalysis
Version: 1.2
Date: 2012-05-25
Date: 2012-07-15
Author: David LeBauer, Mike Dietze, Xiaohui Feng, Dan Wang, Mike Dietze, Carl
Davidson, Rob Kooper
Maintainer: David LeBauer <[email protected]>
Expand All @@ -27,7 +27,7 @@ Suggests:
time
SystemRequirements: JAGS2.2.0, bash, ED2, kepler
OS_type: unix
License: University of Illinois/NCSA Open Source License
License: FreeBSD + file LICENSE
Copyright: Energy Biosciences Institute, Authors
LazyLoad: yes
Collate:
Expand Down
8 changes: 8 additions & 0 deletions depreciated/R/dtheta.q.R
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
dtheta.q <- function(x, tr, q) {
## find the quantile of the mean
q.mean <- mean(mean(x) >= x)
Expand Down
8 changes: 8 additions & 0 deletions depreciated/R/pecan.arrange.R
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
vp.layout <- function(x, y) viewport(layout.pos.row=x, layout.pos.col=y)
arrange <- function(..., nrow=NULL, ncol=NULL, as.table=FALSE) {
dots <- list(...)
Expand Down
8 changes: 8 additions & 0 deletions depreciated/R/pecan.dtheta.R
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
pecan.dtheta <- function(samps, q){
##calculate values of:
## dtheta_0.35, dtheta_0.5, dtheta_0.65
Expand Down
8 changes: 8 additions & 0 deletions depreciated/R/pecan.samps.R
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
pecan.samps <- function(trait.mcmc, priors) {
trait.mat <- lapply(trait.mcmc, as.matrix)
trait.nrows <- lapply(trait.mat, function(x) nrow(x))
Expand Down
8 changes: 8 additions & 0 deletions depreciated/bash/allom.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
echo "start allometry analysis"
env PECANSETTINGS=$1 R --vanilla < ./rscripts/AllomAve.R
wait
Expand Down
8 changes: 8 additions & 0 deletions depreciated/bash/batch.jobs.lowp.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
for f in ED2INc*[0-9n]; do
LOG="$f-`date +%Y.%m.%d-%H.%M`.log" #name with date tag for log files, one per ED2IN file
if which qsub > /dev/null; then
Expand Down
8 changes: 8 additions & 0 deletions depreciated/bash/batch.jobs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
for f in ED2INc2*[0-9n]; do
LOG="$f-`date +%Y.%m.%d-%H.%M`.log" #name with date tag for log files, one per ED2IN file
if which qsub > /dev/null; then
Expand Down
8 changes: 8 additions & 0 deletions depreciated/bash/clean.nodes.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------
for i in {1..24}
do
ssh compute-0-$i "rm -rf /scratch/*"
Expand Down
8 changes: 8 additions & 0 deletions depreciated/bash/cleanvm.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------

# run this as:
# history -c && ./cleanvm.sh
Expand Down
8 changes: 8 additions & 0 deletions depreciated/bash/create.db.subset.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
#-------------------------------------------------------------------------------

# to be run after dump.db.subset.sh

Expand Down
Loading

0 comments on commit edd21de

Please sign in to comment.