From 527258fbd73bf38bcb6e9c6d4aaab06c2acd5a8b Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Mon, 7 Oct 2024 10:07:03 +0300 Subject: [PATCH 01/19] Update new version branch naming instruction to use `br-` prefix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d516fca..a24c54a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ After making a new release to the schema repository, ensure `hubDocs` are also a ## New schema version development process -- New schema versions should be developed in a separate branch. Name the branch `v{version-number}-branch` to avoid creating release tags which share the same name as a branch later on. +- New schema versions should be developed in a separate branch. Name the branch `br-v{version-number}` to avoid creating release tags which share the same name as a branch later on. - New version branches should be merged into `main` when ready to released. - Merging into `main` should be accompanied by creating an associated formal release in the repository. - Re-run all tests in `hubAdmin`, address any introduced problems and update snapshots to latest schema version. From a813ebb1932510b6ae56d87fa2e772575c7301dd Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 12:19:18 +0300 Subject: [PATCH 02/19] Create v4.0.0 directory --- v4.0.0/admin-schema.json | 680 +++++++++++++++++++++ v4.0.0/tasks-schema.json | 1213 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1893 insertions(+) create mode 100644 v4.0.0/admin-schema.json create mode 100644 v4.0.0/tasks-schema.json diff --git a/v4.0.0/admin-schema.json b/v4.0.0/admin-schema.json new file mode 100644 index 0000000..fedda4b --- /dev/null +++ b/v4.0.0/admin-schema.json @@ -0,0 +1,680 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/admin-schema.json", + "title": "Schema for Modeling Hub administrative settings", + "description": "This JSON file provides a schema for modeling hub administrative information.", + "type": "object", + "properties": { + "schema_version": { + "description": "URL to a version of the Modeling Hub schema admin-schema.json file (see https://github.com/hubverse-org/schemas). Used to declare the schema version an 'admin.json' file is written for and for config file validation. The URL provided should be the URL to the raw content of the schema file on GitHub.", + "examples": ["https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.0/admin-schema.json"], + "type": "string", + "format": "uri" + }, + "name": { + "description": "The name of the hub.", + "type": "string", + "examples": ["US COVID-19 Forecast Hub​"] + }, + "maintainer": { + "description": "The entity that maintains and runs the hub.", + "type": "string", + "examples": ["The Consortium of Infectious Disease Modeling Hubs"] + }, + "contact": { + "description": "The name and email of a human being who serves as a point of contact for the hub.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + } + } + }, + "repository": { + "description": "Object containing details of the hub repository.", + "examples": [ + { + "host": "github", + "owner": "hubverse-org", + "name": "example-simple-forecast-hub" + } + ], + "type": "object", + "properties": { + "host": { + "description": "The name of the web host for the hub repository", + "type": "string", + "enum": ["github"] + }, + "owner": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "zoltar_project_id": { + "description": "The project id of the Hub in Zoltar", + "type": "integer", + "examples": [44] + }, + "citation": { + "description": "One or more citations for the hub.", + "type": "string", + "examples": ["Cramer, E.Y., Huang, Y., Wang, Y. et al. The United States COVID-19 Forecast Hub dataset. Sci Data 9, 462 (2022). https://doi.org/10.1038/s41597-022-01517-w"] + }, + "file_format": { + "description": "Accepted file formats of model output files.", + "examples": [ + [ + "arrow", "parquet" + ], + ["csv"] + ], + "type": "array", + "items": { + "type": "string", + "enum": ["csv", "parquet", "arrow"] + } + }, + "timezone": { + "description": "Hub timezone in TZ database name format. Used primarily for determining exact time of submission deadlines.", + "examples": [ + "Africa/Cairo", "America/Sao_Paulo", "Asia/Bangkok", "US/Eastern", "Europe/Berlin" + ], + "type": "string", + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port_of_Spain", + "America/Port-au-Prince", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/North", + "Australia/NSW", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Samoa" + ] + }, + "model_output_dir": { + "description": "Relative path, with respect to the root of hub, to directory containing model output data. If property not supplied, the default path `model-output` assumed", + "default": "model-output", + "examples": [ + "forecasts", "data/model_output" + ], + "type": "string" + }, + "cloud": { + "description": "Optional settings for cloud-enabled hubs", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "host": { + "type": "object", + "required": [ + "name", "storage_service", "storage_location" + ], + "properties": { + "name": { + "description": "Name of the cloud storage provider.", + "type": "string", + "enum": ["aws"] + }, + "storage_service": { + "description": "Name of the cloud service used as backend storage", + "type": "string", + "enum": ["s3"] + }, + "storage_location": { + "description": "Cloud storage location, excluding prefix (for example, AWS S3 bucket name).", + "type": "string" + } + } + } + }, + "if": { + "properties": { + "enabled": { + "const": true + } + } + }, + "then": { + "required": ["host"] + }, + "examples": [ + { + "enabled": true, + "host": { + "name": "aws", + "storage_service": "s3", + "storage_location": "hub-s3-bucket-name" + } + } + ] + } + }, + "required": [ + "schema_version", + "name", + "maintainer", + "contact", + "repository", + "file_format", + "timezone" + ], + "additionalProperties": false +} diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json new file mode 100644 index 0000000..4abb986 --- /dev/null +++ b/v4.0.0/tasks-schema.json @@ -0,0 +1,1213 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/tasks-schema.json", + "title": "Schema for Modeling Hub model task definitions", + "description": "This is the schema of the tasks.json configuration file that defines the tasks within a modeling hub.", + "type": "object", + "properties": { + "schema_version": { + "description": "URL to a version of the Modeling Hub schema tasks-schema.json file (see https://github.com/hubverse-org/schemas). Used to declare the schema version a 'tasks.json' file is written for and for config file validation. The URL provided should be the URL to the raw content of the schema file on GitHub.", + "examples": ["https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.0/tasks-schema.json"], + "type": "string", + "format": "uri" + }, + "rounds": { + "description": "Array of modeling round properties", + "type": "array", + "items": { + "type": "object", + "description": "Individual modeling round properties", + "properties": { + "round_id_from_variable": { + "description": "Whether the round identifier is encoded by a task id variable in the data.", + "type": "boolean" + }, + "round_id": { + "description": "Round identifier. If round_id_from_variable = true, round_id should be the name of a task id variable present in all sets of modeling task specifications", + "examples": [ + "round-1", "2022-11-05", "origin_date" + ], + "type": "string" + }, + "round_name": { + "description": "An optional round name. This can be useful for internal referencing of rounds, for examples, when a date is used as round_id but hub maintainers and teams also refer to rounds as round-1, round-2 etc.", + "examples": ["round-1"], + "type": "string" + }, + "model_tasks": { + "type": "array", + "description": "Array defining round-specific modeling tasks. Can contain one or more groups of modeling tasks per round where each group is defined by a distinct combination of values of task id variables.", + "items": { + "type": "object", + "properties": { + "task_ids": { + "description": "Group of valid values of task id variables. A set of valid tasks corresponding to this group is formed by taking all combinations of these values.", + "type": "object", + "properties": { + "origin_date": { + "description": "An object containing arrays of required and optional unique origin dates. Origin date defines the starting point that can be used for calculating a target_date via the formula target_date = origin_date + horizon x time_units_per_horizon (e.g., with weekly data, target_date is calculated as origin_date + horizon x 7 days)", + "examples": [ + { + "required": null, + "optional": ["2022-11-05", "2022-11-12", "2022-11-19"] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of origin date unique identifiers that must be present for submission to be valid. Can be null if no origin dates are required and all valid origin dates are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique origin date identifiers. Can be null if all origin dates are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": ["required", "optional"] + }, + "forecast_date": { + "description": "An object containing arrays of required and optional unique forecast dates. Forecast date usually defines the date that a model is run to produce a forecast.", + "examples": [ + { + "required": null, + "optional": ["2022-11-05", "2022-11-12", "2022-11-19"] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of forecast date unique identifiers that must be present for submission to be valid. Can be null if no forecast dates are required and all valid forecast dates are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique forecast date identifiers. Can be null if all forecast dates are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": ["required", "optional"] + }, + "scenario_id": { + "description": "An object containing arrays of required and optional unique identifiers of each valid scenario.", + "examples": [ + { + "required": null, + "optional": [1, 2, 3, 4] + }, { + "required": null, + "optional": ["A-2021-03-28", "B-2021-03-28", "A-2021-04-05", "B-2021-04-05"] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of identifiers of scenarios that must be present in a valid submission. Can be null if no scenario ids are required and all valid ids are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": ["integer", "string"] + } + }, + "optional": { + "description": "Array of identifiers of valid but not required scenarios. Can be null if all scenarios are required and are specified in the required property.", + "type": [ + "null", "array" + ], + "uniqueItems": true, + "items": { + "type": ["integer", "string"] + } + } + }, + "required": ["required", "optional"] + }, + "location": { + "description": "An object containing arrays of required and optional unique identifiers for each valid location, e.g. country codes, FIPS state or county level code etc.", + "examples": [ + { + "required": "US", + "optional": [ + "01", + "02", + "04", + "05", + "06", + "08", + "09", + "10", + "11", + "12", + "13", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + "32", + "33", + "34", + "35", + "36", + "37", + "38", + "39", + "40", + "41", + "42", + "44", + "45", + "46", + "47", + "48", + "49", + "50", + "51", + "53", + "54", + "55", + "56" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of location unique identifiers that must be present for submission to be valid. Can be null if no locations are required and all valid locations are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique location identifiers. Can be null if all locations are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["required", "optional"] + }, + "target": { + "description": "An object containing arrays of required and optional unique identifiers for each valid target. Usually represents a single task ID target key variable.", + "type": "object", + "examples": [ + { + "required": null, + "optional": ["inc hosp", "inc case", "inc death"] + }, { + "required": ["peak week inc hosp"], + "optional": null + } + ], + "properties": { + "required": { + "description": "Array of target unique identifiers that must be present for submission to be valid. Can be null if no targets are required and all valid targets are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique target identifiers. Can be null if all targets are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["required", "optional"] + }, + "target_variable": { + "description": "An object containing arrays of required and optional unique identifiers for each valid target variable. Usually forms part of a pair of task ID target key variables (along with target_outcome) which combine to define individual targets.", + "type": "object", + "examples": [ + { + "required": null, + "optional": ["hosp", "death", "case"] + }, { + "required": ["hosp"], + "optional": ["case"] + } + ], + "properties": { + "required": { + "description": "Array of target variable unique identifiers that must be present for submission to be valid. Can be null if no target variables are required and all valid target variables are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique target variable identifiers. Can be null if all target variables are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["required", "optional"] + }, + "target_outcome": { + "description": "An object containing arrays of required and optional unique identifiers for each valid target outcome. Usually forms part of a pair of task ID target key variables (along with target_variable) which combine to define individual targets.", + "type": "object", + "examples": [ + { + "required": ["inc"], + "optional": null + }, { + "required": ["inc"], + "optional": ["cum"] + } + ], + "properties": { + "required": { + "description": "Array of target outcome unique identifiers that must be present for submission to be valid. Can be null if no target outcomes are required and all valid target outcomes are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique target outcome identifiers. Can be null if all target outcomes are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["required", "optional"] + }, + "target_date": { + "description": "An object containing arrays of required and optional unique target dates. For short-term forecasts, the target_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_date is 2022-07-15", + "examples": [ + { + "required": null, + "optional": ["2022-11-12", "2022-11-19", "2022-11-26"] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of target date unique identifiers that must be present for submission to be valid. Can be null if no target dates are required and all valid target dates are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique target date identifiers. Can be null if all target dates are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": ["required", "optional"] + }, + "target_end_date": { + "description": "An object containing arrays of required and optional unique target end dates. For short-term forecasts, the target_end_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_end_date is 2022-07-15", + "examples": [ + { + "required": null, + "optional": ["2022-11-12", "2022-11-19", "2022-11-26"] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of target end date unique identifiers that must be present for submission to be valid. Can be null if no target end dates are required and all valid target end dates are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique target end date identifiers. Can be null if all target end dates are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": ["required", "optional"] + }, + "horizon": { + "description": "An object containing arrays of required and optional unique horizons. Horizons define the difference between the target_date and the origin_date in time units specified by the hub (e.g., may be days, weeks, or months)", + "examples": [ + { + "required": null, + "optional": [1, 2, 3, 4] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of horizon unique identifiers that must be present for submission to be valid. Can be null if no horizons are required and all valid horizons are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": ["integer", "string"] + } + }, + "optional": { + "description": "Array of valid but not required unique horizon identifiers. Can be null if all horizons are required and are specified in the required property.", + "type": [ + "null", "array" + ], + "uniqueItems": true, + "items": { + "type": ["integer", "string"] + } + } + }, + "required": ["required", "optional"] + }, + "age_group": { + "type": "object", + "description": "An object containing arrays of required and optional unique identifiers for age groups", + "examples": [ + { + "required": [ + "0-5", "6-18", "19-24", "25-64", "65+" + ], + "optional": null + } + ], + "properties": { + "required": { + "description": "Array of age group unique identifiers that must be present for submission to be valid. Can be null if no age groups are required and all valid age groups are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique age group identifiers. Can be null if all age group are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["required", "optional"] + } + }, + "additionalProperties": { + "type": "object", + "description": "An object containing arrays of required and optional unique values for a custom Task ID", + "properties": { + "required": { + "description": "Array of custom Task ID unique values that must be present for submission to be valid. Can be null if no values are required and all valid values are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true + }, + "optional": { + "description": "Array of valid but not required unique custom Task ID values. Can be null if all values are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true + } + }, + "required": ["required", "optional"] + } + }, + "output_type": { + "type": "object", + "description": "Object defining valid model output types for a given modeling task. The name of each property corresponds to valid values in column 'output_type' while the 'output_type_id' property of each output type defines the valid values of the 'output_type_id' column and the 'value' property defines the valid values of the 'value' column for a given output type.", + "properties": { + "mean": { + "type": "object", + "description": "Object defining the mean of the predictive distribution output type.", + "properties": { + "output_type_id": { + "description": "output_type_id is not meaningful for a mean output_type. The property is primarily used to determine whether mean is a required or optional output type through properties required and optional. If mean is a required output type, the required property must be an array containing the single string element 'NA' and the optional property must be set to null. If mean is an optional output type, the optional property must be an array containing the single string element 'NA' and the required property must be set to null", + "examples": [ + { + "required": ["NA"], + "optional": null + }, { + "required": null, + "optional": ["NA"] + } + ], + "type": "object", + "oneOf": [ + { + "properties": { + "required": { + "description": "When mean is required, property set to single element 'NA' array", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 + } + }, + "optional": { + "description": "When mean is required, property set to null", + "type": "null" + } + } + }, { + "properties": { + "required": { + "description": "When mean is optional, property set to null", + "type": "null" + }, + "optional": { + "description": "When mean is optional, property set to single element 'NA' array", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 + } + } + } + } + ], + "required": ["required", "optional"] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid mean values.", + "examples": [ + { + "type": "double", + "minimum": 0 + } + ], + "properties": { + "type": { + "description": "Data type of mean values.", + "type": "string", + "enum": ["double", "integer"] + }, + "minimum": { + "description": "The minimum inclusive valid mean value", + "type": ["number", "integer"] + }, + "maximum": { + "description": "the maximum inclusive valid mean value", + "type": ["number", "integer"] + } + }, + "required": ["type"] + } + }, + "required": ["output_type_id", "value"] + }, + "median": { + "type": "object", + "description": "Object defining the median of the predictive distribution output type", + "properties": { + "output_type_id": { + "description": "output_type_id is not meaningful for a median output_type. The property is primarily used to determine whether median is a required or optional output type through properties required and optional. If median is a required output type, the required property must be an array containing the single string element 'NA' and the optional property must be set to null. If median is an optional output type, the optional property must be an array containing the single string element 'NA' and the required property must be set to null", + "examples": [ + { + "required": ["NA"], + "optional": null + }, { + "required": null, + "optional": ["NA"] + } + ], + "type": "object", + "oneOf": [ + { + "properties": { + "required": { + "description": "When median is required, property set to single element 'NA' array", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 + } + }, + "optional": { + "description": "When median is required, property set to null", + "type": "null" + } + } + }, { + "properties": { + "required": { + "description": "When median is optional, property set to null", + "type": "null" + }, + "optional": { + "description": "When median is optional, property set to single element 'NA' array", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 + } + } + } + } + ], + "required": ["required", "optional"] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid median values", + "examples": [ + { + "type": "double", + "minimum": 0 + } + ], + "properties": { + "type": { + "description": "Data type of median values", + "type": "string", + "enum": ["double", "integer"] + }, + "minimum": { + "description": "The minimum inclusive valid median value", + "type": ["number", "integer"] + }, + "maximum": { + "description": "the maximum inclusive valid median value", + "type": ["number", "integer"] + } + }, + "required": ["type"] + } + }, + "required": ["output_type_id", "value"] + }, + "quantile": { + "description": "Object defining the quantiles of the predictive distribution output type.", + "type": "object", + "properties": { + "output_type_id": { + "description": "Object containing required and optional arrays defining the probability levels at which quantiles of the predictive distribution will be recorded.", + "examples": [ + { + "required": [ + 0.25, 0.5, 0.75 + ], + "optional": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.6, + 0.7, + 0.8, + 0.9 + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of unique probability levels between 0 and 1 that must be present for submission to be valid. Can be null if no probability levels are required and all valid probability levels are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "number", + "minimum": 0, + "maximum": 1 + } + }, + "optional": { + "description": "Array of valid but not required unique probability levels. Can be null if all probability levels are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "number", + "minimum": 0, + "maximum": 1 + } + } + }, + "required": ["required", "optional"] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid quantiles of the predictive distribution at a given probability level.", + "properties": { + "type": { + "description": "Data type of quantile values.", + "examples": ["double"], + "type": "string", + "enum": ["double", "integer"] + }, + "minimum": { + "description": "The minimum inclusive valid quantile value (optional).", + "examples": [0], + "type": ["number", "integer"] + }, + "maximum": { + "description": "The maximum inclusive valid quantile value (optional).", + "type": ["number", "integer"] + } + }, + "required": ["type"] + } + }, + "required": ["output_type_id", "value"] + }, + "cdf": { + "description": "Object defining the cumulative distribution function of the predictive distribution output type.", + "type": "object", + "properties": { + "output_type_id": { + "description": "Object containing required and optional arrays defining possible values of the target variable at which values of the cumulative distribution function of the predictive distribution will be recorded. These should be listed in order from low to high.", + "examples": [ + { + "required": [ + 10.0, 20.0 + ], + "optional": null + }, { + "required": [ + "EW202240", + "EW202241", + "EW202242", + "EW202243", + "EW202244", + "EW202245", + "EW202246", + "EW202247" + ], + "optional": null + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of unique target values that must be present for submission to be valid. Can be null if no target values are required and all valid target values are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": [ + "number", "integer" + ], + "minimum": 0 + }, { + "type": "string" + } + ] + } + }, + "optional": { + "description": "Array of valid but not required unique target values. Can be null if all target values are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": [ + "number", "integer" + ], + "minimum": 0 + }, { + "type": "string" + } + ] + } + } + }, + "required": ["required", "optional"] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid values of the cumulative distribution function at a given target value.", + "properties": { + "type": { + "description": "Data type of cumulative distribution function values.", + "examples": ["double"], + "const": "double" + }, + "minimum": { + "description": "The minimum inclusive valid cumulative distribution function value. Must be 0.", + "const": 0 + }, + "maximum": { + "description": "The maximum inclusive valid cumulative distribution function value. Must be 1.", + "const": 1 + } + }, + "required": ["type", "minimum", "maximum"] + } + }, + "required": ["output_type_id", "value"] + }, + "pmf": { + "description": "Object defining a probability mass function for a discrete variable output type. Includes nominal, binary and ordinal variable types.", + "type": "object", + "properties": { + "output_type_id": { + "description": "Object containing required and optional arrays specifying valid categories of a discrete variable. Note that for ordinal variables, the category levels should be listed in order from low to high.", + "examples": [ + { + "required": null, + "optional": ["low", "moderate", "high", "extreme"] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of unique categories of a discrete variable that must be present for submission to be valid. Can be null if no categories are required and all valid categories are specified in the optional property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique categories of a discrete variable. Can be null if all categories are required and are specified in the required property.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["required", "optional"] + }, + "value": { + "type": "object", + "description": "Object defining valid values of the probability mass function of the predictive distribution for a given category of a discrete outcome variable.", + "examples": [ + { + "type": "double", + "minimum": 0, + "maximum": 1 + } + ], + "properties": { + "type": { + "description": "Data type of the probability mass function values.", + "const": "double" + }, + "minimum": { + "description": "The minimum inclusive valid probability mass function value. Must be 0.", + "const": 0 + }, + "maximum": { + "description": "The maximum inclusive valid probability mass function value. Must be 1.", + "const": 1 + } + }, + "required": ["type", "minimum", "maximum"] + } + }, + "required": ["output_type_id", "value"] + }, + "sample": { + "description": "Object defining a sample output type.", + "type": "object", + "properties": { + "output_type_id_params": { + "description": "Object containing parameters specifying how samples were drawn.", + "examples": [ + { + "output_type_id_params": { + "is_required": true, + "type": "integer", + "min_samples_per_task": 100, + "max_samples_per_task": 100 + } + }, { + "output_type_id_params": { + "is_required": false, + "type": "character", + "max_length": 6, + "min_samples_per_task": 100, + "max_samples_per_task": 500, + "compound_taskid_set": ["origin_date", "horizon", "location", "variant"] + } + } + ], + "type": "object", + "properties": { + "is_required": { + "description": "Boolean. Whether inclusion of samples is required for the submission to be valid", + "type": "boolean" + }, + "type": { + "description": "Data type of sample indices.", + "type": "string", + "enum": ["character", "integer"] + }, + "max_length": { + "description": "Required only if 'type' is 'character'. Positive integer representing the maximum number of characters in a sample index. Ignored if 'type' is 'integer'.", + "type": "integer", + "minimum": 1 + }, + "min_samples_per_task": { + "description": "The minimum number of samples per individual task.", + "type": "integer", + "minimum": 1 + }, + "max_samples_per_task": { + "description": "The maximum number of samples per individual task.", + "type": "integer", + "minimum": 1 + }, + "compound_taskid_set": { + "description": "Optional. Specifies whether validation should factor in the presence of a compound modeling task. Each item of the array must be a task id variable name. If unspecified, defaults to all task ID variables.", + "type": ["array"], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "is_required", "type", "min_samples_per_task", "max_samples_per_task" + ], + "if": { + "properties": { + "type": { + "const": "character" + } + } + }, + "then": { + "required": ["max_length"] + } + }, + "value": { + "type": "object", + "description": "Object defining valid values of samples from the predictive distribution for a given sample index. Depending on the Hub specification, samples with the same sample index (specified by the output_type_id) may be assumed to correspond to a joint distribution across multiple levels of the task id variables. See Hub documentation for details.", + "properties": { + "type": { + "description": "Data type of sample value from the predictive distribution.", + "examples": [ + { + "type": "double" + } + ], + "type": "string", + "enum": ["double", "integer"] + }, + "minimum": { + "description": "The minimum inclusive valid sample value from the predictive distribution.", + "type": ["number", "integer"] + }, + "maximum": { + "description": "The maximum inclusive valid sample value from the predictive distribution.", + "type": ["number", "integer"] + } + }, + "required": ["type"] + } + }, + "required": ["output_type_id_params", "value"] + } + }, + "additionalProperties": false + }, + "target_metadata": { + "description": "Array of objects containing metadata about each unique target, one object for each unique target value.", + "type": "array", + "items": { + "type": "object", + "description": "Object containg metadata about a single unique target.", + "properties": { + "target_id": { + "description": "Short description that uniquely identifies the target.", + "examples": [ + "inc hosp", "peak week hosp" + ], + "type": "string", + "maxLength": 30 + }, + "target_name": { + "description": "A longer human readable target description that could be used, for example, as a visualisation axis label.", + "examples": [ + "Weekly incident influenza hospitalizations", "Peak week for incident influenza hospitalizations" + ], + "type": "string", + "maxLength": 100 + }, + "target_units": { + "description": "Unit of observation of the target.", + "examples": [ + "rate per 100,000 population", "count", "date" + ], + "type": "string", + "maxLength": 100 + }, + "target_keys": { + "description": "Should be either null, in the case where the target is not specified as a task_id and is specified solely through the target_id target_metadata property or an object with one or more properties, the names of which match task_id variable(s) named within the same model_tasks object. Each property should have one specified value. Each value, or the combination of values if multiple keys are specified, define a single target value.", + "examples": [ + { + "target": "inc hosp" + }, { + "target": "peak week hosp" + }, { + "target_variable": "hosp", + "target_outcome": "inc" + }, { + "target_variable": "case", + "target_outcome": "peak week" + }, + null + ], + "type": ["object", "null"] + }, + "description": { + "description": "a verbose description of the target that might include information such as the target_measure above, or definitions of a 'rate' or similar.", + "type": "string" + }, + "target_type": { + "description": "Target statistical data type", + "examples": [ + "discrete", "ordinal" + ], + "type": "string", + "enum": [ + "continuous", + "discrete", + "date", + "binary", + "nominal", + "ordinal", + "compositional" + ] + }, + "is_step_ahead": { + "description": "Whether the target is part of a sequence of values", + "examples": [ + true, false + ], + "type": "boolean" + }, + "time_unit": { + "description": " if is_step_ahead is true, then this is required and defines the unit of time steps. if is_step_ahead is false, then this should be left out and/or will be ignored if present.", + "examples": ["week"], + "type": "string", + "enum": ["day", "week", "month"] + } + }, + "required": [ + "target_id", + "target_name", + "target_units", + "target_type", + "target_keys", + "is_step_ahead" + ], + "additionalProperties": false, + "if": { + "properties": { + "is_step_ahead": { + "const": true + } + } + }, + "then": { + "required": ["time_unit"] + } + } + } + }, + "required": ["task_ids", "output_type", "target_metadata"] + } + }, + "submissions_due": { + "description": "Object defining the dates by which model forecasts must be submitted to the hub.", + "examples": [ + { + "start": "2022-06-07", + "end": "2022-07-20" + }, { + "relative_to": "origin_date", + "start": -4, + "end": 2 + } + ], + "type": "object", + "oneOf": [ + { + "properties": { + "relative_to": { + "description": "Name of task id variable in relation to which submission start and end dates are calculated.", + "type": "string" + }, + "start": { + "description": "Difference in days between start and origin date.", + "type": "integer" + }, + "end": { + "description": "Difference in days between end and origin date.", + "type": "integer" + } + }, + "required": ["relative_to", "start", "end"] + }, { + "properties": { + "start": { + "description": "Submission start date.", + "type": "string", + "format": "date" + }, + "end": { + "description": "Submission end date.", + "type": "string", + "format": "date" + } + }, + "required": ["start", "end"] + } + ], + "required": ["start", "end"] + }, + "last_data_date": { + "description": "The last date with recorded data in the data set used as input to a model.", + "examples": ["2022-07-18"], + "type": "string", + "format": "date" + }, + "file_format": { + "description": "Accepted file formats of model output files for the round. Overrides the file formats provided in admin.json.", + "examples": [ + [ + "arrow", "parquet" + ], + ["csv"] + ], + "type": "array", + "items": { + "type": "string", + "enum": ["csv", "parquet", "arrow"] + } + } + }, + "required": [ + "round_id_from_variable", "round_id", "model_tasks", "submissions_due" + ], + "additionalProperties": true + } + }, + "output_type_id_datatype": { + "description": "The hub level data type of the output_type_id column. This data type must be shared across all files in the hub and be able to represent all output type ID values across all hub output types and rounds. If not provided or set to 'auto', hub defaults to autodetecting the simplest hub level data type.", + "default": "auto", + "examples": ["character"], + "type": "string", + "enum": [ + "auto", + "character", + "double", + "integer", + "logical", + "Date" + ] + } + }, + "required": [ + "rounds", "schema_version" + ], + "additionalProperties": false +} From c25f08db06db6a6ebc1a00859496b5e5267b26eb Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 12:21:55 +0300 Subject: [PATCH 03/19] Add derived_task_ids property. Resolves #96 --- v4.0.0/tasks-schema.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 4abb986..c269d79 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -1206,6 +1206,16 @@ ] } }, + "derived_task_ids": { + "description": "Names of derived task IDs, i.e. task IDs whose values are derived from (and therefore dependent on) the values of other variables.", + "type": [ + "array", "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, "required": [ "rounds", "schema_version" ], From 4d2e93576df654fc55ed69c8aa05fdd4b200086d Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 12:46:12 +0300 Subject: [PATCH 04/19] Disallow optional output type ids + introduce 'is_required' property. Resolves #99, #100, #101, #102 --- v4.0.0/tasks-schema.json | 276 ++++++++++++++++----------------------- 1 file changed, 115 insertions(+), 161 deletions(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index c269d79..0889e02 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -513,51 +513,24 @@ "description": "Object defining the mean of the predictive distribution output type.", "properties": { "output_type_id": { - "description": "output_type_id is not meaningful for a mean output_type. The property is primarily used to determine whether mean is a required or optional output type through properties required and optional. If mean is a required output type, the required property must be an array containing the single string element 'NA' and the optional property must be set to null. If mean is an optional output type, the optional property must be an array containing the single string element 'NA' and the required property must be set to null", + "description": "output_type_id is not meaningful for a point estimate output_type.", "examples": [ { - "required": ["NA"], - "optional": null - }, { - "required": null, - "optional": ["NA"] + "required": ["NA"] } ], "type": "object", - "oneOf": [ - { - "properties": { - "required": { - "description": "When mean is required, property set to single element 'NA' array", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } - }, - "optional": { - "description": "When mean is required, property set to null", - "type": "null" - } - } - }, { - "properties": { - "required": { - "description": "When mean is optional, property set to null", - "type": "null" - }, - "optional": { - "description": "When mean is optional, property set to single element 'NA' array", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } - } + "properties": { + "required": { + "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 } } - ], - "required": ["required", "optional"] + }, + "required": ["required"] }, "value": { "type": "object", @@ -584,64 +557,48 @@ } }, "required": ["type"] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, { + "is_required": false + } + ], + "type": "boolean" } }, - "required": ["output_type_id", "value"] + "required": ["output_type_id", "value", "is_required"] }, "median": { "type": "object", "description": "Object defining the median of the predictive distribution output type", "properties": { "output_type_id": { - "description": "output_type_id is not meaningful for a median output_type. The property is primarily used to determine whether median is a required or optional output type through properties required and optional. If median is a required output type, the required property must be an array containing the single string element 'NA' and the optional property must be set to null. If median is an optional output type, the optional property must be an array containing the single string element 'NA' and the required property must be set to null", + "description": "output_type_id is not meaningful for a point estimate output_type.", "examples": [ { - "required": ["NA"], - "optional": null - }, { - "required": null, - "optional": ["NA"] + "required": ["NA"] } ], "type": "object", - "oneOf": [ - { - "properties": { - "required": { - "description": "When median is required, property set to single element 'NA' array", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } - }, - "optional": { - "description": "When median is required, property set to null", - "type": "null" - } - } - }, { - "properties": { - "required": { - "description": "When median is optional, property set to null", - "type": "null" - }, - "optional": { - "description": "When median is optional, property set to single element 'NA' array", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } - } + "properties": { + "required": { + "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 } } - ], - "required": ["required", "optional"] + }, + "required": ["required"] }, "value": { "type": "object", - "description": "Object defining the characteristics of valid median values", + "description": "Object defining the characteristics of valid mean values.", "examples": [ { "type": "double", @@ -650,7 +607,7 @@ ], "properties": { "type": { - "description": "Data type of median values", + "description": "Data type of median values.", "type": "string", "enum": ["double", "integer"] }, @@ -664,28 +621,39 @@ } }, "required": ["type"] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, { + "is_required": false + } + ], + "type": "boolean" } }, - "required": ["output_type_id", "value"] + "required": ["output_type_id", "value", "is_required"] }, "quantile": { "description": "Object defining the quantiles of the predictive distribution output type.", "type": "object", "properties": { "output_type_id": { - "description": "Object containing required and optional arrays defining the probability levels at which quantiles of the predictive distribution will be recorded.", + "description": "Object containing arrays of required probability levels at which quantiles of the predictive distribution will be recorded.", "examples": [ { "required": [ - 0.25, 0.5, 0.75 - ], - "optional": [ 0.1, 0.2, + 0.25, 0.3, 0.4, + 0.5, 0.6, 0.7, + 0.75, 0.8, 0.9 ] @@ -694,22 +662,8 @@ "type": "object", "properties": { "required": { - "description": "Array of unique probability levels between 0 and 1 that must be present for submission to be valid. Can be null if no probability levels are required and all valid probability levels are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "optional": { - "description": "Array of valid but not required unique probability levels. Can be null if all probability levels are required and are specified in the required property.", - "type": [ - "array", "null" - ], + "description": "Array of unique probability levels between 0 and 1 inclusive that must be present for submission to be valid.", + "type": "array", "uniqueItems": true, "items": { "type": "number", @@ -718,7 +672,7 @@ } } }, - "required": ["required", "optional"] + "required": ["required"] }, "value": { "type": "object", @@ -741,22 +695,30 @@ } }, "required": ["type"] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, { + "is_required": false + } + ], + "type": "boolean" } }, - "required": ["output_type_id", "value"] + "required": ["output_type_id", "value", "is_required"] }, "cdf": { "description": "Object defining the cumulative distribution function of the predictive distribution output type.", "type": "object", "properties": { "output_type_id": { - "description": "Object containing required and optional arrays defining possible values of the target variable at which values of the cumulative distribution function of the predictive distribution will be recorded. These should be listed in order from low to high.", + "description": "Object containing required arrays defining possible values of the target variable at which values of the cumulative distribution function of the predictive distribution will be recorded. These should be listed in order from low to high.", "examples": [ { - "required": [ - 10.0, 20.0 - ], - "optional": null + "required": [10.0, 20.0] }, { "required": [ "EW202240", @@ -767,36 +729,14 @@ "EW202245", "EW202246", "EW202247" - ], - "optional": null + ] } ], "type": "object", "properties": { "required": { - "description": "Array of unique target values that must be present for submission to be valid. Can be null if no target values are required and all valid target values are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": [ - "number", "integer" - ], - "minimum": 0 - }, { - "type": "string" - } - ] - } - }, - "optional": { - "description": "Array of valid but not required unique target values. Can be null if all target values are required and are specified in the required property.", - "type": [ - "array", "null" - ], + "description": "Array of unique target values that must be present for submission to be valid.", + "type": "array", "uniqueItems": true, "items": { "oneOf": [ @@ -812,7 +752,7 @@ } } }, - "required": ["required", "optional"] + "required": ["required"] }, "value": { "type": "object", @@ -833,46 +773,44 @@ } }, "required": ["type", "minimum", "maximum"] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, { + "is_required": false + } + ], + "type": "boolean" } }, - "required": ["output_type_id", "value"] + "required": ["output_type_id", "value", "is_required"] }, "pmf": { "description": "Object defining a probability mass function for a discrete variable output type. Includes nominal, binary and ordinal variable types.", "type": "object", "properties": { "output_type_id": { - "description": "Object containing required and optional arrays specifying valid categories of a discrete variable. Note that for ordinal variables, the category levels should be listed in order from low to high.", + "description": "Object containing arrays of required values specifying valid categories of a discrete variable. Note that for ordinal variables, the category levels should be listed in order from low to high.", "examples": [ { - "required": null, - "optional": ["low", "moderate", "high", "extreme"] + "required": ["low", "moderate", "high", "extreme"] } ], "type": "object", "properties": { "required": { - "description": "Array of unique categories of a discrete variable that must be present for submission to be valid. Can be null if no categories are required and all valid categories are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "optional": { - "description": "Array of valid but not required unique categories of a discrete variable. Can be null if all categories are required and are specified in the required property.", - "type": [ - "array", "null" - ], + "description": "Array of unique categories of a discrete variable that must be present for submission to be valid.", + "type": "array", "uniqueItems": true, "items": { "type": "string" } } }, - "required": ["required", "optional"] + "required": ["required"] }, "value": { "type": "object", @@ -899,9 +837,20 @@ } }, "required": ["type", "minimum", "maximum"] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, { + "is_required": false + } + ], + "type": "boolean" } }, - "required": ["output_type_id", "value"] + "required": ["output_type_id", "value", "is_required"] }, "sample": { "description": "Object defining a sample output type.", @@ -912,14 +861,12 @@ "examples": [ { "output_type_id_params": { - "is_required": true, "type": "integer", "min_samples_per_task": 100, "max_samples_per_task": 100 } }, { "output_type_id_params": { - "is_required": false, "type": "character", "max_length": 6, "min_samples_per_task": 100, @@ -930,10 +877,6 @@ ], "type": "object", "properties": { - "is_required": { - "description": "Boolean. Whether inclusion of samples is required for the submission to be valid", - "type": "boolean" - }, "type": { "description": "Data type of sample indices.", "type": "string", @@ -964,7 +907,7 @@ } }, "required": [ - "is_required", "type", "min_samples_per_task", "max_samples_per_task" + "type", "min_samples_per_task", "max_samples_per_task" ], "if": { "properties": { @@ -1001,9 +944,20 @@ } }, "required": ["type"] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, { + "is_required": false + } + ], + "type": "boolean" } }, - "required": ["output_type_id_params", "value"] + "required": ["output_type_id_params", "value", "is_required"] } }, "additionalProperties": false From 20d95d28ff72958ac2e88c08654f517a69f21883 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 12:52:44 +0300 Subject: [PATCH 05/19] Add specifics about repository object. Resolves #98 --- v4.0.0/admin-schema.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v4.0.0/admin-schema.json b/v4.0.0/admin-schema.json index fedda4b..ee6c7bd 100644 --- a/v4.0.0/admin-schema.json +++ b/v4.0.0/admin-schema.json @@ -51,9 +51,11 @@ "enum": ["github"] }, "owner": { + "description": "The hub repository owner (user or organisation).", "type": "string" }, "name": { + "description": "The name of the hub repository.", "type": "string" } } From 2eb7a8e8b888f36d2a0bd8eacd76893d4d667c0d Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 13:09:17 +0300 Subject: [PATCH 06/19] Update NEWS --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index 449f2a2..1bd251d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# v4.0.0 + +* BREAKING CHANGE: Introduction of `is_required` boolean property at the `output_type` level to configure whether the output type is required for submissions to be considered valid (#99). +* BREAKING CHANGE: Disallowed `optional` property in `output_type_id` objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102). +* Introduction of optional `derived_task_ids` property to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs) at a hub level. This allows primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#98). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). + # v3.0.1 * Introduction of optional `output_type_id_datatype` property to enable hub administrators to configure and communicate the `output_type_id` column data type at a hub level. This will allow hubs to override default behaviour of automatically determinining the simplest data type that can accomodate output type IDs across all output types when creating hub schema. The setting is also useful for administrators to future proof the `output_type_id` column from potential issues arising by changes in data type, introduced by new output types after submissions have begun, by setting `output_type_id_datatype` to the simplest data type from the start, i.e. character (#87). From a0aa58e9686a7bbf1685aa23a321367d9fa81764 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 13:14:09 +0300 Subject: [PATCH 07/19] Correct issue number --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1bd251d..44d5c55 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ * BREAKING CHANGE: Introduction of `is_required` boolean property at the `output_type` level to configure whether the output type is required for submissions to be considered valid (#99). * BREAKING CHANGE: Disallowed `optional` property in `output_type_id` objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102). -* Introduction of optional `derived_task_ids` property to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs) at a hub level. This allows primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#98). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). +* Introduction of optional `derived_task_ids` property to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs) at a hub level. This allows primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). # v3.0.1 From c3a61d79c4f036c3f24f09922ebaacfb7a4817b6 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 15:05:37 +0300 Subject: [PATCH 08/19] Correct loaction example which should be array --- v4.0.0/tasks-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 0889e02..8a35e8b 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -154,7 +154,7 @@ "description": "An object containing arrays of required and optional unique identifiers for each valid location, e.g. country codes, FIPS state or county level code etc.", "examples": [ { - "required": "US", + "required": ["US"], "optional": [ "01", "02", From 65d91de35f11f98a05092cb8a89ff5f6720612fa Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 9 Oct 2024 17:15:05 +0300 Subject: [PATCH 09/19] Fix indents with jq --- v4.0.0/admin-schema.json | 1376 ++++++++++---------- v4.0.0/tasks-schema.json | 2599 +++++++++++++++++++++----------------- 2 files changed, 2163 insertions(+), 1812 deletions(-) diff --git a/v4.0.0/admin-schema.json b/v4.0.0/admin-schema.json index ee6c7bd..a06b9c8 100644 --- a/v4.0.0/admin-schema.json +++ b/v4.0.0/admin-schema.json @@ -1,682 +1,714 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/admin-schema.json", - "title": "Schema for Modeling Hub administrative settings", - "description": "This JSON file provides a schema for modeling hub administrative information.", - "type": "object", - "properties": { - "schema_version": { - "description": "URL to a version of the Modeling Hub schema admin-schema.json file (see https://github.com/hubverse-org/schemas). Used to declare the schema version an 'admin.json' file is written for and for config file validation. The URL provided should be the URL to the raw content of the schema file on GitHub.", - "examples": ["https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.0/admin-schema.json"], - "type": "string", - "format": "uri" - }, - "name": { - "description": "The name of the hub.", - "type": "string", - "examples": ["US COVID-19 Forecast Hub​"] - }, - "maintainer": { - "description": "The entity that maintains and runs the hub.", - "type": "string", - "examples": ["The Consortium of Infectious Disease Modeling Hubs"] - }, - "contact": { - "description": "The name and email of a human being who serves as a point of contact for the hub.", - "type": "object", - "properties": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/admin-schema.json", + "title": "Schema for Modeling Hub administrative settings", + "description": "This JSON file provides a schema for modeling hub administrative information.", + "type": "object", + "properties": { + "schema_version": { + "description": "URL to a version of the Modeling Hub schema admin-schema.json file (see https://github.com/hubverse-org/schemas). Used to declare the schema version an 'admin.json' file is written for and for config file validation. The URL provided should be the URL to the raw content of the schema file on GitHub.", + "examples": [ + "https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.0/admin-schema.json" + ], + "type": "string", + "format": "uri" + }, "name": { - "type": "string" + "description": "The name of the hub.", + "type": "string", + "examples": [ + "US COVID-19 Forecast Hub​" + ] }, - "email": { - "type": "string", - "format": "email" - } - } - }, - "repository": { - "description": "Object containing details of the hub repository.", - "examples": [ - { - "host": "github", - "owner": "hubverse-org", - "name": "example-simple-forecast-hub" - } - ], - "type": "object", - "properties": { - "host": { - "description": "The name of the web host for the hub repository", - "type": "string", - "enum": ["github"] + "maintainer": { + "description": "The entity that maintains and runs the hub.", + "type": "string", + "examples": [ + "The Consortium of Infectious Disease Modeling Hubs" + ] }, - "owner": { - "description": "The hub repository owner (user or organisation).", - "type": "string" + "contact": { + "description": "The name and email of a human being who serves as a point of contact for the hub.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + } + } }, - "name": { - "description": "The name of the hub repository.", - "type": "string" - } - } - }, - "zoltar_project_id": { - "description": "The project id of the Hub in Zoltar", - "type": "integer", - "examples": [44] - }, - "citation": { - "description": "One or more citations for the hub.", - "type": "string", - "examples": ["Cramer, E.Y., Huang, Y., Wang, Y. et al. The United States COVID-19 Forecast Hub dataset. Sci Data 9, 462 (2022). https://doi.org/10.1038/s41597-022-01517-w"] - }, - "file_format": { - "description": "Accepted file formats of model output files.", - "examples": [ - [ - "arrow", "parquet" - ], - ["csv"] - ], - "type": "array", - "items": { - "type": "string", - "enum": ["csv", "parquet", "arrow"] - } - }, - "timezone": { - "description": "Hub timezone in TZ database name format. Used primarily for determining exact time of submission deadlines.", - "examples": [ - "Africa/Cairo", "America/Sao_Paulo", "Asia/Bangkok", "US/Eastern", "Europe/Berlin" - ], - "type": "string", - "enum": [ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Africa/Algiers", - "Africa/Asmara", - "Africa/Asmera", - "Africa/Bamako", - "Africa/Bangui", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Blantyre", - "Africa/Brazzaville", - "Africa/Bujumbura", - "Africa/Cairo", - "Africa/Casablanca", - "Africa/Ceuta", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Douala", - "Africa/El_Aaiun", - "Africa/Freetown", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Kigali", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Lome", - "Africa/Luanda", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Malabo", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Africa/Mogadishu", - "Africa/Monrovia", - "Africa/Nairobi", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Porto-Novo", - "Africa/Sao_Tome", - "Africa/Timbuktu", - "Africa/Tripoli", - "Africa/Tunis", - "Africa/Windhoek", - "America/Adak", - "America/Anchorage", - "America/Anguilla", - "America/Antigua", - "America/Araguaina", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/ComodRivadavia", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/La_Rioja", - "America/Argentina/Mendoza", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Aruba", - "America/Asuncion", - "America/Atikokan", - "America/Atka", - "America/Bahia", - "America/Bahia_Banderas", - "America/Barbados", - "America/Belem", - "America/Belize", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Bogota", - "America/Boise", - "America/Buenos_Aires", - "America/Cambridge_Bay", - "America/Campo_Grande", - "America/Cancun", - "America/Caracas", - "America/Catamarca", - "America/Cayenne", - "America/Cayman", - "America/Chicago", - "America/Chihuahua", - "America/Coral_Harbour", - "America/Cordoba", - "America/Costa_Rica", - "America/Creston", - "America/Cuiaba", - "America/Curacao", - "America/Danmarkshavn", - "America/Dawson", - "America/Dawson_Creek", - "America/Denver", - "America/Detroit", - "America/Dominica", - "America/Edmonton", - "America/Eirunepe", - "America/El_Salvador", - "America/Ensenada", - "America/Fort_Nelson", - "America/Fort_Wayne", - "America/Fortaleza", - "America/Glace_Bay", - "America/Godthab", - "America/Goose_Bay", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guatemala", - "America/Guayaquil", - "America/Guyana", - "America/Halifax", - "America/Havana", - "America/Hermosillo", - "America/Indiana/Indianapolis", - "America/Indiana/Knox", - "America/Indiana/Marengo", - "America/Indiana/Petersburg", - "America/Indiana/Tell_City", - "America/Indiana/Vevay", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Indianapolis", - "America/Inuvik", - "America/Iqaluit", - "America/Jamaica", - "America/Jujuy", - "America/Juneau", - "America/Kentucky/Louisville", - "America/Kentucky/Monticello", - "America/Knox_IN", - "America/Kralendijk", - "America/La_Paz", - "America/Lima", - "America/Los_Angeles", - "America/Louisville", - "America/Lower_Princes", - "America/Maceio", - "America/Managua", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Matamoros", - "America/Mazatlan", - "America/Mendoza", - "America/Menominee", - "America/Merida", - "America/Metlakatla", - "America/Mexico_City", - "America/Miquelon", - "America/Moncton", - "America/Monterrey", - "America/Montevideo", - "America/Montreal", - "America/Montserrat", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Nome", - "America/Noronha", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Nuuk", - "America/Ojinaga", - "America/Panama", - "America/Pangnirtung", - "America/Paramaribo", - "America/Phoenix", - "America/Port_of_Spain", - "America/Port-au-Prince", - "America/Porto_Acre", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Punta_Arenas", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Recife", - "America/Regina", - "America/Resolute", - "America/Rio_Branco", - "America/Rosario", - "America/Santa_Isabel", - "America/Santarem", - "America/Santiago", - "America/Santo_Domingo", - "America/Sao_Paulo", - "America/Scoresbysund", - "America/Shiprock", - "America/Sitka", - "America/St_Barthelemy", - "America/St_Johns", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Swift_Current", - "America/Tegucigalpa", - "America/Thule", - "America/Thunder_Bay", - "America/Tijuana", - "America/Toronto", - "America/Tortola", - "America/Vancouver", - "America/Virgin", - "America/Whitehorse", - "America/Winnipeg", - "America/Yakutat", - "America/Yellowknife", - "Antarctica/Casey", - "Antarctica/Davis", - "Antarctica/DumontDUrville", - "Antarctica/Macquarie", - "Antarctica/Mawson", - "Antarctica/McMurdo", - "Antarctica/Palmer", - "Antarctica/Rothera", - "Antarctica/South_Pole", - "Antarctica/Syowa", - "Antarctica/Troll", - "Antarctica/Vostok", - "Arctic/Longyearbyen", - "Asia/Aden", - "Asia/Almaty", - "Asia/Amman", - "Asia/Anadyr", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Ashkhabad", - "Asia/Atyrau", - "Asia/Baghdad", - "Asia/Bahrain", - "Asia/Baku", - "Asia/Bangkok", - "Asia/Barnaul", - "Asia/Beirut", - "Asia/Bishkek", - "Asia/Brunei", - "Asia/Calcutta", - "Asia/Chita", - "Asia/Choibalsan", - "Asia/Chongqing", - "Asia/Chungking", - "Asia/Colombo", - "Asia/Dacca", - "Asia/Damascus", - "Asia/Dhaka", - "Asia/Dili", - "Asia/Dubai", - "Asia/Dushanbe", - "Asia/Famagusta", - "Asia/Gaza", - "Asia/Harbin", - "Asia/Hebron", - "Asia/Ho_Chi_Minh", - "Asia/Hong_Kong", - "Asia/Hovd", - "Asia/Irkutsk", - "Asia/Istanbul", - "Asia/Jakarta", - "Asia/Jayapura", - "Asia/Jerusalem", - "Asia/Kabul", - "Asia/Kamchatka", - "Asia/Karachi", - "Asia/Kashgar", - "Asia/Kathmandu", - "Asia/Katmandu", - "Asia/Khandyga", - "Asia/Kolkata", - "Asia/Krasnoyarsk", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Kuwait", - "Asia/Macao", - "Asia/Macau", - "Asia/Magadan", - "Asia/Makassar", - "Asia/Manila", - "Asia/Muscat", - "Asia/Nicosia", - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk", - "Asia/Oral", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Pyongyang", - "Asia/Qatar", - "Asia/Qostanay", - "Asia/Qyzylorda", - "Asia/Rangoon", - "Asia/Riyadh", - "Asia/Saigon", - "Asia/Sakhalin", - "Asia/Samarkand", - "Asia/Seoul", - "Asia/Shanghai", - "Asia/Singapore", - "Asia/Srednekolymsk", - "Asia/Taipei", - "Asia/Tashkent", - "Asia/Tbilisi", - "Asia/Tehran", - "Asia/Tel_Aviv", - "Asia/Thimbu", - "Asia/Thimphu", - "Asia/Tokyo", - "Asia/Tomsk", - "Asia/Ujung_Pandang", - "Asia/Ulaanbaatar", - "Asia/Ulan_Bator", - "Asia/Urumqi", - "Asia/Ust-Nera", - "Asia/Vientiane", - "Asia/Vladivostok", - "Asia/Yakutsk", - "Asia/Yangon", - "Asia/Yekaterinburg", - "Asia/Yerevan", - "Atlantic/Azores", - "Atlantic/Bermuda", - "Atlantic/Canary", - "Atlantic/Cape_Verde", - "Atlantic/Faeroe", - "Atlantic/Faroe", - "Atlantic/Jan_Mayen", - "Atlantic/Madeira", - "Atlantic/Reykjavik", - "Atlantic/South_Georgia", - "Atlantic/St_Helena", - "Atlantic/Stanley", - "Australia/ACT", - "Australia/Adelaide", - "Australia/Brisbane", - "Australia/Broken_Hill", - "Australia/Canberra", - "Australia/Currie", - "Australia/Darwin", - "Australia/Eucla", - "Australia/Hobart", - "Australia/LHI", - "Australia/Lindeman", - "Australia/Lord_Howe", - "Australia/Melbourne", - "Australia/North", - "Australia/NSW", - "Australia/Perth", - "Australia/Queensland", - "Australia/South", - "Australia/Sydney", - "Australia/Tasmania", - "Australia/Victoria", - "Australia/West", - "Australia/Yancowinna", - "Brazil/Acre", - "Brazil/DeNoronha", - "Brazil/East", - "Brazil/West", - "Canada/Atlantic", - "Canada/Central", - "Canada/Eastern", - "Canada/Mountain", - "Canada/Newfoundland", - "Canada/Pacific", - "Canada/Saskatchewan", - "Canada/Yukon", - "Chile/Continental", - "Chile/EasterIsland", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Astrakhan", - "Europe/Athens", - "Europe/Belfast", - "Europe/Belgrade", - "Europe/Berlin", - "Europe/Bratislava", - "Europe/Brussels", - "Europe/Bucharest", - "Europe/Budapest", - "Europe/Busingen", - "Europe/Chisinau", - "Europe/Copenhagen", - "Europe/Dublin", - "Europe/Gibraltar", - "Europe/Guernsey", - "Europe/Helsinki", - "Europe/Isle_of_Man", - "Europe/Istanbul", - "Europe/Jersey", - "Europe/Kaliningrad", - "Europe/Kiev", - "Europe/Kirov", - "Europe/Kyiv", - "Europe/Lisbon", - "Europe/Ljubljana", - "Europe/London", - "Europe/Luxembourg", - "Europe/Madrid", - "Europe/Malta", - "Europe/Mariehamn", - "Europe/Minsk", - "Europe/Monaco", - "Europe/Moscow", - "Europe/Nicosia", - "Europe/Oslo", - "Europe/Paris", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Riga", - "Europe/Rome", - "Europe/Samara", - "Europe/San_Marino", - "Europe/Sarajevo", - "Europe/Saratov", - "Europe/Simferopol", - "Europe/Skopje", - "Europe/Sofia", - "Europe/Stockholm", - "Europe/Tallinn", - "Europe/Tirane", - "Europe/Tiraspol", - "Europe/Ulyanovsk", - "Europe/Uzhgorod", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Vilnius", - "Europe/Volgograd", - "Europe/Warsaw", - "Europe/Zagreb", - "Europe/Zaporozhye", - "Europe/Zurich", - "Indian/Antananarivo", - "Indian/Chagos", - "Indian/Christmas", - "Indian/Cocos", - "Indian/Comoro", - "Indian/Kerguelen", - "Indian/Mahe", - "Indian/Maldives", - "Indian/Mauritius", - "Indian/Mayotte", - "Indian/Reunion", - "Mexico/BajaNorte", - "Mexico/BajaSur", - "Mexico/General", - "Pacific/Apia", - "Pacific/Auckland", - "Pacific/Bougainville", - "Pacific/Chatham", - "Pacific/Chuuk", - "Pacific/Easter", - "Pacific/Efate", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Fiji", - "Pacific/Funafuti", - "Pacific/Galapagos", - "Pacific/Gambier", - "Pacific/Guadalcanal", - "Pacific/Guam", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Kanton", - "Pacific/Kiritimati", - "Pacific/Kosrae", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Marquesas", - "Pacific/Midway", - "Pacific/Nauru", - "Pacific/Niue", - "Pacific/Norfolk", - "Pacific/Noumea", - "Pacific/Pago_Pago", - "Pacific/Palau", - "Pacific/Pitcairn", - "Pacific/Pohnpei", - "Pacific/Ponape", - "Pacific/Port_Moresby", - "Pacific/Rarotonga", - "Pacific/Saipan", - "Pacific/Samoa", - "Pacific/Tahiti", - "Pacific/Tarawa", - "Pacific/Tongatapu", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "Pacific/Yap", - "US/Alaska", - "US/Aleutian", - "US/Arizona", - "US/Central", - "US/East-Indiana", - "US/Eastern", - "US/Hawaii", - "US/Indiana-Starke", - "US/Michigan", - "US/Mountain", - "US/Pacific", - "US/Samoa" - ] - }, - "model_output_dir": { - "description": "Relative path, with respect to the root of hub, to directory containing model output data. If property not supplied, the default path `model-output` assumed", - "default": "model-output", - "examples": [ - "forecasts", "data/model_output" - ], - "type": "string" - }, - "cloud": { - "description": "Optional settings for cloud-enabled hubs", - "type": "object", - "properties": { - "enabled": { - "type": "boolean" + "repository": { + "description": "Object containing details of the hub repository.", + "examples": [ + { + "host": "github", + "owner": "hubverse-org", + "name": "example-simple-forecast-hub" + } + ], + "type": "object", + "properties": { + "host": { + "description": "The name of the web host for the hub repository", + "type": "string", + "enum": [ + "github" + ] + }, + "owner": { + "description": "The hub repository owner (user or organisation).", + "type": "string" + }, + "name": { + "description": "The name of the hub repository.", + "type": "string" + } + } + }, + "zoltar_project_id": { + "description": "The project id of the Hub in Zoltar", + "type": "integer", + "examples": [ + 44 + ] + }, + "citation": { + "description": "One or more citations for the hub.", + "type": "string", + "examples": [ + "Cramer, E.Y., Huang, Y., Wang, Y. et al. The United States COVID-19 Forecast Hub dataset. Sci Data 9, 462 (2022). https://doi.org/10.1038/s41597-022-01517-w" + ] + }, + "file_format": { + "description": "Accepted file formats of model output files.", + "examples": [ + [ + "arrow", + "parquet" + ], + [ + "csv" + ] + ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "parquet", + "arrow" + ] + } }, - "host": { - "type": "object", - "required": [ - "name", "storage_service", "storage_location" - ], - "properties": { - "name": { - "description": "Name of the cloud storage provider.", - "type": "string", - "enum": ["aws"] + "timezone": { + "description": "Hub timezone in TZ database name format. Used primarily for determining exact time of submission deadlines.", + "examples": [ + "Africa/Cairo", + "America/Sao_Paulo", + "Asia/Bangkok", + "US/Eastern", + "Europe/Berlin" + ], + "type": "string", + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port_of_Spain", + "America/Port-au-Prince", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/North", + "Australia/NSW", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Samoa" + ] + }, + "model_output_dir": { + "description": "Relative path, with respect to the root of hub, to directory containing model output data. If property not supplied, the default path `model-output` assumed", + "default": "model-output", + "examples": [ + "forecasts", + "data/model_output" + ], + "type": "string" + }, + "cloud": { + "description": "Optional settings for cloud-enabled hubs", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "host": { + "type": "object", + "required": [ + "name", + "storage_service", + "storage_location" + ], + "properties": { + "name": { + "description": "Name of the cloud storage provider.", + "type": "string", + "enum": [ + "aws" + ] + }, + "storage_service": { + "description": "Name of the cloud service used as backend storage", + "type": "string", + "enum": [ + "s3" + ] + }, + "storage_location": { + "description": "Cloud storage location, excluding prefix (for example, AWS S3 bucket name).", + "type": "string" + } + } + } }, - "storage_service": { - "description": "Name of the cloud service used as backend storage", - "type": "string", - "enum": ["s3"] + "if": { + "properties": { + "enabled": { + "const": true + } + } }, - "storage_location": { - "description": "Cloud storage location, excluding prefix (for example, AWS S3 bucket name).", - "type": "string" - } - } - } - }, - "if": { - "properties": { - "enabled": { - "const": true - } - } - }, - "then": { - "required": ["host"] - }, - "examples": [ - { - "enabled": true, - "host": { - "name": "aws", - "storage_service": "s3", - "storage_location": "hub-s3-bucket-name" - } + "then": { + "required": [ + "host" + ] + }, + "examples": [ + { + "enabled": true, + "host": { + "name": "aws", + "storage_service": "s3", + "storage_location": "hub-s3-bucket-name" + } + } + ] } - ] - } - }, - "required": [ - "schema_version", - "name", - "maintainer", - "contact", - "repository", - "file_format", - "timezone" - ], - "additionalProperties": false + }, + "required": [ + "schema_version", + "name", + "maintainer", + "contact", + "repository", + "file_format", + "timezone" + ], + "additionalProperties": false } diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 8a35e8b..266211d 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -1,1177 +1,1496 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/tasks-schema.json", - "title": "Schema for Modeling Hub model task definitions", - "description": "This is the schema of the tasks.json configuration file that defines the tasks within a modeling hub.", - "type": "object", - "properties": { - "schema_version": { - "description": "URL to a version of the Modeling Hub schema tasks-schema.json file (see https://github.com/hubverse-org/schemas). Used to declare the schema version a 'tasks.json' file is written for and for config file validation. The URL provided should be the URL to the raw content of the schema file on GitHub.", - "examples": ["https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.0/tasks-schema.json"], - "type": "string", - "format": "uri" - }, - "rounds": { - "description": "Array of modeling round properties", - "type": "array", - "items": { - "type": "object", - "description": "Individual modeling round properties", - "properties": { - "round_id_from_variable": { - "description": "Whether the round identifier is encoded by a task id variable in the data.", - "type": "boolean" - }, - "round_id": { - "description": "Round identifier. If round_id_from_variable = true, round_id should be the name of a task id variable present in all sets of modeling task specifications", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/tasks-schema.json", + "title": "Schema for Modeling Hub model task definitions", + "description": "This is the schema of the tasks.json configuration file that defines the tasks within a modeling hub.", + "type": "object", + "properties": { + "schema_version": { + "description": "URL to a version of the Modeling Hub schema tasks-schema.json file (see https://github.com/hubverse-org/schemas). Used to declare the schema version a 'tasks.json' file is written for and for config file validation. The URL provided should be the URL to the raw content of the schema file on GitHub.", "examples": [ - "round-1", "2022-11-05", "origin_date" + "https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.0/tasks-schema.json" ], - "type": "string" - }, - "round_name": { - "description": "An optional round name. This can be useful for internal referencing of rounds, for examples, when a date is used as round_id but hub maintainers and teams also refer to rounds as round-1, round-2 etc.", - "examples": ["round-1"], - "type": "string" - }, - "model_tasks": { + "type": "string", + "format": "uri" + }, + "rounds": { + "description": "Array of modeling round properties", "type": "array", - "description": "Array defining round-specific modeling tasks. Can contain one or more groups of modeling tasks per round where each group is defined by a distinct combination of values of task id variables.", "items": { - "type": "object", - "properties": { - "task_ids": { - "description": "Group of valid values of task id variables. A set of valid tasks corresponding to this group is formed by taking all combinations of these values.", - "type": "object", - "properties": { - "origin_date": { - "description": "An object containing arrays of required and optional unique origin dates. Origin date defines the starting point that can be used for calculating a target_date via the formula target_date = origin_date + horizon x time_units_per_horizon (e.g., with weekly data, target_date is calculated as origin_date + horizon x 7 days)", - "examples": [ - { - "required": null, - "optional": ["2022-11-05", "2022-11-12", "2022-11-19"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of origin date unique identifiers that must be present for submission to be valid. Can be null if no origin dates are required and all valid origin dates are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - }, - "optional": { - "description": "Array of valid but not required unique origin date identifiers. Can be null if all origin dates are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - } - }, - "required": ["required", "optional"] - }, - "forecast_date": { - "description": "An object containing arrays of required and optional unique forecast dates. Forecast date usually defines the date that a model is run to produce a forecast.", - "examples": [ - { - "required": null, - "optional": ["2022-11-05", "2022-11-12", "2022-11-19"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of forecast date unique identifiers that must be present for submission to be valid. Can be null if no forecast dates are required and all valid forecast dates are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - }, - "optional": { - "description": "Array of valid but not required unique forecast date identifiers. Can be null if all forecast dates are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - } - }, - "required": ["required", "optional"] - }, - "scenario_id": { - "description": "An object containing arrays of required and optional unique identifiers of each valid scenario.", - "examples": [ - { - "required": null, - "optional": [1, 2, 3, 4] - }, { - "required": null, - "optional": ["A-2021-03-28", "B-2021-03-28", "A-2021-04-05", "B-2021-04-05"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of identifiers of scenarios that must be present in a valid submission. Can be null if no scenario ids are required and all valid ids are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": ["integer", "string"] - } - }, - "optional": { - "description": "Array of identifiers of valid but not required scenarios. Can be null if all scenarios are required and are specified in the required property.", - "type": [ - "null", "array" - ], - "uniqueItems": true, - "items": { - "type": ["integer", "string"] - } - } - }, - "required": ["required", "optional"] - }, - "location": { - "description": "An object containing arrays of required and optional unique identifiers for each valid location, e.g. country codes, FIPS state or county level code etc.", - "examples": [ - { - "required": ["US"], - "optional": [ - "01", - "02", - "04", - "05", - "06", - "08", - "09", - "10", - "11", - "12", - "13", - "15", - "16", - "17", - "18", - "19", - "20", - "21", - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - "32", - "33", - "34", - "35", - "36", - "37", - "38", - "39", - "40", - "41", - "42", - "44", - "45", - "46", - "47", - "48", - "49", - "50", - "51", - "53", - "54", - "55", - "56" - ] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of location unique identifiers that must be present for submission to be valid. Can be null if no locations are required and all valid locations are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "optional": { - "description": "Array of valid but not required unique location identifiers. Can be null if all locations are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": ["required", "optional"] - }, - "target": { - "description": "An object containing arrays of required and optional unique identifiers for each valid target. Usually represents a single task ID target key variable.", - "type": "object", - "examples": [ - { - "required": null, - "optional": ["inc hosp", "inc case", "inc death"] - }, { - "required": ["peak week inc hosp"], - "optional": null - } - ], - "properties": { - "required": { - "description": "Array of target unique identifiers that must be present for submission to be valid. Can be null if no targets are required and all valid targets are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "optional": { - "description": "Array of valid but not required unique target identifiers. Can be null if all targets are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": ["required", "optional"] - }, - "target_variable": { - "description": "An object containing arrays of required and optional unique identifiers for each valid target variable. Usually forms part of a pair of task ID target key variables (along with target_outcome) which combine to define individual targets.", - "type": "object", - "examples": [ - { - "required": null, - "optional": ["hosp", "death", "case"] - }, { - "required": ["hosp"], - "optional": ["case"] - } - ], - "properties": { - "required": { - "description": "Array of target variable unique identifiers that must be present for submission to be valid. Can be null if no target variables are required and all valid target variables are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "optional": { - "description": "Array of valid but not required unique target variable identifiers. Can be null if all target variables are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": ["required", "optional"] - }, - "target_outcome": { - "description": "An object containing arrays of required and optional unique identifiers for each valid target outcome. Usually forms part of a pair of task ID target key variables (along with target_variable) which combine to define individual targets.", - "type": "object", - "examples": [ - { - "required": ["inc"], - "optional": null - }, { - "required": ["inc"], - "optional": ["cum"] - } - ], - "properties": { - "required": { - "description": "Array of target outcome unique identifiers that must be present for submission to be valid. Can be null if no target outcomes are required and all valid target outcomes are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "optional": { - "description": "Array of valid but not required unique target outcome identifiers. Can be null if all target outcomes are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": ["required", "optional"] - }, - "target_date": { - "description": "An object containing arrays of required and optional unique target dates. For short-term forecasts, the target_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_date is 2022-07-15", - "examples": [ - { - "required": null, - "optional": ["2022-11-12", "2022-11-19", "2022-11-26"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of target date unique identifiers that must be present for submission to be valid. Can be null if no target dates are required and all valid target dates are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - }, - "optional": { - "description": "Array of valid but not required unique target date identifiers. Can be null if all target dates are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - } - }, - "required": ["required", "optional"] - }, - "target_end_date": { - "description": "An object containing arrays of required and optional unique target end dates. For short-term forecasts, the target_end_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_end_date is 2022-07-15", - "examples": [ - { - "required": null, - "optional": ["2022-11-12", "2022-11-19", "2022-11-26"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of target end date unique identifiers that must be present for submission to be valid. Can be null if no target end dates are required and all valid target end dates are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - }, - "optional": { - "description": "Array of valid but not required unique target end date identifiers. Can be null if all target end dates are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string", - "format": "date" - } - } - }, - "required": ["required", "optional"] - }, - "horizon": { - "description": "An object containing arrays of required and optional unique horizons. Horizons define the difference between the target_date and the origin_date in time units specified by the hub (e.g., may be days, weeks, or months)", - "examples": [ - { - "required": null, - "optional": [1, 2, 3, 4] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of horizon unique identifiers that must be present for submission to be valid. Can be null if no horizons are required and all valid horizons are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": ["integer", "string"] - } - }, - "optional": { - "description": "Array of valid but not required unique horizon identifiers. Can be null if all horizons are required and are specified in the required property.", - "type": [ - "null", "array" - ], - "uniqueItems": true, - "items": { - "type": ["integer", "string"] - } - } - }, - "required": ["required", "optional"] + "type": "object", + "description": "Individual modeling round properties", + "properties": { + "round_id_from_variable": { + "description": "Whether the round identifier is encoded by a task id variable in the data.", + "type": "boolean" }, - "age_group": { - "type": "object", - "description": "An object containing arrays of required and optional unique identifiers for age groups", - "examples": [ - { - "required": [ - "0-5", "6-18", "19-24", "25-64", "65+" - ], - "optional": null - } - ], - "properties": { - "required": { - "description": "Array of age group unique identifiers that must be present for submission to be valid. Can be null if no age groups are required and all valid age groups are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "optional": { - "description": "Array of valid but not required unique age group identifiers. Can be null if all age group are required and are specified in the required property.", - "type": [ - "array", "null" - ], - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": ["required", "optional"] - } - }, - "additionalProperties": { - "type": "object", - "description": "An object containing arrays of required and optional unique values for a custom Task ID", - "properties": { - "required": { - "description": "Array of custom Task ID unique values that must be present for submission to be valid. Can be null if no values are required and all valid values are specified in the optional property.", - "type": [ - "array", "null" - ], - "uniqueItems": true - }, - "optional": { - "description": "Array of valid but not required unique custom Task ID values. Can be null if all values are required and are specified in the required property.", - "type": [ - "array", "null" + "round_id": { + "description": "Round identifier. If round_id_from_variable = true, round_id should be the name of a task id variable present in all sets of modeling task specifications", + "examples": [ + "round-1", + "2022-11-05", + "origin_date" ], - "uniqueItems": true - } + "type": "string" }, - "required": ["required", "optional"] - } - }, - "output_type": { - "type": "object", - "description": "Object defining valid model output types for a given modeling task. The name of each property corresponds to valid values in column 'output_type' while the 'output_type_id' property of each output type defines the valid values of the 'output_type_id' column and the 'value' property defines the valid values of the 'value' column for a given output type.", - "properties": { - "mean": { - "type": "object", - "description": "Object defining the mean of the predictive distribution output type.", - "properties": { - "output_type_id": { - "description": "output_type_id is not meaningful for a point estimate output_type.", - "examples": [ - { - "required": ["NA"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } - } - }, - "required": ["required"] - }, - "value": { - "type": "object", - "description": "Object defining the characteristics of valid mean values.", - "examples": [ - { - "type": "double", - "minimum": 0 - } - ], - "properties": { - "type": { - "description": "Data type of mean values.", - "type": "string", - "enum": ["double", "integer"] - }, - "minimum": { - "description": "The minimum inclusive valid mean value", - "type": ["number", "integer"] - }, - "maximum": { - "description": "the maximum inclusive valid mean value", - "type": ["number", "integer"] - } - }, - "required": ["type"] - }, - "is_required": { - "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", - "examples": [ - { - "is_required": true - }, { - "is_required": false - } - ], - "type": "boolean" - } - }, - "required": ["output_type_id", "value", "is_required"] + "round_name": { + "description": "An optional round name. This can be useful for internal referencing of rounds, for examples, when a date is used as round_id but hub maintainers and teams also refer to rounds as round-1, round-2 etc.", + "examples": [ + "round-1" + ], + "type": "string" }, - "median": { - "type": "object", - "description": "Object defining the median of the predictive distribution output type", - "properties": { - "output_type_id": { - "description": "output_type_id is not meaningful for a point estimate output_type.", - "examples": [ - { - "required": ["NA"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } - } - }, - "required": ["required"] - }, - "value": { - "type": "object", - "description": "Object defining the characteristics of valid mean values.", - "examples": [ - { - "type": "double", - "minimum": 0 - } - ], - "properties": { - "type": { - "description": "Data type of median values.", - "type": "string", - "enum": ["double", "integer"] - }, - "minimum": { - "description": "The minimum inclusive valid median value", - "type": ["number", "integer"] + "model_tasks": { + "type": "array", + "description": "Array defining round-specific modeling tasks. Can contain one or more groups of modeling tasks per round where each group is defined by a distinct combination of values of task id variables.", + "items": { + "type": "object", + "properties": { + "task_ids": { + "description": "Group of valid values of task id variables. A set of valid tasks corresponding to this group is formed by taking all combinations of these values.", + "type": "object", + "properties": { + "origin_date": { + "description": "An object containing arrays of required and optional unique origin dates. Origin date defines the starting point that can be used for calculating a target_date via the formula target_date = origin_date + horizon x time_units_per_horizon (e.g., with weekly data, target_date is calculated as origin_date + horizon x 7 days)", + "examples": [ + { + "required": null, + "optional": [ + "2022-11-05", + "2022-11-12", + "2022-11-19" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of origin date unique identifiers that must be present for submission to be valid. Can be null if no origin dates are required and all valid origin dates are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique origin date identifiers. Can be null if all origin dates are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "forecast_date": { + "description": "An object containing arrays of required and optional unique forecast dates. Forecast date usually defines the date that a model is run to produce a forecast.", + "examples": [ + { + "required": null, + "optional": [ + "2022-11-05", + "2022-11-12", + "2022-11-19" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of forecast date unique identifiers that must be present for submission to be valid. Can be null if no forecast dates are required and all valid forecast dates are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique forecast date identifiers. Can be null if all forecast dates are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "scenario_id": { + "description": "An object containing arrays of required and optional unique identifiers of each valid scenario.", + "examples": [ + { + "required": null, + "optional": [ + 1, + 2, + 3, + 4 + ] + }, + { + "required": null, + "optional": [ + "A-2021-03-28", + "B-2021-03-28", + "A-2021-04-05", + "B-2021-04-05" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of identifiers of scenarios that must be present in a valid submission. Can be null if no scenario ids are required and all valid ids are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": [ + "integer", + "string" + ] + } + }, + "optional": { + "description": "Array of identifiers of valid but not required scenarios. Can be null if all scenarios are required and are specified in the required property.", + "type": [ + "null", + "array" + ], + "uniqueItems": true, + "items": { + "type": [ + "integer", + "string" + ] + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "location": { + "description": "An object containing arrays of required and optional unique identifiers for each valid location, e.g. country codes, FIPS state or county level code etc.", + "examples": [ + { + "required": [ + "US" + ], + "optional": [ + "01", + "02", + "04", + "05", + "06", + "08", + "09", + "10", + "11", + "12", + "13", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + "32", + "33", + "34", + "35", + "36", + "37", + "38", + "39", + "40", + "41", + "42", + "44", + "45", + "46", + "47", + "48", + "49", + "50", + "51", + "53", + "54", + "55", + "56" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of location unique identifiers that must be present for submission to be valid. Can be null if no locations are required and all valid locations are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique location identifiers. Can be null if all locations are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "target": { + "description": "An object containing arrays of required and optional unique identifiers for each valid target. Usually represents a single task ID target key variable.", + "type": "object", + "examples": [ + { + "required": null, + "optional": [ + "inc hosp", + "inc case", + "inc death" + ] + }, + { + "required": [ + "peak week inc hosp" + ], + "optional": null + } + ], + "properties": { + "required": { + "description": "Array of target unique identifiers that must be present for submission to be valid. Can be null if no targets are required and all valid targets are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique target identifiers. Can be null if all targets are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "target_variable": { + "description": "An object containing arrays of required and optional unique identifiers for each valid target variable. Usually forms part of a pair of task ID target key variables (along with target_outcome) which combine to define individual targets.", + "type": "object", + "examples": [ + { + "required": null, + "optional": [ + "hosp", + "death", + "case" + ] + }, + { + "required": [ + "hosp" + ], + "optional": [ + "case" + ] + } + ], + "properties": { + "required": { + "description": "Array of target variable unique identifiers that must be present for submission to be valid. Can be null if no target variables are required and all valid target variables are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique target variable identifiers. Can be null if all target variables are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "target_outcome": { + "description": "An object containing arrays of required and optional unique identifiers for each valid target outcome. Usually forms part of a pair of task ID target key variables (along with target_variable) which combine to define individual targets.", + "type": "object", + "examples": [ + { + "required": [ + "inc" + ], + "optional": null + }, + { + "required": [ + "inc" + ], + "optional": [ + "cum" + ] + } + ], + "properties": { + "required": { + "description": "Array of target outcome unique identifiers that must be present for submission to be valid. Can be null if no target outcomes are required and all valid target outcomes are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique target outcome identifiers. Can be null if all target outcomes are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "target_date": { + "description": "An object containing arrays of required and optional unique target dates. For short-term forecasts, the target_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_date is 2022-07-15", + "examples": [ + { + "required": null, + "optional": [ + "2022-11-12", + "2022-11-19", + "2022-11-26" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of target date unique identifiers that must be present for submission to be valid. Can be null if no target dates are required and all valid target dates are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique target date identifiers. Can be null if all target dates are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "target_end_date": { + "description": "An object containing arrays of required and optional unique target end dates. For short-term forecasts, the target_end_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_end_date is 2022-07-15", + "examples": [ + { + "required": null, + "optional": [ + "2022-11-12", + "2022-11-19", + "2022-11-26" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of target end date unique identifiers that must be present for submission to be valid. Can be null if no target end dates are required and all valid target end dates are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + }, + "optional": { + "description": "Array of valid but not required unique target end date identifiers. Can be null if all target end dates are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string", + "format": "date" + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "horizon": { + "description": "An object containing arrays of required and optional unique horizons. Horizons define the difference between the target_date and the origin_date in time units specified by the hub (e.g., may be days, weeks, or months)", + "examples": [ + { + "required": null, + "optional": [ + 1, + 2, + 3, + 4 + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of horizon unique identifiers that must be present for submission to be valid. Can be null if no horizons are required and all valid horizons are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": [ + "integer", + "string" + ] + } + }, + "optional": { + "description": "Array of valid but not required unique horizon identifiers. Can be null if all horizons are required and are specified in the required property.", + "type": [ + "null", + "array" + ], + "uniqueItems": true, + "items": { + "type": [ + "integer", + "string" + ] + } + } + }, + "required": [ + "required", + "optional" + ] + }, + "age_group": { + "type": "object", + "description": "An object containing arrays of required and optional unique identifiers for age groups", + "examples": [ + { + "required": [ + "0-5", + "6-18", + "19-24", + "25-64", + "65+" + ], + "optional": null + } + ], + "properties": { + "required": { + "description": "Array of age group unique identifiers that must be present for submission to be valid. Can be null if no age groups are required and all valid age groups are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "optional": { + "description": "Array of valid but not required unique age group identifiers. Can be null if all age group are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "optional" + ] + } + }, + "additionalProperties": { + "type": "object", + "description": "An object containing arrays of required and optional unique values for a custom Task ID", + "properties": { + "required": { + "description": "Array of custom Task ID unique values that must be present for submission to be valid. Can be null if no values are required and all valid values are specified in the optional property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "optional": { + "description": "Array of valid but not required unique custom Task ID values. Can be null if all values are required and are specified in the required property.", + "type": [ + "array", + "null" + ], + "uniqueItems": true + } + }, + "required": [ + "required", + "optional" + ] + } + }, + "output_type": { + "type": "object", + "description": "Object defining valid model output types for a given modeling task. The name of each property corresponds to valid values in column 'output_type' while the 'output_type_id' property of each output type defines the valid values of the 'output_type_id' column and the 'value' property defines the valid values of the 'value' column for a given output type.", + "properties": { + "mean": { + "type": "object", + "description": "Object defining the mean of the predictive distribution output type.", + "properties": { + "output_type_id": { + "description": "output_type_id is not meaningful for a point estimate output_type.", + "examples": [ + { + "required": [ + "NA" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 + } + } + }, + "required": [ + "required" + ] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid mean values.", + "examples": [ + { + "type": "double", + "minimum": 0 + } + ], + "properties": { + "type": { + "description": "Data type of mean values.", + "type": "string", + "enum": [ + "double", + "integer" + ] + }, + "minimum": { + "description": "The minimum inclusive valid mean value", + "type": [ + "number", + "integer" + ] + }, + "maximum": { + "description": "the maximum inclusive valid mean value", + "type": [ + "number", + "integer" + ] + } + }, + "required": [ + "type" + ] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, + { + "is_required": false + } + ], + "type": "boolean" + } + }, + "required": [ + "output_type_id", + "value", + "is_required" + ] + }, + "median": { + "type": "object", + "description": "Object defining the median of the predictive distribution output type", + "properties": { + "output_type_id": { + "description": "output_type_id is not meaningful for a point estimate output_type.", + "examples": [ + { + "required": [ + "NA" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", + "type": "array", + "items": { + "const": "NA", + "maxItems": 1 + } + } + }, + "required": [ + "required" + ] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid mean values.", + "examples": [ + { + "type": "double", + "minimum": 0 + } + ], + "properties": { + "type": { + "description": "Data type of median values.", + "type": "string", + "enum": [ + "double", + "integer" + ] + }, + "minimum": { + "description": "The minimum inclusive valid median value", + "type": [ + "number", + "integer" + ] + }, + "maximum": { + "description": "the maximum inclusive valid median value", + "type": [ + "number", + "integer" + ] + } + }, + "required": [ + "type" + ] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, + { + "is_required": false + } + ], + "type": "boolean" + } + }, + "required": [ + "output_type_id", + "value", + "is_required" + ] + }, + "quantile": { + "description": "Object defining the quantiles of the predictive distribution output type.", + "type": "object", + "properties": { + "output_type_id": { + "description": "Object containing arrays of required probability levels at which quantiles of the predictive distribution will be recorded.", + "examples": [ + { + "required": [ + 0.1, + 0.2, + 0.25, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.75, + 0.8, + 0.9 + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of unique probability levels between 0 and 1 inclusive that must be present for submission to be valid.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "number", + "minimum": 0, + "maximum": 1 + } + } + }, + "required": [ + "required" + ] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid quantiles of the predictive distribution at a given probability level.", + "properties": { + "type": { + "description": "Data type of quantile values.", + "examples": [ + "double" + ], + "type": "string", + "enum": [ + "double", + "integer" + ] + }, + "minimum": { + "description": "The minimum inclusive valid quantile value (optional).", + "examples": [ + 0 + ], + "type": [ + "number", + "integer" + ] + }, + "maximum": { + "description": "The maximum inclusive valid quantile value (optional).", + "type": [ + "number", + "integer" + ] + } + }, + "required": [ + "type" + ] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, + { + "is_required": false + } + ], + "type": "boolean" + } + }, + "required": [ + "output_type_id", + "value", + "is_required" + ] + }, + "cdf": { + "description": "Object defining the cumulative distribution function of the predictive distribution output type.", + "type": "object", + "properties": { + "output_type_id": { + "description": "Object containing required arrays defining possible values of the target variable at which values of the cumulative distribution function of the predictive distribution will be recorded. These should be listed in order from low to high.", + "examples": [ + { + "required": [ + 10, + 20 + ] + }, + { + "required": [ + "EW202240", + "EW202241", + "EW202242", + "EW202243", + "EW202244", + "EW202245", + "EW202246", + "EW202247" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of unique target values that must be present for submission to be valid.", + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": [ + "number", + "integer" + ], + "minimum": 0 + }, + { + "type": "string" + } + ] + } + } + }, + "required": [ + "required" + ] + }, + "value": { + "type": "object", + "description": "Object defining the characteristics of valid values of the cumulative distribution function at a given target value.", + "properties": { + "type": { + "description": "Data type of cumulative distribution function values.", + "examples": [ + "double" + ], + "const": "double" + }, + "minimum": { + "description": "The minimum inclusive valid cumulative distribution function value. Must be 0.", + "const": 0 + }, + "maximum": { + "description": "The maximum inclusive valid cumulative distribution function value. Must be 1.", + "const": 1 + } + }, + "required": [ + "type", + "minimum", + "maximum" + ] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, + { + "is_required": false + } + ], + "type": "boolean" + } + }, + "required": [ + "output_type_id", + "value", + "is_required" + ] + }, + "pmf": { + "description": "Object defining a probability mass function for a discrete variable output type. Includes nominal, binary and ordinal variable types.", + "type": "object", + "properties": { + "output_type_id": { + "description": "Object containing arrays of required values specifying valid categories of a discrete variable. Note that for ordinal variables, the category levels should be listed in order from low to high.", + "examples": [ + { + "required": [ + "low", + "moderate", + "high", + "extreme" + ] + } + ], + "type": "object", + "properties": { + "required": { + "description": "Array of unique categories of a discrete variable that must be present for submission to be valid.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "required" + ] + }, + "value": { + "type": "object", + "description": "Object defining valid values of the probability mass function of the predictive distribution for a given category of a discrete outcome variable.", + "examples": [ + { + "type": "double", + "minimum": 0, + "maximum": 1 + } + ], + "properties": { + "type": { + "description": "Data type of the probability mass function values.", + "const": "double" + }, + "minimum": { + "description": "The minimum inclusive valid probability mass function value. Must be 0.", + "const": 0 + }, + "maximum": { + "description": "The maximum inclusive valid probability mass function value. Must be 1.", + "const": 1 + } + }, + "required": [ + "type", + "minimum", + "maximum" + ] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, + { + "is_required": false + } + ], + "type": "boolean" + } + }, + "required": [ + "output_type_id", + "value", + "is_required" + ] + }, + "sample": { + "description": "Object defining a sample output type.", + "type": "object", + "properties": { + "output_type_id_params": { + "description": "Object containing parameters specifying how samples were drawn.", + "examples": [ + { + "output_type_id_params": { + "type": "integer", + "min_samples_per_task": 100, + "max_samples_per_task": 100 + } + }, + { + "output_type_id_params": { + "type": "character", + "max_length": 6, + "min_samples_per_task": 100, + "max_samples_per_task": 500, + "compound_taskid_set": [ + "origin_date", + "horizon", + "location", + "variant" + ] + } + } + ], + "type": "object", + "properties": { + "type": { + "description": "Data type of sample indices.", + "type": "string", + "enum": [ + "character", + "integer" + ] + }, + "max_length": { + "description": "Required only if 'type' is 'character'. Positive integer representing the maximum number of characters in a sample index. Ignored if 'type' is 'integer'.", + "type": "integer", + "minimum": 1 + }, + "min_samples_per_task": { + "description": "The minimum number of samples per individual task.", + "type": "integer", + "minimum": 1 + }, + "max_samples_per_task": { + "description": "The maximum number of samples per individual task.", + "type": "integer", + "minimum": 1 + }, + "compound_taskid_set": { + "description": "Optional. Specifies whether validation should factor in the presence of a compound modeling task. Each item of the array must be a task id variable name. If unspecified, defaults to all task ID variables.", + "type": [ + "array" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "min_samples_per_task", + "max_samples_per_task" + ], + "if": { + "properties": { + "type": { + "const": "character" + } + } + }, + "then": { + "required": [ + "max_length" + ] + } + }, + "value": { + "type": "object", + "description": "Object defining valid values of samples from the predictive distribution for a given sample index. Depending on the Hub specification, samples with the same sample index (specified by the output_type_id) may be assumed to correspond to a joint distribution across multiple levels of the task id variables. See Hub documentation for details.", + "properties": { + "type": { + "description": "Data type of sample value from the predictive distribution.", + "examples": [ + { + "type": "double" + } + ], + "type": "string", + "enum": [ + "double", + "integer" + ] + }, + "minimum": { + "description": "The minimum inclusive valid sample value from the predictive distribution.", + "type": [ + "number", + "integer" + ] + }, + "maximum": { + "description": "The maximum inclusive valid sample value from the predictive distribution.", + "type": [ + "number", + "integer" + ] + } + }, + "required": [ + "type" + ] + }, + "is_required": { + "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", + "examples": [ + { + "is_required": true + }, + { + "is_required": false + } + ], + "type": "boolean" + } + }, + "required": [ + "output_type_id_params", + "value", + "is_required" + ] + } + }, + "additionalProperties": false + }, + "target_metadata": { + "description": "Array of objects containing metadata about each unique target, one object for each unique target value.", + "type": "array", + "items": { + "type": "object", + "description": "Object containg metadata about a single unique target.", + "properties": { + "target_id": { + "description": "Short description that uniquely identifies the target.", + "examples": [ + "inc hosp", + "peak week hosp" + ], + "type": "string", + "maxLength": 30 + }, + "target_name": { + "description": "A longer human readable target description that could be used, for example, as a visualisation axis label.", + "examples": [ + "Weekly incident influenza hospitalizations", + "Peak week for incident influenza hospitalizations" + ], + "type": "string", + "maxLength": 100 + }, + "target_units": { + "description": "Unit of observation of the target.", + "examples": [ + "rate per 100,000 population", + "count", + "date" + ], + "type": "string", + "maxLength": 100 + }, + "target_keys": { + "description": "Should be either null, in the case where the target is not specified as a task_id and is specified solely through the target_id target_metadata property or an object with one or more properties, the names of which match task_id variable(s) named within the same model_tasks object. Each property should have one specified value. Each value, or the combination of values if multiple keys are specified, define a single target value.", + "examples": [ + { + "target": "inc hosp" + }, + { + "target": "peak week hosp" + }, + { + "target_variable": "hosp", + "target_outcome": "inc" + }, + { + "target_variable": "case", + "target_outcome": "peak week" + }, + null + ], + "type": [ + "object", + "null" + ] + }, + "description": { + "description": "a verbose description of the target that might include information such as the target_measure above, or definitions of a 'rate' or similar.", + "type": "string" + }, + "target_type": { + "description": "Target statistical data type", + "examples": [ + "discrete", + "ordinal" + ], + "type": "string", + "enum": [ + "continuous", + "discrete", + "date", + "binary", + "nominal", + "ordinal", + "compositional" + ] + }, + "is_step_ahead": { + "description": "Whether the target is part of a sequence of values", + "examples": [ + true, + false + ], + "type": "boolean" + }, + "time_unit": { + "description": " if is_step_ahead is true, then this is required and defines the unit of time steps. if is_step_ahead is false, then this should be left out and/or will be ignored if present.", + "examples": [ + "week" + ], + "type": "string", + "enum": [ + "day", + "week", + "month" + ] + } + }, + "required": [ + "target_id", + "target_name", + "target_units", + "target_type", + "target_keys", + "is_step_ahead" + ], + "additionalProperties": false, + "if": { + "properties": { + "is_step_ahead": { + "const": true + } + } + }, + "then": { + "required": [ + "time_unit" + ] + } + } + } }, - "maximum": { - "description": "the maximum inclusive valid median value", - "type": ["number", "integer"] - } - }, - "required": ["type"] - }, - "is_required": { - "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", - "examples": [ - { - "is_required": true - }, { - "is_required": false - } - ], - "type": "boolean" + "required": [ + "task_ids", + "output_type", + "target_metadata" + ] } - }, - "required": ["output_type_id", "value", "is_required"] }, - "quantile": { - "description": "Object defining the quantiles of the predictive distribution output type.", - "type": "object", - "properties": { - "output_type_id": { - "description": "Object containing arrays of required probability levels at which quantiles of the predictive distribution will be recorded.", - "examples": [ + "submissions_due": { + "description": "Object defining the dates by which model forecasts must be submitted to the hub.", + "examples": [ { - "required": [ - 0.1, - 0.2, - 0.25, - 0.3, - 0.4, - 0.5, - 0.6, - 0.7, - 0.75, - 0.8, - 0.9 - ] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of unique probability levels between 0 and 1 inclusive that must be present for submission to be valid.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - } - }, - "required": ["required"] - }, - "value": { - "type": "object", - "description": "Object defining the characteristics of valid quantiles of the predictive distribution at a given probability level.", - "properties": { - "type": { - "description": "Data type of quantile values.", - "examples": ["double"], - "type": "string", - "enum": ["double", "integer"] - }, - "minimum": { - "description": "The minimum inclusive valid quantile value (optional).", - "examples": [0], - "type": ["number", "integer"] + "start": "2022-06-07", + "end": "2022-07-20" }, - "maximum": { - "description": "The maximum inclusive valid quantile value (optional).", - "type": ["number", "integer"] - } - }, - "required": ["type"] - }, - "is_required": { - "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", - "examples": [ { - "is_required": true - }, { - "is_required": false + "relative_to": "origin_date", + "start": -4, + "end": 2 } - ], - "type": "boolean" - } - }, - "required": ["output_type_id", "value", "is_required"] - }, - "cdf": { - "description": "Object defining the cumulative distribution function of the predictive distribution output type.", - "type": "object", - "properties": { - "output_type_id": { - "description": "Object containing required arrays defining possible values of the target variable at which values of the cumulative distribution function of the predictive distribution will be recorded. These should be listed in order from low to high.", - "examples": [ + ], + "type": "object", + "oneOf": [ { - "required": [10.0, 20.0] - }, { - "required": [ - "EW202240", - "EW202241", - "EW202242", - "EW202243", - "EW202244", - "EW202245", - "EW202246", - "EW202247" - ] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of unique target values that must be present for submission to be valid.", - "type": "array", - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": [ - "number", "integer" - ], - "minimum": 0 - }, { - "type": "string" - } + "properties": { + "relative_to": { + "description": "Name of task id variable in relation to which submission start and end dates are calculated.", + "type": "string" + }, + "start": { + "description": "Difference in days between start and origin date.", + "type": "integer" + }, + "end": { + "description": "Difference in days between end and origin date.", + "type": "integer" + } + }, + "required": [ + "relative_to", + "start", + "end" ] - } - } - }, - "required": ["required"] - }, - "value": { - "type": "object", - "description": "Object defining the characteristics of valid values of the cumulative distribution function at a given target value.", - "properties": { - "type": { - "description": "Data type of cumulative distribution function values.", - "examples": ["double"], - "const": "double" - }, - "minimum": { - "description": "The minimum inclusive valid cumulative distribution function value. Must be 0.", - "const": 0 - }, - "maximum": { - "description": "The maximum inclusive valid cumulative distribution function value. Must be 1.", - "const": 1 - } - }, - "required": ["type", "minimum", "maximum"] - }, - "is_required": { - "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", - "examples": [ - { - "is_required": true - }, { - "is_required": false - } - ], - "type": "boolean" - } - }, - "required": ["output_type_id", "value", "is_required"] - }, - "pmf": { - "description": "Object defining a probability mass function for a discrete variable output type. Includes nominal, binary and ordinal variable types.", - "type": "object", - "properties": { - "output_type_id": { - "description": "Object containing arrays of required values specifying valid categories of a discrete variable. Note that for ordinal variables, the category levels should be listed in order from low to high.", - "examples": [ - { - "required": ["low", "moderate", "high", "extreme"] - } - ], - "type": "object", - "properties": { - "required": { - "description": "Array of unique categories of a discrete variable that must be present for submission to be valid.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": ["required"] - }, - "value": { - "type": "object", - "description": "Object defining valid values of the probability mass function of the predictive distribution for a given category of a discrete outcome variable.", - "examples": [ - { - "type": "double", - "minimum": 0, - "maximum": 1 - } - ], - "properties": { - "type": { - "description": "Data type of the probability mass function values.", - "const": "double" }, - "minimum": { - "description": "The minimum inclusive valid probability mass function value. Must be 0.", - "const": 0 - }, - "maximum": { - "description": "The maximum inclusive valid probability mass function value. Must be 1.", - "const": 1 - } - }, - "required": ["type", "minimum", "maximum"] - }, - "is_required": { - "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", - "examples": [ - { - "is_required": true - }, { - "is_required": false - } - ], - "type": "boolean" - } - }, - "required": ["output_type_id", "value", "is_required"] - }, - "sample": { - "description": "Object defining a sample output type.", - "type": "object", - "properties": { - "output_type_id_params": { - "description": "Object containing parameters specifying how samples were drawn.", - "examples": [ - { - "output_type_id_params": { - "type": "integer", - "min_samples_per_task": 100, - "max_samples_per_task": 100 - } - }, { - "output_type_id_params": { - "type": "character", - "max_length": 6, - "min_samples_per_task": 100, - "max_samples_per_task": 500, - "compound_taskid_set": ["origin_date", "horizon", "location", "variant"] - } - } - ], - "type": "object", - "properties": { - "type": { - "description": "Data type of sample indices.", - "type": "string", - "enum": ["character", "integer"] - }, - "max_length": { - "description": "Required only if 'type' is 'character'. Positive integer representing the maximum number of characters in a sample index. Ignored if 'type' is 'integer'.", - "type": "integer", - "minimum": 1 - }, - "min_samples_per_task": { - "description": "The minimum number of samples per individual task.", - "type": "integer", - "minimum": 1 - }, - "max_samples_per_task": { - "description": "The maximum number of samples per individual task.", - "type": "integer", - "minimum": 1 - }, - "compound_taskid_set": { - "description": "Optional. Specifies whether validation should factor in the presence of a compound modeling task. Each item of the array must be a task id variable name. If unspecified, defaults to all task ID variables.", - "type": ["array"], - "uniqueItems": true, - "items": { - "type": "string" - } - } - }, - "required": [ - "type", "min_samples_per_task", "max_samples_per_task" - ], - "if": { - "properties": { - "type": { - "const": "character" - } - } - }, - "then": { - "required": ["max_length"] - } - }, - "value": { - "type": "object", - "description": "Object defining valid values of samples from the predictive distribution for a given sample index. Depending on the Hub specification, samples with the same sample index (specified by the output_type_id) may be assumed to correspond to a joint distribution across multiple levels of the task id variables. See Hub documentation for details.", - "properties": { - "type": { - "description": "Data type of sample value from the predictive distribution.", - "examples": [ - { - "type": "double" - } - ], - "type": "string", - "enum": ["double", "integer"] - }, - "minimum": { - "description": "The minimum inclusive valid sample value from the predictive distribution.", - "type": ["number", "integer"] - }, - "maximum": { - "description": "The maximum inclusive valid sample value from the predictive distribution.", - "type": ["number", "integer"] - } - }, - "required": ["type"] - }, - "is_required": { - "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", - "examples": [ { - "is_required": true - }, { - "is_required": false + "properties": { + "start": { + "description": "Submission start date.", + "type": "string", + "format": "date" + }, + "end": { + "description": "Submission end date.", + "type": "string", + "format": "date" + } + }, + "required": [ + "start", + "end" + ] } - ], - "type": "boolean" - } - }, - "required": ["output_type_id_params", "value", "is_required"] - } - }, - "additionalProperties": false - }, - "target_metadata": { - "description": "Array of objects containing metadata about each unique target, one object for each unique target value.", - "type": "array", - "items": { - "type": "object", - "description": "Object containg metadata about a single unique target.", - "properties": { - "target_id": { - "description": "Short description that uniquely identifies the target.", - "examples": [ - "inc hosp", "peak week hosp" - ], - "type": "string", - "maxLength": 30 - }, - "target_name": { - "description": "A longer human readable target description that could be used, for example, as a visualisation axis label.", - "examples": [ - "Weekly incident influenza hospitalizations", "Peak week for incident influenza hospitalizations" - ], - "type": "string", - "maxLength": 100 - }, - "target_units": { - "description": "Unit of observation of the target.", - "examples": [ - "rate per 100,000 population", "count", "date" - ], - "type": "string", - "maxLength": 100 - }, - "target_keys": { - "description": "Should be either null, in the case where the target is not specified as a task_id and is specified solely through the target_id target_metadata property or an object with one or more properties, the names of which match task_id variable(s) named within the same model_tasks object. Each property should have one specified value. Each value, or the combination of values if multiple keys are specified, define a single target value.", - "examples": [ - { - "target": "inc hosp" - }, { - "target": "peak week hosp" - }, { - "target_variable": "hosp", - "target_outcome": "inc" - }, { - "target_variable": "case", - "target_outcome": "peak week" - }, - null - ], - "type": ["object", "null"] - }, - "description": { - "description": "a verbose description of the target that might include information such as the target_measure above, or definitions of a 'rate' or similar.", - "type": "string" - }, - "target_type": { - "description": "Target statistical data type", - "examples": [ - "discrete", "ordinal" ], - "type": "string", - "enum": [ - "continuous", - "discrete", - "date", - "binary", - "nominal", - "ordinal", - "compositional" + "required": [ + "start", + "end" ] - }, - "is_step_ahead": { - "description": "Whether the target is part of a sequence of values", + }, + "last_data_date": { + "description": "The last date with recorded data in the data set used as input to a model.", "examples": [ - true, false + "2022-07-18" ], - "type": "boolean" - }, - "time_unit": { - "description": " if is_step_ahead is true, then this is required and defines the unit of time steps. if is_step_ahead is false, then this should be left out and/or will be ignored if present.", - "examples": ["week"], "type": "string", - "enum": ["day", "week", "month"] - } + "format": "date" }, - "required": [ - "target_id", - "target_name", - "target_units", - "target_type", - "target_keys", - "is_step_ahead" - ], - "additionalProperties": false, - "if": { - "properties": { - "is_step_ahead": { - "const": true + "file_format": { + "description": "Accepted file formats of model output files for the round. Overrides the file formats provided in admin.json.", + "examples": [ + [ + "arrow", + "parquet" + ], + [ + "csv" + ] + ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "parquet", + "arrow" + ] } - } - }, - "then": { - "required": ["time_unit"] } - } - } - }, - "required": ["task_ids", "output_type", "target_metadata"] + }, + "required": [ + "round_id_from_variable", + "round_id", + "model_tasks", + "submissions_due" + ], + "additionalProperties": true } - }, - "submissions_due": { - "description": "Object defining the dates by which model forecasts must be submitted to the hub.", + }, + "output_type_id_datatype": { + "description": "The hub level data type of the output_type_id column. This data type must be shared across all files in the hub and be able to represent all output type ID values across all hub output types and rounds. If not provided or set to 'auto', hub defaults to autodetecting the simplest hub level data type.", + "default": "auto", "examples": [ - { - "start": "2022-06-07", - "end": "2022-07-20" - }, { - "relative_to": "origin_date", - "start": -4, - "end": 2 - } + "character" ], - "type": "object", - "oneOf": [ - { - "properties": { - "relative_to": { - "description": "Name of task id variable in relation to which submission start and end dates are calculated.", - "type": "string" - }, - "start": { - "description": "Difference in days between start and origin date.", - "type": "integer" - }, - "end": { - "description": "Difference in days between end and origin date.", - "type": "integer" - } - }, - "required": ["relative_to", "start", "end"] - }, { - "properties": { - "start": { - "description": "Submission start date.", - "type": "string", - "format": "date" - }, - "end": { - "description": "Submission end date.", - "type": "string", - "format": "date" - } - }, - "required": ["start", "end"] - } - ], - "required": ["start", "end"] - }, - "last_data_date": { - "description": "The last date with recorded data in the data set used as input to a model.", - "examples": ["2022-07-18"], "type": "string", - "format": "date" - }, - "file_format": { - "description": "Accepted file formats of model output files for the round. Overrides the file formats provided in admin.json.", - "examples": [ - [ - "arrow", "parquet" - ], - ["csv"] - ], - "type": "array", - "items": { - "type": "string", - "enum": ["csv", "parquet", "arrow"] - } - } - }, - "required": [ - "round_id_from_variable", "round_id", "model_tasks", "submissions_due" + "enum": [ + "auto", + "character", + "double", + "integer", + "logical", + "Date" + ] + } + }, + "derived_task_ids": { + "description": "Names of derived task IDs, i.e. task IDs whose values are derived from (and therefore dependent on) the values of other variables.", + "type": [ + "array", + "null" ], - "additionalProperties": true - } + "uniqueItems": true, + "items": { + "type": "string" + } }, - "output_type_id_datatype": { - "description": "The hub level data type of the output_type_id column. This data type must be shared across all files in the hub and be able to represent all output type ID values across all hub output types and rounds. If not provided or set to 'auto', hub defaults to autodetecting the simplest hub level data type.", - "default": "auto", - "examples": ["character"], - "type": "string", - "enum": [ - "auto", - "character", - "double", - "integer", - "logical", - "Date" - ] - } - }, - "derived_task_ids": { - "description": "Names of derived task IDs, i.e. task IDs whose values are derived from (and therefore dependent on) the values of other variables.", - "type": [ - "array", "null" + "required": [ + "rounds", + "schema_version" ], - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "required": [ - "rounds", "schema_version" - ], - "additionalProperties": false + "additionalProperties": false } From 6bf02537e813b957c0deb328b284ea4f0025fbee Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Thu, 10 Oct 2024 17:40:00 +0300 Subject: [PATCH 10/19] Fix typo --- v4.0.0/tasks-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 266211d..cb19632 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -761,7 +761,7 @@ }, "value": { "type": "object", - "description": "Object defining the characteristics of valid mean values.", + "description": "Object defining the characteristics of valid median values.", "examples": [ { "type": "double", From d29c9b868e933ffc3e643b6f2d20db598d79dd26 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 11 Oct 2024 17:58:00 +0300 Subject: [PATCH 11/19] Correct derived_task_ids location. Add round level derived_task_ids property --- v4.0.0/tasks-schema.json | 43 ++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index cb19632..bd0b0b5 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -1449,6 +1449,22 @@ "arrow" ] } + }, + "derived_task_ids": { + "description": "Names of derived task IDs, i.e. task IDs whose values are derived from (and therefore dependent on) the values of other variables. Use this property to override the global setting for a specific round.", + "examples": [ + [ + "target_end_date" + ] + ], + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } } }, "required": [ @@ -1475,17 +1491,22 @@ "logical", "Date" ] - } - }, - "derived_task_ids": { - "description": "Names of derived task IDs, i.e. task IDs whose values are derived from (and therefore dependent on) the values of other variables.", - "type": [ - "array", - "null" - ], - "uniqueItems": true, - "items": { - "type": "string" + }, + "derived_task_ids": { + "description": "Names of derived task IDs, i.e. task IDs whose values are derived from (and therefore dependent on) the values of other variables.", + "examples": [ + [ + "target_end_date" + ] + ], + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } } }, "required": [ From 91346350548e452ba17a6fd8325dd9d14b1d4353 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 11 Oct 2024 18:13:14 +0300 Subject: [PATCH 12/19] Add round level derived_task_ids explanation --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 44d5c55..f762f15 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ * BREAKING CHANGE: Introduction of `is_required` boolean property at the `output_type` level to configure whether the output type is required for submissions to be considered valid (#99). * BREAKING CHANGE: Disallowed `optional` property in `output_type_id` objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102). -* Introduction of optional `derived_task_ids` property to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs) at a hub level. This allows primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). +* Introduction of optional `derived_task_ids` properties to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs). The higher level `derived_task_ids` property sets the property globally at the hub level but can be overriden by the round level `derived_task_ids` property. The property allows for primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). # v3.0.1 From 7c1fa0e06d5855ddb5867ad08e8b62a9accd6598 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 16 Oct 2024 15:07:09 +0300 Subject: [PATCH 13/19] use additionalProperties to enforce target_keys properties are strings. Resolves #97 --- NEWS.md | 1 + v4.0.0/tasks-schema.json | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index f762f15..87d8900 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ * BREAKING CHANGE: Introduction of `is_required` boolean property at the `output_type` level to configure whether the output type is required for submissions to be considered valid (#99). * BREAKING CHANGE: Disallowed `optional` property in `output_type_id` objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102). * Introduction of optional `derived_task_ids` properties to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs). The higher level `derived_task_ids` property sets the property globally at the hub level but can be overriden by the round level `derived_task_ids` property. The property allows for primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). +* Added more specific schema for `target_keys` to ensure only `string` properties are allowed (#97) # v3.0.1 diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index bd0b0b5..663e35a 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -1286,7 +1286,10 @@ "type": [ "object", "null" - ] + ], + "additionalProperties": { + "type": "string" + } }, "description": { "description": "a verbose description of the target that might include information such as the target_measure above, or definitions of a 'rate' or similar.", From bfabc6d69ded682dbe9689a9605299c7993dca5a Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 25 Oct 2024 10:51:40 +0300 Subject: [PATCH 14/19] Encode point estimate output type IDs with null. Resolves #109 --- NEWS.md | 3 ++- v4.0.0/tasks-schema.json | 28 ++++++++-------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/NEWS.md b/NEWS.md index 87d8900..1b014b0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,8 @@ # v4.0.0 * BREAKING CHANGE: Introduction of `is_required` boolean property at the `output_type` level to configure whether the output type is required for submissions to be considered valid (#99). -* BREAKING CHANGE: Disallowed `optional` property in `output_type_id` objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102). +* BREAKING CHANGE: Disallowed `optional` property in `output_type_id` objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102). +* BREAKING CHANGE: To improve cross-platform interoperability, expectation of missing values in point estimate `output_type_id` `required` properties now encoded with `null` instead of `["NA"]` (#109). * Introduction of optional `derived_task_ids` properties to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs). The higher level `derived_task_ids` property sets the property globally at the hub level but can be overriden by the round level `derived_task_ids` property. The property allows for primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). * Added more specific schema for `target_keys` to ensure only `string` properties are allowed (#97) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 663e35a..8ecd981 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -652,23 +652,17 @@ "description": "Object defining the mean of the predictive distribution output type.", "properties": { "output_type_id": { - "description": "output_type_id is not meaningful for a point estimate output_type.", + "description": "output_type_id is not meaningful for a point estimate output_type. Must be null", "examples": [ { - "required": [ - "NA" - ] + "required": null } ], "type": "object", "properties": { "required": { - "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } + "description": "Not relevant for point estimate output types. Must be null.", + "type": "null" } }, "required": [ @@ -736,23 +730,17 @@ "description": "Object defining the median of the predictive distribution output type", "properties": { "output_type_id": { - "description": "output_type_id is not meaningful for a point estimate output_type.", + "description": "output_type_id is not meaningful for a point estimate output_type. Must be null", "examples": [ { - "required": [ - "NA" - ] + "required": null } ], "type": "object", "properties": { "required": { - "description": "Not relevant for point estimate output types. Must be single element 'NA' array.", - "type": "array", - "items": { - "const": "NA", - "maxItems": 1 - } + "description": "Not relevant for point estimate output types. Must be null.", + "type": "null" } }, "required": [ From de81fd10fdaa185746f31a778422ea818c09f602 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 25 Oct 2024 18:29:24 +0300 Subject: [PATCH 15/19] Update v4.0.0/tasks-schema.json Co-authored-by: Evan Ray --- v4.0.0/tasks-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 8ecd981..c0aa89d 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -730,7 +730,7 @@ "description": "Object defining the median of the predictive distribution output type", "properties": { "output_type_id": { - "description": "output_type_id is not meaningful for a point estimate output_type. Must be null", + "description": "output_type_id is not meaningful for a point estimate output_type. Must have a single property named 'required' with the value null.", "examples": [ { "required": null From 7543aa75a6348a07d65cd00d5029920e9f3bdaf5 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 25 Oct 2024 18:29:39 +0300 Subject: [PATCH 16/19] Update v4.0.0/tasks-schema.json Co-authored-by: Evan Ray --- v4.0.0/tasks-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index c0aa89d..1474f5a 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -652,7 +652,7 @@ "description": "Object defining the mean of the predictive distribution output type.", "properties": { "output_type_id": { - "description": "output_type_id is not meaningful for a point estimate output_type. Must be null", + "description": "output_type_id is not meaningful for a point estimate output_type. Must have a single property named 'required' with the value null.", "examples": [ { "required": null From 1f4256120c16dcebfe28ba5ad3a008deb264ef74 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 1 Nov 2024 14:51:58 +0200 Subject: [PATCH 17/19] Set additionalProperties to false on lower level objects. Resolvse #114 --- v4.0.0/tasks-schema.json | 99 ++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 33 deletions(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index 1474f5a..adbcf4d 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -92,7 +92,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "forecast_date": { "description": "An object containing arrays of required and optional unique forecast dates. Forecast date usually defines the date that a model is run to produce a forecast.", @@ -136,7 +137,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "scenario_id": { "description": "An object containing arrays of required and optional unique identifiers of each valid scenario.", @@ -194,7 +196,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "location": { "description": "An object containing arrays of required and optional unique identifiers for each valid location, e.g. country codes, FIPS state or county level code etc.", @@ -286,7 +289,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "target": { "description": "An object containing arrays of required and optional unique identifiers for each valid target. Usually represents a single task ID target key variable.", @@ -334,7 +338,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "target_variable": { "description": "An object containing arrays of required and optional unique identifiers for each valid target variable. Usually forms part of a pair of task ID target key variables (along with target_outcome) which combine to define individual targets.", @@ -384,7 +389,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "target_outcome": { "description": "An object containing arrays of required and optional unique identifiers for each valid target outcome. Usually forms part of a pair of task ID target key variables (along with target_variable) which combine to define individual targets.", @@ -432,7 +438,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "target_date": { "description": "An object containing arrays of required and optional unique target dates. For short-term forecasts, the target_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_date is 2022-07-15", @@ -476,7 +483,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "target_end_date": { "description": "An object containing arrays of required and optional unique target end dates. For short-term forecasts, the target_end_date specifies the date of occurrence of the outcome of interest. For instance, if models are requested to forecast the number of hospitalizations that will occur on 2022-07-15, the target_end_date is 2022-07-15", @@ -520,7 +528,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "horizon": { "description": "An object containing arrays of required and optional unique horizons. Horizons define the difference between the target_date and the origin_date in time units specified by the hub (e.g., may be days, weeks, or months)", @@ -569,7 +578,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false }, "age_group": { "type": "object", @@ -613,7 +623,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false } }, "additionalProperties": { @@ -640,7 +651,8 @@ "required": [ "required", "optional" - ] + ], + "additionalProperties": false } }, "output_type": { @@ -667,7 +679,8 @@ }, "required": [ "required" - ] + ], + "additionalProperties": false }, "value": { "type": "object", @@ -704,7 +717,8 @@ }, "required": [ "type" - ] + ], + "additionalProperties": false }, "is_required": { "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", @@ -723,7 +737,8 @@ "output_type_id", "value", "is_required" - ] + ], + "additionalProperties": false }, "median": { "type": "object", @@ -745,7 +760,8 @@ }, "required": [ "required" - ] + ], + "additionalProperties": false }, "value": { "type": "object", @@ -782,7 +798,8 @@ }, "required": [ "type" - ] + ], + "additionalProperties": false }, "is_required": { "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", @@ -801,7 +818,8 @@ "output_type_id", "value", "is_required" - ] + ], + "additionalProperties": false }, "quantile": { "description": "Object defining the quantiles of the predictive distribution output type.", @@ -841,7 +859,8 @@ }, "required": [ "required" - ] + ], + "additionalProperties": false }, "value": { "type": "object", @@ -878,7 +897,8 @@ }, "required": [ "type" - ] + ], + "additionalProperties": false }, "is_required": { "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", @@ -897,7 +917,8 @@ "output_type_id", "value", "is_required" - ] + ], + "additionalProperties": false }, "cdf": { "description": "Object defining the cumulative distribution function of the predictive distribution output type.", @@ -949,7 +970,8 @@ }, "required": [ "required" - ] + ], + "additionalProperties": false }, "value": { "type": "object", @@ -975,7 +997,8 @@ "type", "minimum", "maximum" - ] + ], + "additionalProperties": false }, "is_required": { "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", @@ -994,7 +1017,8 @@ "output_type_id", "value", "is_required" - ] + ], + "additionalProperties": false }, "pmf": { "description": "Object defining a probability mass function for a discrete variable output type. Includes nominal, binary and ordinal variable types.", @@ -1025,7 +1049,8 @@ }, "required": [ "required" - ] + ], + "additionalProperties": false }, "value": { "type": "object", @@ -1055,7 +1080,8 @@ "type", "minimum", "maximum" - ] + ], + "additionalProperties": false }, "is_required": { "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", @@ -1074,7 +1100,8 @@ "output_type_id", "value", "is_required" - ] + ], + "additionalProperties": false }, "sample": { "description": "Object defining a sample output type.", @@ -1157,7 +1184,8 @@ "required": [ "max_length" ] - } + }, + "additionalProperties": false }, "value": { "type": "object", @@ -1193,7 +1221,8 @@ }, "required": [ "type" - ] + ], + "additionalProperties": false }, "is_required": { "description": "Is output type required? When required, property should be set to 'true'. If output type is optional, set to 'false'.", @@ -1212,7 +1241,8 @@ "output_type_id_params", "value", "is_required" - ] + ], + "additionalProperties": false } }, "additionalProperties": false @@ -1349,7 +1379,8 @@ "task_ids", "output_type", "target_metadata" - ] + ], + "additionalProperties": false } }, "submissions_due": { @@ -1386,7 +1417,8 @@ "relative_to", "start", "end" - ] + ], + "additionalProperties": false }, { "properties": { @@ -1404,7 +1436,8 @@ "required": [ "start", "end" - ] + ], + "additionalProperties": false } ], "required": [ From 1a4ee10bd9348e6b18afaecd3f01479b0705ae23 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 1 Nov 2024 14:58:40 +0200 Subject: [PATCH 18/19] Remove 0 minimum value requirement for cdf numeric output type IDs. Resolves #113 --- v4.0.0/tasks-schema.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v4.0.0/tasks-schema.json b/v4.0.0/tasks-schema.json index adbcf4d..e666237 100644 --- a/v4.0.0/tasks-schema.json +++ b/v4.0.0/tasks-schema.json @@ -958,8 +958,7 @@ "type": [ "number", "integer" - ], - "minimum": 0 + ] }, { "type": "string" From bc23e4aaa283b988acafb40faed85be28676c27a Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 1 Nov 2024 15:13:07 +0200 Subject: [PATCH 19/19] Update NEWS --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 1b014b0..843bf81 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,8 @@ * BREAKING CHANGE: To improve cross-platform interoperability, expectation of missing values in point estimate `output_type_id` `required` properties now encoded with `null` instead of `["NA"]` (#109). * Introduction of optional `derived_task_ids` properties to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs). The higher level `derived_task_ids` property sets the property globally at the hub level but can be overriden by the round level `derived_task_ids` property. The property allows for primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96). For more information see [`hubValidations` documentation on ignoring derived task IDs](https://hubverse-org.github.io/hubValidations/articles/validate-pr.html#ignoring-derived-task-ids-to-improve-performance). * Added more specific schema for `target_keys` to ensure only `string` properties are allowed (#97) +* Removed the requirement for a minimum value of zero in `cdf` numeric `output_type_id`s (#113). +* Ensured that additional properties are not allowed in lower level properties (e.g. individual task IDs, `output_type` objects etc). Custom additional properties are only allowed at the `round` level, while additional task ID objects that match the expected task ID schema are allowed in the `task_ids` object (#114). # v3.0.1