Skip to content

Commit

Permalink
Merge branch 'develop' into use-pak-for-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
infotroph authored Oct 3, 2024
2 parents 4bfe6fe + 08998d2 commit edaa1bb
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 59 deletions.
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ $(subst .doc/models/template,,$(MODELS_D)): .install/models/template
### Order-only dependencies
# (i.e. prerequisites must exist before building target, but
# target need not be rebuilt when a prerequisite changes)

.doc/base/all: | $(ALL_PKGS_D)
.install/base/all: | $(ALL_PKGS_I)
.check/base/all: | $(ALL_PKGS_C)
.test/base/all: | $(ALL_PKGS_T)

include Makefile.depends

clean:
Expand Down
3 changes: 1 addition & 2 deletions base/all/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Package: PEcAn.all
Type: Package
Title: PEcAn functions used for ecological forecasts and
reanalysis
Title: PEcAn Functions Used for Ecological Forecasts and Reanalysis
Version: 1.8.0.9000
Authors@R: c(person("Mike", "Dietze", role = c("aut"),
email = "[email protected]"),
Expand Down
24 changes: 13 additions & 11 deletions base/all/R/pecan_version.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,24 @@ pecan_version <- function(version = max(PEcAn.all::pecan_releases$version),
all_pkgs <- sessioninfo::package_info(pkgs = "installed", dependencies = FALSE)
our_pkgs <- all_pkgs[grepl("PEcAn", all_pkgs$package),]

# Why do we need this when `pkgs = "installed"` usually shows loaded too?
# Because there are times a package is loaded but not installed
# (e.g. notably during R CMD check)
all_loaded <- sessioninfo::package_info(pkgs = "loaded", dependencies = FALSE)
our_loaded <- all_loaded[grepl("PEcAn", all_loaded$package),]

unloaded <- our_pkgs[!our_pkgs$package %in% our_loaded$package,]
our_pkgs <- rbind(our_loaded, unloaded)
our_pkgs <- our_pkgs[order(our_pkgs$package),]


# TODO: consider using package_info's callouts of packages where loaded and
# installed versions mismatch -- it's a more elegant version of what we
# were trying for with the "multiple rows for packages with multiple
# versions found" behavior.
our_pkgs$installed <- ifelse(
test = is.na(our_pkgs$loadedversion),
yes = our_pkgs$ondiskversion,
no = our_pkgs$loadedversion)
our_pkgs <- our_pkgs[, c("package", "installed", "source")]
our_pkgs <- merge(
x = our_pkgs[, c("package", "ondiskversion", "source")],
y = our_loaded[, c("package", "loadedversion", "source")],
by.x = c("package", "ondiskversion", "source"),
by.y = c("package", "loadedversion", "source"),
all = TRUE,
sort = TRUE)
colnames(our_pkgs) <- c("package", "installed", "source")
our_pkgs$installed <- package_version(our_pkgs$installed)

} else {
Expand All @@ -89,7 +90,8 @@ pecan_version <- function(version = max(PEcAn.all::pecan_releases$version),
package = names(our_loaded),
installed = sapply(our_loaded, `[[`, "Version"))
our_loaded$installed <- package_version(our_loaded$installed)
our_pkgs <- merge(our_pkgs, our_loaded, all = TRUE)
our_pkgs <- merge(our_pkgs, our_loaded, all = TRUE, sort = TRUE)
our_pkgs <- our_pkgs[!duplicated(our_pkgs),]
}


Expand Down
5 changes: 5 additions & 0 deletions base/all/data/pecan_version_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ for (col in colnames(pecan_version_history)) {
strict = strict)
}
}

# Now remove local vars
# Yes, this really is needed: _all_ objects left defined at end of script
# will be added to the package data list!
rm(strict, na_version, col)
39 changes: 0 additions & 39 deletions base/all/tests/Rcheck_reference.log
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,6 @@ New submission

Version contains large components (1.7.2.9000)

License components with restrictions and base license permitting such:
BSD_3_clause + file LICENSE
File 'LICENSE':
University of Illinois/NCSA Open Source License

Copyright (c) 2012, University of Illinois, NCSA. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal with the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimers.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
- Neither the names of University of Illinois, NCSA, nor the names
of its contributors may be used to endorse or promote products
derived from this Software without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.

Strong dependencies not in mainstream repositories:
PEcAn.DB, PEcAn.settings, PEcAn.MA, PEcAn.logger, PEcAn.utils,
PEcAn.uncertainty, PEcAn.data.atmosphere, PEcAn.data.land,
Expand All @@ -54,13 +22,6 @@ Strong dependencies not in mainstream repositories:
Suggests or Enhances not in mainstream repositories:
PEcAn.ED2, PEcAn.SIPNET, PEcAn.BIOCRO, PEcAn.DALEC, PEcAn.LINKAGES,
PEcAn.allometry, PEcAn.photosynthesis

The Title field should be in title case. Current version is:
‘PEcAn functions used for ecological forecasts and reanalysis’
In title case that is:
‘PEcAn Functions Used for Ecological Forecasts and Reanalysis’

The Date field is over a month old.
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Depends: includes the non-default packages:
Expand Down
2 changes: 1 addition & 1 deletion book_source/01_introduction/01_project_overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Predictive Ecosystem Analyzer (PEcAn) is an integrated informatics toolbox for ecosystem modeling (Dietze et al. 2013, LeBauer et al. 2013). PEcAn consists of:

1. An application program interface (API) that encapsulates an ecosystem model, providing a common interface, inputs, and output.
1. An application program interface (API) that encapsulates an ecosystem model, providing a common interface, inputs, and output
2. Core utilities for handling and tracking model runs and the flows of information and uncertainties into and out of models and analyses
3. An accessible web-based user interface and visualization tools
4. An extensible collection of modules to handle specific types of analyses (sensitivity, uncertainty, ensemble), model-data syntheses (benchmarking, parameter data assimilation, state data assimilation), and data processing (model inputs and data constraints)
Expand Down
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ services:

# webserver to handle all traffic. This can use let's encrypt to generate a SSL cert.
traefik:
hostname: traefik
image: "traefik:v2.9"
command:
- --log.level=INFO
Expand Down Expand Up @@ -38,6 +39,7 @@ services:

# rabbitmq to connect to extractors
rabbitmq:
hostname: rabbitmq
image: rabbitmq:3.8-management
restart: unless-stopped
networks:
Expand All @@ -64,6 +66,7 @@ services:

# postgresql + postgis to hold all the data
postgres:
hostname: postgres
image: mdillon/postgis:9.5
restart: unless-stopped
networks:
Expand All @@ -80,6 +83,7 @@ services:
# BETY rails frontend to the database
# ----------------------------------------------------------------------
bety:
hostname: bety
image: pecan/bety:${BETY_VERSION:-latest}
restart: unless-stopped
networks:
Expand Down Expand Up @@ -108,6 +112,7 @@ services:
# RStudio
# ----------------------------------------------------------------------
rstudio:
hostname: rstudio
image: pecan/base:${PECAN_VERSION:-latest}
command: /work/rstudio.sh
restart: unless-stopped
Expand Down Expand Up @@ -151,6 +156,7 @@ services:

# PEcAn documentation as well as PEcAn home page
docs:
hostname: docs
image: pecan/docs:${PECAN_VERSION:-latest}
restart: unless-stopped
networks:
Expand All @@ -167,6 +173,7 @@ services:

# PEcAn web front end, this is just the PHP code
pecan:
hostname: pecan-web
user: "${UID:-1001}:${GID:-1001}"
image: pecan/web:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand Down Expand Up @@ -197,6 +204,7 @@ services:

# PEcAn model monitor
monitor:
hostname: monitor
user: "${UID:-1001}:${GID:-1001}"
image: pecan/monitor:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand Down Expand Up @@ -225,6 +233,7 @@ services:

# PEcAn executor, executes jobs. Does not the actual models
executor:
hostname: executor
user: "${UID:-1001}:${GID:-1001}"
image: pecan/executor:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand All @@ -248,6 +257,7 @@ services:
# ----------------------------------------------------------------------
# PEcAn FATES model runner
fates:
hostname: fates
user: "${UID:-1001}:${GID:-1001}"
image: ghcr.io/noresmhub/ctsm-api:latest
restart: unless-stopped
Expand All @@ -263,6 +273,7 @@ services:

# PEcAn basgra model runner
basgra:
hostname: basgra
user: "${UID:-1001}:${GID:-1001}"
image: pecan/model-basgra-basgra_n_v1.0:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand All @@ -278,6 +289,7 @@ services:

# PEcAn sipnet model runner
sipnet:
hostname: sipnet-git
user: "${UID:-1001}:${GID:-1001}"
image: pecan/model-sipnet-git:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand All @@ -293,6 +305,7 @@ services:

# PEcAn ED model runner
ed2:
hostname: ed2-2_2_0
user: "${UID:-1001}:${GID:-1001}"
image: pecan/model-ed2-2.2.0:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand All @@ -308,6 +321,7 @@ services:

# PEcAn MAESPA model runner
maespa:
hostname: maespa-git
user: "${UID:-1001}:${GID:-1001}"
image: pecan/model-maespa-git:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand All @@ -323,6 +337,7 @@ services:

# PEcAn BioCro model runner
biocro:
hostname: biocro-0_95
user: "${UID:-1001}:${GID:-1001}"
image: pecan/model-biocro-0.95:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand All @@ -341,6 +356,7 @@ services:
# ----------------------------------------------------------------------
# PEcAn DB Sync visualization
dbsync:
hostname: dbsync
image: pecan/shiny-dbsync:${PECAN_VERSION:-latest}
restart: unless-stopped
networks:
Expand All @@ -363,6 +379,7 @@ services:
# PEcAn API
# ----------------------------------------------------------------------
api:
hostname: api
user: "${UID:-1001}:${GID:-1001}"
image: pecan/api:${PECAN_VERSION:-latest}
restart: unless-stopped
Expand Down

0 comments on commit edaa1bb

Please sign in to comment.