Skip to content
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

use hotfix for cladetime #176

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/get_clades_to_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "cladetime@git+https://github.com/reichlab/cladetime",
# "cladetime@git+https://github.com/reichlab/cladetime@elr/use_metadata_url",
# "polars",
# ]
# ///
Expand Down
8 changes: 8 additions & 0 deletions src/make_round_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ get_latest_clade_file <- function(hub_dir) {
#' @param hub_root Character vector. The full path to the hub's root directory.
#' @returns A round object.
create_new_round <- function(hub_root) {
the_schema <- "v3.0.1"
this_round_clade_file <- get_latest_clade_file(hub_root)
this_round_clade_list <- fromJSON(this_round_clade_file$clade_file)$clades
this_round_date <- this_round_clade_file$round_id
Expand All @@ -57,15 +58,18 @@ create_new_round <- function(hub_root) {
hubAdmin::create_model_task(
task_ids = hubAdmin::create_task_ids(
hubAdmin::create_task_id("nowcast_date",
schema = the_schema,
required = list(this_round_date),
optional = NULL
),
hubAdmin::create_task_id("target_date",
schema = the_schema,
required = NULL,
## target date is nowcast_date and the three prior weeks
optional = as.character(seq(as.Date(this_round_date) - 31, as.Date(this_round_date) + 10, by = "day"))
),
hubAdmin::create_task_id("location",
schema = the_schema,
required = NULL,
optional = c(
"AL", "AK", "AZ", "AR", "CA", "CO",
Expand All @@ -80,18 +84,21 @@ create_new_round <- function(hub_root) {
)
),
hubAdmin::create_task_id("clade",
schema = the_schema,
required = this_round_clade_list,
optional = NULL
)
),
output_type = hubAdmin::create_output_type(
hubAdmin::create_output_type_mean(
schema = the_schema,
is_required = FALSE,
value_type = "double",
value_minimum = 0L,
value_maximum = 1L
),
hubAdmin::create_output_type_sample(
schema = the_schema,
is_required = FALSE,
output_type_id_type = "character",
max_length = 15L,
Expand All @@ -104,6 +111,7 @@ create_new_round <- function(hub_root) {
),
target_metadata = hubAdmin::create_target_metadata(
hubAdmin::create_target_metadata_item(
schema = the_schema,
target_id = "clade prop",
target_name = "Daily nowcasted clade proportions",
target_units = "proportion",
Expand Down