-
Notifications
You must be signed in to change notification settings - Fork 240
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
Various minor updates (duplicate of broken #1149) #1151
Conversation
- Default to not forcing trait data update - Create PFT directory if not already (currently done by check.settings too, but no need for get.trait.data to rely on that)
Plus re-roxygenize
Prevents too many open connections. on.exit runs when the function exits, even on error.
This was causing bugs for me when running multiple workflows at once (not too hard to get two with the same "now" timestamp), and it also addresses PecanProject#1083
browndog = settings$browndog) | ||
settings$run$inputs[[i]][["path"]] <- result | ||
status.end() | ||
if (is.null(input$path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear why status.check was removed from this if statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accident. Reverted.
@@ -23,7 +23,7 @@ ensemble.filename <- function(settings, prefix = "ensemble.samples", suffix = "R | |||
ensemble.id <- "NOENSEMBLEID" | |||
} | |||
|
|||
ensemble.dir <- settings$outdir | |||
ensemble.dir <- file.path(settings$outdir, 'ensemble.samples') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to put the ensemble samples in their own directory rather than in the base outdir. This will make them unaccessible via the web interface. Not sure the reason for this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Well, the reason for this change is that it's obnoxious to have hundreds of *.samples.Rdata files in the root workflow dir if you're doing a big Multi run. But I reverted anyway, since obviously breaking the web interface is worse.
} else { | ||
ind <- which(sapply(settings$pfts, function(x) x$name) == pft) | ||
if (length(ind) == 0) { | ||
## no match | ||
logger.warn("sensitivity.filename: unmatched PFT = ", pft, " not among ", | ||
sapply(settings$pfts, function(x) x$name)) | ||
sensitivity.dir <- file.path(settings$outdir, "pfts", pft) | ||
sensitivity.dir <- file.path(settings$outdir, "pfts", pft, "sensitivity.samples") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same issue as above with ensemble.dir
@@ -76,14 +76,14 @@ sensitivity.filename <- function(settings, | |||
|
|||
if (is.null(pft)) { | |||
# Goes in main output directory. | |||
sensitivity.dir <- settings$outdir | |||
sensitivity.dir <- file.path(settings$outdir, 'sensitivity.samples') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same issue as above with ensemble.dir
@@ -95,7 +95,7 @@ sensitivity.filename <- function(settings, | |||
## no outdir | |||
settings$pfts[[ind]]$outdir <- file.path(settings$outdir, "pfts", pft) | |||
} | |||
sensitivity.dir <- settings$pfts[[ind]]$outdir | |||
sensitivity.dir <- file.path(settings$pfts[[ind]]$outdir, "sensitivity.samples") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same issue as above with ensemble.dir
Description
try()
, check now for a result of class 'try-error' rather than 'character'get.parameter.samples
moved to utils package, which is the main place it's useddo.conversions
NOW()
for finding just-added BETY entries.RETURNING
keyword is cleaner and safer.Motivation and Context
Fixing / cleaning things as they come up while setting up my multisite runs
Types of changes
Checklist: