Skip to content

Commit

Permalink
Merge pull request #63 from reichlab/loadlatestsource
Browse files Browse the repository at this point in the history
Use specified source for call to get_all_models in load_latest_forecasts
  • Loading branch information
Serena-Wang authored Dec 10, 2020
2 parents 5cbd59b + ead0f35 commit be574df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ This is the first version of the package with a 0.x release.
### Package updates
- details on other changes will be listed here for future updates
- added initial author/contributor list

## v 0.1
- initial release: big plotting changes
- v0.1.1 : in load_latest_forecasts, use provided source for calls to lower level functions
8 changes: 7 additions & 1 deletion R/load_latest_forecasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ load_latest_forecasts <- function (
hub_repo_path) {

# validate models
all_valid_models <- get_all_models(source = "remote_hub_repo")
if (missing(hub_repo_path)) {
all_valid_models <- get_all_models(source = source)
} else {
all_valid_models <- get_all_models(
source = source,
hub_repo_path = hub_repo_path)
}

if (!missing(models)){
models <- match.arg(models, choices = all_valid_models, several.ok = TRUE)
Expand Down

0 comments on commit be574df

Please sign in to comment.