diff --git a/docs/blueprints/ecdc/uml/ecdc_domain_model.txt b/docs/blueprints/ecdc/uml/ecdc_domain_model.txt index 3f55bb54bcf5ae63d08b1d02f02860e252695c2d..6ed013f5ec4ab7e1b954b61fa7976d18dc531c71 100644 --- a/docs/blueprints/ecdc/uml/ecdc_domain_model.txt +++ b/docs/blueprints/ecdc/uml/ecdc_domain_model.txt @@ -1,6 +1,7 @@ @startuml package covid19.blueprints.all { + entity ApplicationDateReported { id: Integer date_reported: String @@ -75,9 +76,121 @@ package covid19.blueprints.all { create_config_for_rki_bundeslaender() create_config_for_rki_landkreise() } + + interface AllImportFull { + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + } + interface AllImportIncrement { + {classifier} download_file() + {classifier} import_file() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + interface DataImport { + datum_reported: Date + location: String + location_group: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + interface AllFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): AllFlat[] + {classifier} get_data_for_day(datum_reported: Date): AllFlat[] + } } package covid19.blueprints.ecdc { + + entity EcdcImport { + id: Integer + date_rep: String + date_rep_day: String + date_rep_month: String + date_rep_year: String + cases: String + deaths: String + pop_data_2019: String + countries_and_territories: String + geo_id: String + country_territory_code: String + continent_exp: String + cumulative_number_for_14_days_of_covid19_cases_per_100000: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + + entity EcdcFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + date_rep: String + date_rep_day: String + date_rep_month: String + date_rep_year: String + cases: String + deaths: String + pop_data_2019: String + countries_and_territories: String + geo_id: String + country_territory_code: String + continent_exp: String + cumulative_number_for_14_days_of_covid19_cases_per_100000: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): EcdcFlat[] + {classifier} get_data_for_day(datum_reported: Date): EcdcFlat[] + } + entity EcdcDateReported { id: Integer dateiname: String @@ -228,4 +341,10 @@ EcdcService "1" *--> "1" ApplicationServiceDownload: service_download ecdc_views_frontend "1" --> "1" EcdcService: ecdc_service ecdc_views_for_tasks "1" --> "1" EcdcService: ecdc_service ecdc_celery_tasks "1" --> "1" EcdcService: ecdc_service +AllImportFull <|-- DataImport +AllImportIncrement <|-- DataImport +DataImport <|-- AllFlat +DataImport <|-- EcdcImport +AllFlat <|-- EcdcFlat +EcdcImport <|-- EcdcFlat @enduml diff --git a/docs/blueprints/ecdc/uml/ecdc_domain_model_impl.txt b/docs/blueprints/ecdc/uml/ecdc_domain_model_impl.txt index 4e708b3e5a6951a383972a5f5431b509112df68e..78278088fd641833f6305253a267b724808edf82 100644 --- a/docs/blueprints/ecdc/uml/ecdc_domain_model_impl.txt +++ b/docs/blueprints/ecdc/uml/ecdc_domain_model_impl.txt @@ -1,208 +1,337 @@ @startuml -entity ApplicationDateReported { - id: Integer - date_reported: String - year_week: String - datum: Date - year: Integer - month: Integer - day_of_month: Integer - day_of_week: Integer - week_of_year: Integer - get_name_for_weekday() - {classifier} get_names_for_weekday() - {classifier} get_datum_parts(my_date_rep: String) - {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) - {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) - {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) - {classifier} create_new_object_factory(my_date_rep: String) + +package covid19.blueprints.all { + + entity ApplicationDateReported { + id: Integer + date_reported: String + year_week: String + datum: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_week: Integer + week_of_year: Integer + get_name_for_weekday() + {classifier} get_names_for_weekday() + {classifier} get_datum_parts(my_date_rep: String) + {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) + {classifier} create_new_object_factory(my_date_rep: String) + } + + entity ApplicationDateReported { + id: Integer + date_reported: String + year_week: String + datum: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_week: Integer + week_of_year: Integer + get_name_for_weekday() + {classifier} get_names_for_weekday() + {classifier} get_datum_parts(my_date_rep: String) + {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) + {classifier} create_new_object_factory(my_date_rep: String) + } + entity ApplicationRegion { + id: Integer + continent: String + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + } + class ApplicationServiceDownload << (S,red) Service >> { + -log_error() + -log_success() + -prepare_download() + -download_with_wget() + -download_with_subprocess_and_os_native_wget() + download_file() + } + class ApplicationServiceConfig << (T,#FF7700) Transient >> { + limit_nr: Integer + data_path: String + slug: String + category: String + sub_category: String + tablename: String + cvsfile_name: String + url_src: String + cvsfile_path: String + msg_job: String + msg_ok: String + msg_error: String + create_config_for_who() + create_config_for_rki_vaccination() + create_config_for_owid() + create_config_for_ecdc() + create_config_for_rki_bundeslaender() + create_config_for_rki_landkreise() + } + + interface AllImportFull { + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + } + interface AllImportIncrement { + {classifier} download_file() + {classifier} import_file() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + interface DataImport { + datum_reported: Date + location: String + location_group: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + interface AllFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): AllFlat[] + {classifier} get_data_for_day(datum_reported: Date): AllFlat[] + } + } -entity EcdcDateReported { - id: Integer - dateiname: String - parent_dir: String - title: String - path_relative: String - get_absolute_path() - get_relative_path() - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_all_as_dict() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) - {classifier} get_kurse_all() + + +package covid19.blueprints.ecdc { + + entity EcdcImport { + id: Integer + date_rep: String + date_rep_day: String + date_rep_month: String + date_rep_year: String + cases: String + deaths: String + pop_data_2019: String + countries_and_territories: String + geo_id: String + country_territory_code: String + continent_exp: String + cumulative_number_for_14_days_of_covid19_cases_per_100000: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + + entity EcdcFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + date_rep: String + date_rep_day: String + date_rep_month: String + date_rep_year: String + cases: String + deaths: String + pop_data_2019: String + countries_and_territories: String + geo_id: String + country_territory_code: String + continent_exp: String + cumulative_number_for_14_days_of_covid19_cases_per_100000: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): EcdcFlat[] + {classifier} get_data_for_day(datum_reported: Date): EcdcFlat[] + } + + + + entity EcdcDateReported { + id: Integer + dateiname: String + parent_dir: String + title: String + path_relative: String + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_kurse_all() + } + entity EcdcContinent { + id: Integer + dateiname: String + parent_dir: String + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_workflow_for_id(workflow_id: Integer) + } + entity EcdcCountry { + id: Integer + dateiname: String + parent_dir: String + title: String + lektion_nr: Integer + verified: Boolean + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_lektionen_for_workflow(workflow: Workflow) + {classifier} get_lektion_for_id(lektion_id: Integer) + {classifier} get_folien_for_lektion_id(lektion_id: Integer) + {classifier} get_all_verified() + } + entity EcdcData { + id: Integer + dateiname: String + parent_dir: String + title: String + lektion_nr: Integer + foliensatz_nr_in_lektion: Integer + get_absolute_path() + get_relative_path() + {classifier} get_foliensaetze_for_lektion(lektion: Lektion) + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + } + } -entity EcdcContinent { - id: Integer - dateiname: String - parent_dir: String - get_absolute_path() - get_relative_path() - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_all_as_dict() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) - {classifier} get_workflow_for_id(workflow_id: Integer) -} -entity EcdcCountry { - id: Integer - dateiname: String - parent_dir: String - title: String - lektion_nr: Integer - verified: Boolean - get_absolute_path() - get_relative_path() - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_all_as_dict() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) - {classifier} get_lektionen_for_workflow(workflow: Workflow) - {classifier} get_lektion_for_id(lektion_id: Integer) - {classifier} get_folien_for_lektion_id(lektion_id: Integer) - {classifier} get_all_verified() -} -entity EcdcData { - id: Integer - dateiname: String - parent_dir: String - title: String - lektion_nr: Integer - foliensatz_nr_in_lektion: Integer - get_absolute_path() - get_relative_path() - {classifier} get_foliensaetze_for_lektion(lektion: Lektion) - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_all_as_dict() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) -} -entity ApplicationDateReported { - id: Integer - date_reported: String - year_week: String - datum: Date - year: Integer - month: Integer - day_of_month: Integer - day_of_week: Integer - week_of_year: Integer - get_name_for_weekday() - {classifier} get_names_for_weekday() - {classifier} get_datum_parts(my_date_rep: String) - {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) - {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) - {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) - {classifier} create_new_object_factory(my_date_rep: String) -} -entity ApplicationRegion { - id: Integer - continent: String - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_all_as_dict() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) -} -class ApplicationServiceDownload << (S,red) Service >> { - -log_error() - -log_success() - -prepare_download() - -download_with_wget() - -download_with_subprocess_and_os_native_wget() - download_file() -} -class ApplicationServiceConfig << (T,#FF7700) Transient >> { - limit_nr: Integer - data_path: String - slug: String - category: String - sub_category: String - tablename: String - cvsfile_name: String - url_src: String - cvsfile_path: String - msg_job: String - msg_ok: String - msg_error: String - create_config_for_who() - create_config_for_rki_vaccination() - create_config_for_owid() - create_config_for_ecdc() - create_config_for_rki_bundeslaender() - create_config_for_rki_landkreise() -} -class EcdcService << (S,red) Service >> { - pretask_database_drop_create() - task_database_drop_create() - run_download_only() - run_import_only() - run_update_dimension_tables_only() - run_update_fact_table_incremental_only() - run_update_fact_table_initial_only() - run_update_star_schema_incremental() - run_update_star_schema_initial() - download_all_files() - task_import_all_files() - update_dimension_tables_only() - update_fact_table_initial_only() - update_fact_table_incremental_only() -} -class EcdcServiceImport << (S,red) Service >> { - import_file() -} -class EcdcServiceUpdate << (S,red) Service >> { - -update_date_reported() - -update_continent() - -update_country() - -get_continent_from_import(ecdc_import: EcdcImport): - -get_country_from_import(ecdc_import: EcdcImport): - -get_date_reported_from_import() - -update_data_initial() - update_dimension_tables_only() - update_fact_table_initial_only() - update_star_schema_incremental() - update_star_schema_initial() -} -class ecdc_views_frontend << (B,orchid) Boundary >> { - url_ecdc_info() - url_ecdc_tasks() - url_ecdc_data_imported() - url_ecdc_date_reported_all() - url_ecdc_date_reported_one_notification_rate() - url_ecdc_date_reported_one_deaths_weekly() - url_ecdc_date_reported_one_cases_weekly() - url_ecdc_continent_all() - url_ecdc_continent_one() - url_ecdc_country_all() - url_ecdc_country_one() - url_ecdc_country_germany() -} -class ecdc_views_for_tasks << (B,orchid) Boundary >> { - task_ecdc_download_only() - task_who_import_only() - task_who_update_dimension_tables_only() - task_who_update_fact_table_initial_only() - task_who_update_fact_table_incremental_only() - task_who_update_star_schema_initial() - task_who_update_star_schema_incremental() -} -class ecdc_celery_tasks << (B,orchid) Boundary >> { - task_ecdc_download_only() - task_ecdc_import_only() - task_ecdc_update_dimension_tables_only() - task_ecdc_update_fact_table_initial_only() - task_ecdc_update_fact_table_incremental_only() - task_ecdc_update_star_schema_initial() - task_ecdc_update_star_schema_incremental() + +package covid19.blueprints.ecdc { + + class EcdcService << (S,red) Service >> { + pretask_database_drop_create() + task_database_drop_create() + run_download_only() + run_import_only() + run_update_dimension_tables_only() + run_update_fact_table_incremental_only() + run_update_fact_table_initial_only() + run_update_star_schema_incremental() + run_update_star_schema_initial() + download_all_files() + task_import_all_files() + update_dimension_tables_only() + update_fact_table_initial_only() + update_fact_table_incremental_only() + } + class EcdcServiceImport << (S,red) Service >> { + import_file() + } + class EcdcServiceUpdate << (S,red) Service >> { + -update_date_reported() + -update_continent() + -update_country() + -get_continent_from_import(ecdc_import: EcdcImport): + -get_country_from_import(ecdc_import: EcdcImport): + -get_date_reported_from_import() + -update_data_initial() + update_dimension_tables_only() + update_fact_table_initial_only() + update_star_schema_incremental() + update_star_schema_initial() + } + class ecdc_views_frontend << (B,orchid) Boundary >> { + url_ecdc_info() + url_ecdc_tasks() + url_ecdc_data_imported() + url_ecdc_date_reported_all() + url_ecdc_date_reported_one_notification_rate() + url_ecdc_date_reported_one_deaths_weekly() + url_ecdc_date_reported_one_cases_weekly() + url_ecdc_continent_all() + url_ecdc_continent_one() + url_ecdc_country_all() + url_ecdc_country_one() + url_ecdc_country_germany() + } + class ecdc_views_for_tasks << (B,orchid) Boundary >> { + task_ecdc_download_only() + task_who_import_only() + task_who_update_dimension_tables_only() + task_who_update_fact_table_initial_only() + task_who_update_fact_table_incremental_only() + task_who_update_star_schema_initial() + task_who_update_star_schema_incremental() + } + class ecdc_celery_tasks << (B,orchid) Boundary >> { + task_ecdc_download_only() + task_ecdc_import_only() + task_ecdc_update_dimension_tables_only() + task_ecdc_update_fact_table_initial_only() + task_ecdc_update_fact_table_incremental_only() + task_ecdc_update_star_schema_initial() + task_ecdc_update_star_schema_incremental() + } } ApplicationServiceDownload : SQLAlchemy database EcdcServiceImport : SQLAlchemy database @@ -222,4 +351,10 @@ EcdcService "1" *--> "1" ApplicationServiceDownload: service_download ecdc_views_frontend "1" --> "1" EcdcService: ecdc_service ecdc_views_for_tasks "1" --> "1" EcdcService: ecdc_service ecdc_celery_tasks "1" --> "1" EcdcService: ecdc_service +AllImportFull <|-- DataImport +AllImportIncrement <|-- DataImport +DataImport <|-- AllFlat +DataImport <|-- EcdcImport +AllFlat <|-- EcdcFlat +EcdcImport <|-- EcdcFlat @enduml diff --git a/docs/blueprints/ecdc/uml/ecdc_domain_model_import.txt b/docs/blueprints/ecdc/uml/ecdc_domain_model_import.txt index 3515d05a0ba1e5996c16d0e1a3a758f9aff758e7..6fd12eaf07eb5c4c977ef57be10822d5aaf887a4 100644 --- a/docs/blueprints/ecdc/uml/ecdc_domain_model_import.txt +++ b/docs/blueprints/ecdc/uml/ecdc_domain_model_import.txt @@ -1,119 +1,126 @@ @startuml -interface AllImportFull { - {classifier} download_file() - {classifier} import_file() - {classifier} full_update_dimension_tables() - {classifier} full_update_fact_table() - {classifier} full_update_star_schema() -} +package covid19.blueprints.all { -interface AllImportIncrement { - {classifier} download_file() - {classifier} import_file() - {classifier} update_dimension_tables() - {classifier} update_fact_table() - {classifier} update_star_schema() -} + interface AllImportFull { + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + } -interface DataImport { - datum_reported: Date - location: String - location_group: String - {classifier} download_file() - {classifier} import_file() - {classifier} full_update_dimension_tables() - {classifier} full_update_fact_table() - {classifier} full_update_star_schema() - {classifier} update_dimension_tables() - {classifier} update_fact_table() - {classifier} update_star_schema() -} + interface AllImportIncrement { + {classifier} download_file() + {classifier} import_file() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } -entity EcdcImport { - id: Integer - date_rep: String - date_rep_day: String - date_rep_month: String - date_rep_year: String - cases: String - deaths: String - pop_data_2019: String - countries_and_territories: String - geo_id: String - country_territory_code: String - continent_exp: String - cumulative_number_for_14_days_of_covid19_cases_per_100000: String - {classifier} download_file() - {classifier} import_file() - {classifier} full_update_dimension_tables() - {classifier} full_update_fact_table() - {classifier} full_update_star_schema() - {classifier} update_dimension_tables() - {classifier} update_fact_table() - {classifier} update_star_schema() -} + interface DataImport { + datum_reported: Date + location: String + location_group: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } -interface AllFlat { - id: Integer - datum_reported: Date - year: Integer - month: Integer - day_of_month: Integer - day_of_year: Integer - day_of_week: Integer - week_of_year: Integer - year_week: String - day_of_week_str: String - month_str: String - location: String - location_group: String - {classifier} import_file_flat() - {classifier} get_years(): Integer[] - {classifier} get_days(): Date[] - {classifier} get_days_for_year(year: Integer): Date[] - {classifier} get_location_groups(): String[] - {classifier} get_locations_for_location_group(location_group: String): String[] - {classifier} get_data_for_location(location: String): AllFlat[] - {classifier} get_data_for_day(datum_reported: Date): AllFlat[] -} + interface AllFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): AllFlat[] + {classifier} get_data_for_day(datum_reported: Date): AllFlat[] + } -entity EcdcFlat { - id: Integer - datum_reported: Date - year: Integer - month: Integer - day_of_month: Integer - day_of_year: Integer - day_of_week: Integer - week_of_year: Integer - year_week: String - day_of_week_str: String - month_str: String - location: String - location_group: String - date_rep: String - date_rep_day: String - date_rep_month: String - date_rep_year: String - cases: String - deaths: String - pop_data_2019: String - countries_and_territories: String - geo_id: String - country_territory_code: String - continent_exp: String - cumulative_number_for_14_days_of_covid19_cases_per_100000: String - {classifier} import_file_flat() - {classifier} get_years(): Integer[] - {classifier} get_days(): Date[] - {classifier} get_days_for_year(year: Integer): Date[] - {classifier} get_location_groups(): String[] - {classifier} get_locations_for_location_group(location_group: String): String[] - {classifier} get_data_for_location(location: String): EcdcFlat[] - {classifier} get_data_for_day(datum_reported: Date): EcdcFlat[] } +package covid19.blueprints.ecdc { + + entity EcdcImport { + id: Integer + date_rep: String + date_rep_day: String + date_rep_month: String + date_rep_year: String + cases: String + deaths: String + pop_data_2019: String + countries_and_territories: String + geo_id: String + country_territory_code: String + continent_exp: String + cumulative_number_for_14_days_of_covid19_cases_per_100000: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + + entity EcdcFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + date_rep: String + date_rep_day: String + date_rep_month: String + date_rep_year: String + cases: String + deaths: String + pop_data_2019: String + countries_and_territories: String + geo_id: String + country_territory_code: String + continent_exp: String + cumulative_number_for_14_days_of_covid19_cases_per_100000: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): EcdcFlat[] + {classifier} get_data_for_day(datum_reported: Date): EcdcFlat[] + } + +} AllImportFull <|-- DataImport AllImportIncrement <|-- DataImport DataImport <|-- AllFlat diff --git a/docs/blueprints/ecdc/uml/img/ecdc_domain_model.png b/docs/blueprints/ecdc/uml/img/ecdc_domain_model.png index 68987908c387bbad8e74e3bc0453e1aeb185cd3d..339c8b1d040d5492cf53a061a8b747a7ed45ad71 100644 Binary files a/docs/blueprints/ecdc/uml/img/ecdc_domain_model.png and b/docs/blueprints/ecdc/uml/img/ecdc_domain_model.png differ diff --git a/docs/blueprints/ecdc/uml/img/ecdc_domain_model_impl.png b/docs/blueprints/ecdc/uml/img/ecdc_domain_model_impl.png index 68987908c387bbad8e74e3bc0453e1aeb185cd3d..886115e26868feb4acec3b77e2fc7ca5ddb62481 100644 Binary files a/docs/blueprints/ecdc/uml/img/ecdc_domain_model_impl.png and b/docs/blueprints/ecdc/uml/img/ecdc_domain_model_impl.png differ diff --git a/docs/blueprints/ecdc/uml/img/ecdc_domain_model_import.png b/docs/blueprints/ecdc/uml/img/ecdc_domain_model_import.png index aa6d74ddfc31814bd5b5a16e2568473944ae12c0..260b0a4819284e42bedcb0fadb8c94b50dd49409 100644 Binary files a/docs/blueprints/ecdc/uml/img/ecdc_domain_model_import.png and b/docs/blueprints/ecdc/uml/img/ecdc_domain_model_import.png differ diff --git a/docs/blueprints/owid/uml/owid_domain_model.txt b/docs/blueprints/owid/uml/owid_domain_model.txt index dc66ff0e1aa967908cc26697f6c7a5aae3b0081a..17b211658059059d5635212f6a4c4eb5839cc5d3 100644 --- a/docs/blueprints/owid/uml/owid_domain_model.txt +++ b/docs/blueprints/owid/uml/owid_domain_model.txt @@ -1,6 +1,7 @@ @startuml package covid19.blueprints.all { + entity ApplicationDateReported { id: Integer date_reported: String @@ -57,6 +58,60 @@ package covid19.blueprints.all { create_config_for_rki_bundeslaender() create_config_for_rki_landkreise() } + + interface AllImportFull { + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + } + + interface AllImportIncrement { + {classifier} download_file() + {classifier} import_file() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + + interface DataImport { + datum_reported: Date + location: String + location_group: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + + interface AllFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): AllFlat[] + {classifier} get_data_for_day(datum_reported: Date): AllFlat[] + } } package covid19.blueprints.owid { @@ -133,6 +188,89 @@ package covid19.blueprints.owid { {classifier} get_continents(page: Integer) {classifier} get_all_continents() } + + entity OwidFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + iso_code: String + continent: String + location: String + date: String + total_cases: String + new_cases: String + new_cases_smoothed: String + total_deaths: String + new_deaths: String + new_deaths_smoothed: String + total_cases_per_million: String + new_cases_per_million: String + new_cases_smoothed_per_million: String + total_deaths_per_million: String + new_deaths_per_million: String + new_deaths_smoothed_per_million: String + reproduction_rate: String + icu_patients: String + icu_patients_per_million: String + hosp_patients: String + hosp_patients_per_million: String + weekly_icu_admissions: String + weekly_icu_admissions_per_million: String + weekly_hosp_admissions: String + weekly_hosp_admissions_per_million: String + new_tests: String + total_tests: String + total_tests_per_thousand: String + new_tests_per_thousand: String + new_tests_smoothed: String + new_tests_smoothed_per_thousand: String + positive_rate: String + tests_per_case: String + tests_units: String + total_vaccinations: String + people_vaccinated: String + people_fully_vaccinated: String + new_vaccinations: String + new_vaccinations_smoothed: String + total_vaccinations_per_hundred: String + people_vaccinated_per_hundred: String + people_fully_vaccinated_per_hundred: String + new_vaccinations_smoothed_per_million: String + stringency_index: String + population: String + population_density: String + median_age: String + aged_65_older: String + aged_70_older: String + gdp_per_capita: String + extreme_poverty: String + cardiovasc_death_rate: String + diabetes_prevalence: String + female_smokers: String + male_smokers: String + handwashing_facilities: String + hospital_beds_per_thousand: String + life_expectancy: String + human_development_index: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): OwidFlat[] + {classifier} get_data_for_day(datum_reported: Date): OwidFlat[] + } entity OwidDateReported { id: Integer date_reported: String @@ -334,4 +472,10 @@ OwidService "1" *--> "1" ApplicationServiceDownload : service_download owid_views_frontend "1" --> "1" OwidService : owid_service owid_views_for_tasks "1" --> "1" OwidService : owid_service owid_celery_tasks "1" --> "1" OwidService : owid_service +AllImportFull <|-- DataImport +AllImportIncrement <|-- DataImport +DataImport <|-- AllFlat +DataImport <|-- OwidImport +AllFlat <|-- OwidFlat +OwidImport <|-- OwidFlat @enduml diff --git a/docs/blueprints/owid/uml/owid_domain_model_import.txt b/docs/blueprints/owid/uml/owid_domain_model_import.txt index 518c4687480af6e36c50233366c6cb3bf5392e3b..3348b6632f5c950a2186004478521931536ffe27 100644 --- a/docs/blueprints/owid/uml/owid_domain_model_import.txt +++ b/docs/blueprints/owid/uml/owid_domain_model_import.txt @@ -1,213 +1,220 @@ @startuml -interface AllImportFull { - {classifier} download_file() - {classifier} import_file() - {classifier} full_update_dimension_tables() - {classifier} full_update_fact_table() - {classifier} full_update_star_schema() -} +package covid19.blueprints.all { -interface AllImportIncrement { - {classifier} download_file() - {classifier} import_file() - {classifier} update_dimension_tables() - {classifier} update_fact_table() - {classifier} update_star_schema() -} + interface AllImportFull { + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + } -interface DataImport { - datum_reported: Date - location: String - location_group: String - {classifier} download_file() - {classifier} import_file() - {classifier} full_update_dimension_tables() - {classifier} full_update_fact_table() - {classifier} full_update_star_schema() - {classifier} update_dimension_tables() - {classifier} update_fact_table() - {classifier} update_star_schema() -} + interface AllImportIncrement { + {classifier} download_file() + {classifier} import_file() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } -entity OwidImport { - id: Integer - iso_code: String - continent: String - location: String - date: String - total_cases: String - new_cases: String - new_cases_smoothed: String - total_deaths: String - new_deaths: String - new_deaths_smoothed: String - total_cases_per_million: String - new_cases_per_million: String - new_cases_smoothed_per_million: String - total_deaths_per_million: String - new_deaths_per_million: String - new_deaths_smoothed_per_million: String - reproduction_rate: String - icu_patients: String - icu_patients_per_million: String - hosp_patients: String - hosp_patients_per_million: String - weekly_icu_admissions: String - weekly_icu_admissions_per_million: String - weekly_hosp_admissions: String - weekly_hosp_admissions_per_million: String - new_tests: String - total_tests: String - total_tests_per_thousand: String - new_tests_per_thousand: String - new_tests_smoothed: String - new_tests_smoothed_per_thousand: String - positive_rate: String - tests_per_case: String - tests_units: String - total_vaccinations: String - people_vaccinated: String - people_fully_vaccinated: String - new_vaccinations: String - new_vaccinations_smoothed: String - total_vaccinations_per_hundred: String - people_vaccinated_per_hundred: String - people_fully_vaccinated_per_hundred: String - new_vaccinations_smoothed_per_million: String - stringency_index: String - population: String - population_density: String - median_age: String - aged_65_older: String - aged_70_older: String - gdp_per_capita: String - extreme_poverty: String - cardiovasc_death_rate: String - diabetes_prevalence: String - female_smokers: String - male_smokers: String - handwashing_facilities: String - hospital_beds_per_thousand: String - life_expectancy: String - human_development_index: String - {classifier} download_file() - {classifier} import_file() - {classifier} full_update_dimension_tables() - {classifier} full_update_fact_table() - {classifier} full_update_star_schema() - {classifier} update_dimension_tables() - {classifier} update_fact_table() - {classifier} update_star_schema() -} + interface DataImport { + datum_reported: Date + location: String + location_group: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } -interface AllFlat { - id: Integer - datum_reported: Date - year: Integer - month: Integer - day_of_month: Integer - day_of_year: Integer - day_of_week: Integer - week_of_year: Integer - year_week: String - day_of_week_str: String - month_str: String - location: String - location_group: String - {classifier} import_file_flat() - {classifier} get_years(): Integer[] - {classifier} get_days(): Date[] - {classifier} get_days_for_year(year: Integer): Date[] - {classifier} get_location_groups(): String[] - {classifier} get_locations_for_location_group(location_group: String): String[] - {classifier} get_data_for_location(location: String): AllFlat[] - {classifier} get_data_for_day(datum_reported: Date): AllFlat[] -} + interface AllFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): AllFlat[] + {classifier} get_data_for_day(datum_reported: Date): AllFlat[] + } -entity OwidFlat { - id: Integer - datum_reported: Date - year: Integer - month: Integer - day_of_month: Integer - day_of_year: Integer - day_of_week: Integer - week_of_year: Integer - year_week: String - day_of_week_str: String - month_str: String - location: String - location_group: String - iso_code: String - continent: String - location: String - date: String - total_cases: String - new_cases: String - new_cases_smoothed: String - total_deaths: String - new_deaths: String - new_deaths_smoothed: String - total_cases_per_million: String - new_cases_per_million: String - new_cases_smoothed_per_million: String - total_deaths_per_million: String - new_deaths_per_million: String - new_deaths_smoothed_per_million: String - reproduction_rate: String - icu_patients: String - icu_patients_per_million: String - hosp_patients: String - hosp_patients_per_million: String - weekly_icu_admissions: String - weekly_icu_admissions_per_million: String - weekly_hosp_admissions: String - weekly_hosp_admissions_per_million: String - new_tests: String - total_tests: String - total_tests_per_thousand: String - new_tests_per_thousand: String - new_tests_smoothed: String - new_tests_smoothed_per_thousand: String - positive_rate: String - tests_per_case: String - tests_units: String - total_vaccinations: String - people_vaccinated: String - people_fully_vaccinated: String - new_vaccinations: String - new_vaccinations_smoothed: String - total_vaccinations_per_hundred: String - people_vaccinated_per_hundred: String - people_fully_vaccinated_per_hundred: String - new_vaccinations_smoothed_per_million: String - stringency_index: String - population: String - population_density: String - median_age: String - aged_65_older: String - aged_70_older: String - gdp_per_capita: String - extreme_poverty: String - cardiovasc_death_rate: String - diabetes_prevalence: String - female_smokers: String - male_smokers: String - handwashing_facilities: String - hospital_beds_per_thousand: String - life_expectancy: String - human_development_index: String - {classifier} import_file_flat() - {classifier} get_years(): Integer[] - {classifier} get_days(): Date[] - {classifier} get_days_for_year(year: Integer): Date[] - {classifier} get_location_groups(): String[] - {classifier} get_locations_for_location_group(location_group: String): String[] - {classifier} get_data_for_location(location: String): OwidFlat[] - {classifier} get_data_for_day(datum_reported: Date): OwidFlat[] } +package covid19.blueprints.owid { + + entity OwidImport { + id: Integer + iso_code: String + continent: String + location: String + date: String + total_cases: String + new_cases: String + new_cases_smoothed: String + total_deaths: String + new_deaths: String + new_deaths_smoothed: String + total_cases_per_million: String + new_cases_per_million: String + new_cases_smoothed_per_million: String + total_deaths_per_million: String + new_deaths_per_million: String + new_deaths_smoothed_per_million: String + reproduction_rate: String + icu_patients: String + icu_patients_per_million: String + hosp_patients: String + hosp_patients_per_million: String + weekly_icu_admissions: String + weekly_icu_admissions_per_million: String + weekly_hosp_admissions: String + weekly_hosp_admissions_per_million: String + new_tests: String + total_tests: String + total_tests_per_thousand: String + new_tests_per_thousand: String + new_tests_smoothed: String + new_tests_smoothed_per_thousand: String + positive_rate: String + tests_per_case: String + tests_units: String + total_vaccinations: String + people_vaccinated: String + people_fully_vaccinated: String + new_vaccinations: String + new_vaccinations_smoothed: String + total_vaccinations_per_hundred: String + people_vaccinated_per_hundred: String + people_fully_vaccinated_per_hundred: String + new_vaccinations_smoothed_per_million: String + stringency_index: String + population: String + population_density: String + median_age: String + aged_65_older: String + aged_70_older: String + gdp_per_capita: String + extreme_poverty: String + cardiovasc_death_rate: String + diabetes_prevalence: String + female_smokers: String + male_smokers: String + handwashing_facilities: String + hospital_beds_per_thousand: String + life_expectancy: String + human_development_index: String + {classifier} download_file() + {classifier} import_file() + {classifier} full_update_dimension_tables() + {classifier} full_update_fact_table() + {classifier} full_update_star_schema() + {classifier} update_dimension_tables() + {classifier} update_fact_table() + {classifier} update_star_schema() + } + + entity OwidFlat { + id: Integer + datum_reported: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_year: Integer + day_of_week: Integer + week_of_year: Integer + year_week: String + day_of_week_str: String + month_str: String + location: String + location_group: String + iso_code: String + continent: String + location: String + date: String + total_cases: String + new_cases: String + new_cases_smoothed: String + total_deaths: String + new_deaths: String + new_deaths_smoothed: String + total_cases_per_million: String + new_cases_per_million: String + new_cases_smoothed_per_million: String + total_deaths_per_million: String + new_deaths_per_million: String + new_deaths_smoothed_per_million: String + reproduction_rate: String + icu_patients: String + icu_patients_per_million: String + hosp_patients: String + hosp_patients_per_million: String + weekly_icu_admissions: String + weekly_icu_admissions_per_million: String + weekly_hosp_admissions: String + weekly_hosp_admissions_per_million: String + new_tests: String + total_tests: String + total_tests_per_thousand: String + new_tests_per_thousand: String + new_tests_smoothed: String + new_tests_smoothed_per_thousand: String + positive_rate: String + tests_per_case: String + tests_units: String + total_vaccinations: String + people_vaccinated: String + people_fully_vaccinated: String + new_vaccinations: String + new_vaccinations_smoothed: String + total_vaccinations_per_hundred: String + people_vaccinated_per_hundred: String + people_fully_vaccinated_per_hundred: String + new_vaccinations_smoothed_per_million: String + stringency_index: String + population: String + population_density: String + median_age: String + aged_65_older: String + aged_70_older: String + gdp_per_capita: String + extreme_poverty: String + cardiovasc_death_rate: String + diabetes_prevalence: String + female_smokers: String + male_smokers: String + handwashing_facilities: String + hospital_beds_per_thousand: String + life_expectancy: String + human_development_index: String + {classifier} import_file_flat() + {classifier} get_years(): Integer[] + {classifier} get_days(): Date[] + {classifier} get_days_for_year(year: Integer): Date[] + {classifier} get_location_groups(): String[] + {classifier} get_locations_for_location_group(location_group: String): String[] + {classifier} get_data_for_location(location: String): OwidFlat[] + {classifier} get_data_for_day(datum_reported: Date): OwidFlat[] + } + +} AllImportFull <|-- DataImport AllImportIncrement <|-- DataImport DataImport <|-- AllFlat