diff --git a/docs/blueprints/ecdc/uml/ecdc_domain_model.txt b/docs/blueprints/ecdc/uml/ecdc_domain_model.txt index 4e708b3e5a6951a383972a5f5431b509112df68e..3f55bb54bcf5ae63d08b1d02f02860e252695c2d 100644 --- a/docs/blueprints/ecdc/uml/ecdc_domain_model.txt +++ b/docs/blueprints/ecdc/uml/ecdc_domain_model.txt @@ -1,208 +1,214 @@ @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() + } } -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 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 { + 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) + } + 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 diff --git a/docs/blueprints/owid/uml/img/owid_domain_model.png b/docs/blueprints/owid/uml/img/owid_domain_model.png index 3448f7515022efb23bbb5c821210c1e405eef1b9..8c1527f7cd7c9d8057a81b0180db26572aaff460 100644 Binary files a/docs/blueprints/owid/uml/img/owid_domain_model.png and b/docs/blueprints/owid/uml/img/owid_domain_model.png differ diff --git a/docs/blueprints/owid/uml/owid_domain_model.txt b/docs/blueprints/owid/uml/owid_domain_model.txt index 8836cb52b77331ab2d07d78a6e10aeafbd2dfde0..dc66ff0e1aa967908cc26697f6c7a5aae3b0081a 100644 --- a/docs/blueprints/owid/uml/owid_domain_model.txt +++ b/docs/blueprints/owid/uml/owid_domain_model.txt @@ -1,307 +1,314 @@ @startuml -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} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) - {classifier} get_dates() - {classifier} get_for_one_day(day: String) - {classifier} get_dates_reported_as_array() - {classifier} get_new_dates_reported_as_array() - {classifier} get_continents(page: Integer) - {classifier} get_all_continents() + +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 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() + } } -entity OwidDateReported { - 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 - {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 OwidContinent { - 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) -} -entity OwidCountry { - id: Integer - iso_code: String - location: 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} 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 OwidData { - id: Integer - 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 - {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 OwidServiceImport << (S,red) Service >> { - import_file() -} -class OwidServiceUpdateBase << (S,red) Service >> { -} -class OwidServiceUpdateFull << (S,red) Service >> { - -full_update_date_reported() - -full_update_continent() - -full_update_country() - -full_update_fact_table() - -full_update_dimension_tables() - full_update_dimension_tables() - full_update_fact_table() - full_update_star_schema() -} -class OwidServiceUpdate << (S,red) Service >> { - -update_date_reported() - -full_update_continent() - -full_update_country() - -update_fact_table() - -update_dimension_tables() - update_dimension_tables() - update_fact_table() - update_star_schema() - -get_new_dates_reported_from_import() -} -class OwidService << (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() -} -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 owid_views_frontend << (B,orchid) Boundary >> { - url_owid_info() - url_owid_tasks() - url_owid_test() - url_owid_imported() - url_owid_date_reported_all() - url_owid_date_reported() - url_owid_date_reported_cases_new() - url_owid_date_reported_cases_cumulative() - url_owid_date_reported_deaths_new() - url_owid_date_reported_deaths_cumulative() -} -class owid_views_for_tasks << (B,orchid) Boundary >> { - url_task_owid_download_only() - url_task_owid_import_only() - url_task_owid_update_dimension_tables_only() - url_task_owid_update_fact_table_incremental_only() - url_task_owid_update_fact_table_initial_only() - url_task_owid_update_star_schema_initial() - url_task_owid_update_star_schema_incremental() -} -class owid_celery_tasks << (B,orchid) Boundary >> { - task_owid_download_only() - task_owid_import_only() - task_owid_update_dimension_tables_only() - task_owid_update_fact_table_incremental_only() - task_owid_update_fact_table_initial_only() - task_owid_update_star_schema_incremental() - task_owid_update_star_schema_initial() + +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} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_dates() + {classifier} get_for_one_day(day: String) + {classifier} get_dates_reported_as_array() + {classifier} get_new_dates_reported_as_array() + {classifier} get_continents(page: Integer) + {classifier} get_all_continents() + } + entity OwidDateReported { + 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 + {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 OwidContinent { + 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) + } + entity OwidCountry { + id: Integer + iso_code: String + location: 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} 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 OwidData { + id: Integer + 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 + {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 OwidServiceImport << (S,red) Service >> { + import_file() + } + class OwidServiceUpdateBase << (S,red) Service >> { + } + class OwidServiceUpdateFull << (S,red) Service >> { + -full_update_date_reported() + -full_update_continent() + -full_update_country() + -full_update_fact_table() + -full_update_dimension_tables() + full_update_dimension_tables() + full_update_fact_table() + full_update_star_schema() + } + class OwidServiceUpdate << (S,red) Service >> { + -update_date_reported() + -full_update_continent() + -full_update_country() + -update_fact_table() + -update_dimension_tables() + update_dimension_tables() + update_fact_table() + update_star_schema() + -get_new_dates_reported_from_import() + } + class OwidService << (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 owid_views_frontend << (B,orchid) Boundary >> { + url_owid_info() + url_owid_tasks() + url_owid_test() + url_owid_imported() + url_owid_date_reported_all() + url_owid_date_reported() + url_owid_date_reported_cases_new() + url_owid_date_reported_cases_cumulative() + url_owid_date_reported_deaths_new() + url_owid_date_reported_deaths_cumulative() + } + class owid_views_for_tasks << (B,orchid) Boundary >> { + url_task_owid_download_only() + url_task_owid_import_only() + url_task_owid_update_dimension_tables_only() + url_task_owid_update_fact_table_incremental_only() + url_task_owid_update_fact_table_initial_only() + url_task_owid_update_star_schema_initial() + url_task_owid_update_star_schema_incremental() + } + class owid_celery_tasks << (B,orchid) Boundary >> { + task_owid_download_only() + task_owid_import_only() + task_owid_update_dimension_tables_only() + task_owid_update_fact_table_incremental_only() + task_owid_update_fact_table_initial_only() + task_owid_update_star_schema_incremental() + task_owid_update_star_schema_initial() + } + } OwidServiceImport : SQLAlchemy database OwidServiceUpdateBase : SQLAlchemy database diff --git a/docs/blueprints/rki_cases/uml/rki_cases_domain_model.txt b/docs/blueprints/rki_cases/uml/rki_cases_domain_model.txt index 8836cb52b77331ab2d07d78a6e10aeafbd2dfde0..789178e0cee45bfa7dde40154bdf2cd96368f566 100644 --- a/docs/blueprints/rki_cases/uml/rki_cases_domain_model.txt +++ b/docs/blueprints/rki_cases/uml/rki_cases_domain_model.txt @@ -1,5 +1,5 @@ @startuml -entity OwidImport { +Entity OwidImport { id: Integer iso_code: String continent: String diff --git a/docs/blueprints/rki_vaccination/uml/img/rki_vaccination_domain_model.png b/docs/blueprints/rki_vaccination/uml/img/rki_vaccination_domain_model.png index f2a17c54b976e0ca606c655b8a454b5fc22b49f5..0ec4481cfbb4295148bf1d244b6cc946fde45bd2 100644 Binary files a/docs/blueprints/rki_vaccination/uml/img/rki_vaccination_domain_model.png and b/docs/blueprints/rki_vaccination/uml/img/rki_vaccination_domain_model.png differ diff --git a/docs/blueprints/rki_vaccination/uml/rki_vaccination_domain_model.txt b/docs/blueprints/rki_vaccination/uml/rki_vaccination_domain_model.txt index dcb345d1067c2f11dedc7e145995dbd896ecaa9b..476ae2859cb8f5220531fb6b54813629fcb47782 100644 --- a/docs/blueprints/rki_vaccination/uml/rki_vaccination_domain_model.txt +++ b/docs/blueprints/rki_vaccination/uml/rki_vaccination_domain_model.txt @@ -1,189 +1,238 @@ @startuml -entity RkiVaccinationDateReported { - 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 RkiVaccinationData { - id: Integer - dosen_kumulativ: Integer - dosen_differenz_zum_vortag: Integer - dosen_biontech_kumulativ: Integer - dosen_moderna_kumulativ: Integer - personen_erst_kumulativ: Integer - personen_voll_kumulativ: Integer - impf_quote_erst: Float - impf_quote_voll: Float - indikation_alter_dosen: Integer - indikation_beruf_dosen: Integer - indikation_medizinisch_dosen: Integer - indikation_pflegeheim_dosen: Integer - indikation_alter_erst: Integer - indikation_beruf_erst: Integer - indikation_medizinisch_erst: Integer - indikation_pflegeheim_erst: Integer - indikation_alter_voll: Integer - indikation_beruf_voll: Integer - indikation_medizinisch_voll: Integer - indikation_pflegeheim_voll: Integer - 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 RkiVaccinationImport { - datum: String - dosen_kumulativ: Integer - dosen_differenz_zum_vortag: Integer - dosen_biontech_kumulativ: Integer - dosen_moderna_kumulativ: Integer - personen_erst_kumulativ: Integer - personen_voll_kumulativ: Integer - impf_quote_erst: Float - impf_quote_voll: Float - indikation_alter_dosen: Integer - indikation_beruf_dosen: Integer - indikation_medizinisch_dosen: Integer - indikation_pflegeheim_dosen: Integer - indikation_alter_erst: Integer - indikation_beruf_erst: Integer - indikation_medizinisch_erst: Integer - indikation_pflegeheim_erst: Integer - indikation_alter_voll: Integer - indikation_beruf_voll: Integer - indikation_medizinisch_voll: Integer - indikation_pflegeheim_voll: Integer +package covid19.blueprints.all { - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_by_id(other_id: Integer) - {classifier} find_by_id(other_id: Integer) - {classifier} find_by_datum(other_datum: String) - {classifier} get_date_rep() - {classifier} get_date_reported_as_array() - {classifier} get_daterep_missing_in_vaccination_data() -} -entity ApplicationDateReported { - id: Integer - date_reported: String - year_week: String - datum: Date - year: Integer - month: Integer - day_of_year: 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) -} -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 RkiVaccinationService << (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() + entity ApplicationDateReported { + id: Integer + date_reported: String + year_week: String + datum: Date + year: Integer + month: Integer + day_of_year: 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) + } + 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 RkiVaccinationServiceImport << (S,red) Service >> { - import_file() -} -class RkiVaccinationServiceUpdate << (S,red) Service >> { - -update_date_reported() - -update_region() - -update_country() - -update_data_incremental() - -update_data_initial() - -update_dimension_tables() - update_dimension_tables_only() - update_fact_table_incremental_only() - update_fact_table_initial_only() - update_star_schema_incremental() - update_star_schema_initial() -} -class rki_vaccination_views_frontend << (B,orchid) Boundary >> { - url_vaccination_info() - url_vaccination_tasks() - url_vaccination_imported() - url_vaccination_data() -} -class rki_vaccination_views_for_tasks << (B,orchid) Boundary >> { - task_who_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 rki_vaccination_celery_tasks << (B,orchid) Boundary >> { - url_vaccination_task_download_only() - url_vaccination_task_import_only() - url_vaccination_task_update_dimensiontables_only() - url_vaccination_task_update_facttable_incremental_only() - url_vaccination_task_update_facttable_initial_only() - url_vaccination_task_update_starschema_initial() - url_vaccination_task_update_starschema_incremental() +package covid19.blueprints.rki_vVaccination { + entity RkiVaccinationDateReported { + 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 RkiVaccinationData { + id: Integer + dosen_kumulativ: Integer + dosen_differenz_zum_vortag: Integer + dosen_biontech_kumulativ: Integer + dosen_moderna_kumulativ: Integer + personen_erst_kumulativ: Integer + personen_voll_kumulativ: Integer + impf_quote_erst: Float + impf_quote_voll: Float + indikation_alter_dosen: Integer + indikation_beruf_dosen: Integer + indikation_medizinisch_dosen: Integer + indikation_pflegeheim_dosen: Integer + indikation_alter_erst: Integer + indikation_beruf_erst: Integer + indikation_medizinisch_erst: Integer + indikation_pflegeheim_erst: Integer + indikation_alter_voll: Integer + indikation_beruf_voll: Integer + indikation_medizinisch_voll: Integer + indikation_pflegeheim_voll: Integer + 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 RkiVaccinationImport { + datum: String + dosen_kumulativ: Integer + dosen_differenz_zum_vortag: Integer + dosen_biontech_kumulativ: Integer + dosen_moderna_kumulativ: Integer + personen_erst_kumulativ: Integer + personen_voll_kumulativ: Integer + impf_quote_erst: Float + impf_quote_voll: Float + indikation_alter_dosen: Integer + indikation_beruf_dosen: Integer + indikation_medizinisch_dosen: Integer + indikation_pflegeheim_dosen: Integer + indikation_alter_erst: Integer + indikation_beruf_erst: Integer + indikation_medizinisch_erst: Integer + indikation_pflegeheim_erst: Integer + indikation_alter_voll: Integer + indikation_beruf_voll: Integer + indikation_medizinisch_voll: Integer + indikation_pflegeheim_voll: Integer + + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} find_by_datum(other_datum: String) + {classifier} get_date_rep() + {classifier} get_date_reported_as_array() + {classifier} get_daterep_missing_in_vaccination_data() + } + entity RkiVaccinationFlat { + 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 + dosen_kumulativ: Integer + dosen_differenz_zum_vortag: Integer + dosen_biontech_kumulativ: Integer + dosen_moderna_kumulativ: Integer + personen_erst_kumulativ: Integer + personen_voll_kumulativ: Integer + impf_quote_erst: Float + impf_quote_voll: Float + indikation_alter_dosen: Integer + indikation_beruf_dosen: Integer + indikation_medizinisch_dosen: Integer + indikation_pflegeheim_dosen: Integer + indikation_alter_erst: Integer + indikation_beruf_erst: Integer + indikation_medizinisch_erst: Integer + indikation_pflegeheim_erst: Integer + indikation_alter_voll: Integer + indikation_beruf_voll: Integer + indikation_medizinisch_voll: Integer + indikation_pflegeheim_voll: Integer + date_reported: 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): RkiVaccinationFlat[] + {classifier} get_data_for_day(datum_reported: Date): RkiVaccinationFlat[] + } + class RkiVaccinationService << (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 RkiVaccinationServiceImport << (S,red) Service >> { + import_file() + } + class RkiVaccinationServiceUpdate << (S,red) Service >> { + -update_date_reported() + -update_region() + -update_country() + -update_data_incremental() + -update_data_initial() + -update_dimension_tables() + update_dimension_tables_only() + update_fact_table_incremental_only() + update_fact_table_initial_only() + update_star_schema_incremental() + update_star_schema_initial() + } + class rki_vaccination_views_frontend << (B,orchid) Boundary >> { + url_vaccination_info() + url_vaccination_tasks() + url_vaccination_imported() + url_vaccination_data() + } + class rki_vaccination_views_for_tasks << (B,orchid) Boundary >> { + task_who_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 rki_vaccination_celery_tasks << (B,orchid) Boundary >> { + url_vaccination_task_download_only() + url_vaccination_task_import_only() + url_vaccination_task_update_dimensiontables_only() + url_vaccination_task_update_facttable_incremental_only() + url_vaccination_task_update_facttable_initial_only() + url_vaccination_task_update_starschema_initial() + url_vaccination_task_update_starschema_incremental() + } } RkiVaccinationServiceImport : SQLAlchemy database RkiVaccinationServiceUpdate : SQLAlchemy database diff --git a/docs/blueprints/who/uml/who_domain_model.txt b/docs/blueprints/who/uml/who_domain_model.txt index 059e1058a515f08cfdf29fad49e4f21ed03ac44f..5e9c82df42611b17180cbbc1d3f20ef19ab1a622 100644 --- a/docs/blueprints/who/uml/who_domain_model.txt +++ b/docs/blueprints/who/uml/who_domain_model.txt @@ -1,227 +1,270 @@ @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() + } } -entity WhoDateReported { - 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 - {classifier} create_new_object_factory(my_date_rep) -} -entity WhoCountryRegion { - id: Integer - region: String -} -entity WhoCountry { - id: Integer - country_code: String - country: 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} get_germany() - {classifier} find_by_country_code_and_country_and_who_region_id(i_country_code, i_country, my_region) - {classifier} find_by_country_code(i_country_code) - {classifier} find_by_country(i_country) - {classifier} get_by_country_code(i_country_code) - {classifier} get_by_country(i_country) - {classifier} get_who_countries_for_region(region, page) -} -entity WhoData { - id: Integer - cases_new: Integer - cases_cumulative: Integer - deaths_new: Integer - deaths_cumulative: Integer - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_by_id(other_id: Integer) - {classifier} find_one_or_none_by_date_and_country(my_date_reported, my_country) - {classifier} get_data_for_country(who_country, page) - {classifier} get_data_for_day(date_reported, page) - {classifier} get_data_for_day_order_by_cases_new(date_reported, page) - {classifier} get_data_for_day_order_by_cases_cumulative(date_reported, page) - {classifier} get_data_for_day_order_by_deaths_new(date_reported, page) - {classifier} get_data_for_day_order_by_deaths_cumulative(date_reported, page) - {classifier} get_data_for_country_order_by_cases_new(who_country, page) - {classifier} get_data_for_country_order_by_cases_cumulative(who_country, page) - {classifier} get_data_for_country_order_by_deaths_new(who_country, page) - {classifier} get_data_for_country_order_by_deaths_cumulative(who_country, page) -} -entity WhoImport { - id: Integer - date_reported: String - country_code: String - country: String - who_region: String - new_cases: String - cumulative_cases: String - new_deaths: String - cumulative_deaths: String - {classifier} remove_all() - {classifier} get_all_as_page(page: Integer) - {classifier} get_all() - {classifier} get_by_id(other_id: Integer) - {classifier} get_regions() - {classifier} get_dates_reported() - {classifier} get_for_one_day(day: String) - {classifier} get_dates_reported_as_array() - {classifier} get_new_dates_as_array() - {classifier} countries() -} -class WhoService << (S,red) Service >> { - database_drop_create_pretask() - database_drop_create_posttask() - download_files() - import_files() - update_star_schema() - full_update_star_schema() -} -class WhoServiceImport << (S,red) Service >> { - import_file() -} -class WhoServiceUpdateBase << (S,red) Service >> { -} -class WhoServiceUpdateFull << (S,red) Service >> { - -full_update_date_reported() - -full_update_region() - -full_update_country() - -full_update_data() - full_update_dimension_tables() - full_update_fact_table() - full_update_star_schema() -} -class WhoServiceUpdate << (S,red) Service >> { - -update_date_reported() - -update_region() - -update_country() - -update_data() - update_dimension_tables() - update_fact_table() - update_star_schema() - -who_import_get_new_dates_as_array() -} -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 who_views_frontend << (B,orchid) Boundary >> { - url_root() - url_home() - url_update_data() - url_rename() - url_kurse_all() - url_kurse_workflow_lektionen(workflow_id: Integer) - url_kurse_workflow_lektion_folien(lektion_id: Integer) - url_abbbildung_id(abbildung_id: Integer) - url_db_dump() - url_db_reimport() - task_data_update() - task_rename_src_files() -} -class who_celery_tasks << (B,orchid) Boundary >> { - url_root() - url_home() - url_update_data() - url_rename() - url_kurse_all() - url_kurse_workflow_lektionen(workflow_id: Integer) - url_kurse_workflow_lektion_folien(lektion_id: Integer) - url_abbbildung_id(abbildung_id: Integer) - url_db_dump() - url_db_reimport() - task_data_update() - task_rename_src_files() -} -class who_views_for_tasks << (B,orchid) Boundary >> { - url_root() - url_home() - url_update_data() - url_rename() - url_kurse_all() - url_kurse_workflow_lektionen(workflow_id: Integer) - url_kurse_workflow_lektion_folien(lektion_id: Integer) - url_abbbildung_id(abbildung_id: Integer) - url_db_dump() - url_db_reimport() - task_data_update() - task_rename_src_files() +package covid19.blueprints.who { + entity WhoDateReported { + 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 + {classifier} create_new_object_factory(my_date_rep) + } + entity WhoCountryRegion { + id: Integer + region: String + } + entity WhoCountry { + id: Integer + country_code: String + country: 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} get_germany() + {classifier} find_by_country_code_and_country_and_who_region_id(i_country_code, i_country, my_region) + {classifier} find_by_country_code(i_country_code) + {classifier} find_by_country(i_country) + {classifier} get_by_country_code(i_country_code) + {classifier} get_by_country(i_country) + {classifier} get_who_countries_for_region(region, page) + } + entity WhoData { + id: Integer + cases_new: Integer + cases_cumulative: Integer + deaths_new: Integer + deaths_cumulative: Integer + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_by_id(other_id: Integer) + {classifier} find_one_or_none_by_date_and_country(my_date_reported, my_country) + {classifier} get_data_for_country(who_country, page) + {classifier} get_data_for_day(date_reported, page) + {classifier} get_data_for_day_order_by_cases_new(date_reported, page) + {classifier} get_data_for_day_order_by_cases_cumulative(date_reported, page) + {classifier} get_data_for_day_order_by_deaths_new(date_reported, page) + {classifier} get_data_for_day_order_by_deaths_cumulative(date_reported, page) + {classifier} get_data_for_country_order_by_cases_new(who_country, page) + {classifier} get_data_for_country_order_by_cases_cumulative(who_country, page) + {classifier} get_data_for_country_order_by_deaths_new(who_country, page) + {classifier} get_data_for_country_order_by_deaths_cumulative(who_country, page) + } + entity WhoImport { + id: Integer + date_reported: String + country_code: String + country: String + who_region: String + new_cases: String + cumulative_cases: String + new_deaths: String + cumulative_deaths: String + # {classifier} remove_all() + # {classifier} get_all_as_page(page: Integer) + # {classifier} get_all() + # {classifier} get_by_id(other_id: Integer) + # {classifier} get_regions() + # {classifier} get_dates_reported() + # {classifier} get_for_one_day(day: String) + # {classifier} get_dates_reported_as_array() + # {classifier} get_new_dates_as_array() + # {classifier} countries() + {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 WhoFlat { + 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_reported: String + country_code: String + country: String + who_region: String + new_cases: String + cumulative_cases: String + new_deaths: String + cumulative_deaths: 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): WhoFlat[] + {classifier} get_data_for_day(datum_reported: Date): WhoFlat[] + } + class WhoService << (S,red) Service >> { + database_drop_create_pretask() + database_drop_create_posttask() + download_files() + import_files() + update_star_schema() + full_update_star_schema() + } + class WhoServiceImport << (S,red) Service >> { + import_file() + } + class WhoServiceUpdateBase << (S,red) Service >> { + } + class WhoServiceUpdateFull << (S,red) Service >> { + -full_update_date_reported() + -full_update_region() + -full_update_country() + -full_update_data() + full_update_dimension_tables() + full_update_fact_table() + full_update_star_schema() + } + class WhoServiceUpdate << (S,red) Service >> { + -update_date_reported() + -update_region() + -update_country() + -update_data() + update_dimension_tables() + update_fact_table() + update_star_schema() + -who_import_get_new_dates_as_array() + } + class who_views_frontend << (B,orchid) Boundary >> { + url_root() + url_home() + url_update_data() + url_rename() + url_kurse_all() + url_kurse_workflow_lektionen(workflow_id: Integer) + url_kurse_workflow_lektion_folien(lektion_id: Integer) + url_abbbildung_id(abbildung_id: Integer) + url_db_dump() + url_db_reimport() + task_data_update() + task_rename_src_files() + } + class who_celery_tasks << (B,orchid) Boundary >> { + url_root() + url_home() + url_update_data() + url_rename() + url_kurse_all() + url_kurse_workflow_lektionen(workflow_id: Integer) + url_kurse_workflow_lektion_folien(lektion_id: Integer) + url_abbbildung_id(abbildung_id: Integer) + url_db_dump() + url_db_reimport() + task_data_update() + task_rename_src_files() + } + class who_views_for_tasks << (B,orchid) Boundary >> { + url_root() + url_home() + url_update_data() + url_rename() + url_kurse_all() + url_kurse_workflow_lektionen(workflow_id: Integer) + url_kurse_workflow_lektion_folien(lektion_id: Integer) + url_abbbildung_id(abbildung_id: Integer) + url_db_dump() + url_db_reimport() + task_data_update() + task_rename_src_files() + } } WhoServiceImport : SQLAlchemy database WhoServiceUpdateBase : SQLAlchemy database