diff --git a/docs/blueprints/owid/use_cases__visual_data/.gitignore b/docs/blueprints/all/uml/impl/.gitignore similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/.gitignore rename to docs/blueprints/all/uml/impl/.gitignore diff --git a/docs/blueprints/all/uml/all_domain_model_impl.puml b/docs/blueprints/all/uml/impl/all_domain_model_impl.puml similarity index 100% rename from docs/blueprints/all/uml/all_domain_model_impl.puml rename to docs/blueprints/all/uml/impl/all_domain_model_impl.puml diff --git a/docs/blueprints/all/uml/all_use_cases_impl.puml b/docs/blueprints/all/uml/impl/all_use_cases_impl.puml similarity index 100% rename from docs/blueprints/all/uml/all_use_cases_impl.puml rename to docs/blueprints/all/uml/impl/all_use_cases_impl.puml diff --git a/docs/blueprints/all/uml/img/all_domain_model_impl.png b/docs/blueprints/all/uml/impl/img/all_domain_model_impl.png similarity index 100% rename from docs/blueprints/all/uml/img/all_domain_model_impl.png rename to docs/blueprints/all/uml/impl/img/all_domain_model_impl.png diff --git a/docs/blueprints/all/uml/img/all_use_cases_impl.png b/docs/blueprints/all/uml/impl/img/all_use_cases_impl.png similarity index 100% rename from docs/blueprints/all/uml/img/all_use_cases_impl.png rename to docs/blueprints/all/uml/impl/img/all_use_cases_impl.png diff --git a/docs/blueprints/app_application/uml/impl/.gitignore b/docs/blueprints/app_application/uml/impl/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/app_application/uml/impl/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/app_application/uml/app_admin_domain_model_impl.puml b/docs/blueprints/app_application/uml/impl/app_admin_domain_model_impl.puml similarity index 100% rename from docs/blueprints/app_application/uml/app_admin_domain_model_impl.puml rename to docs/blueprints/app_application/uml/impl/app_admin_domain_model_impl.puml diff --git a/docs/blueprints/app_application/uml/app_application_domain_model_impl.puml b/docs/blueprints/app_application/uml/impl/app_application_domain_model_impl.puml similarity index 100% rename from docs/blueprints/app_application/uml/app_application_domain_model_impl.puml rename to docs/blueprints/app_application/uml/impl/app_application_domain_model_impl.puml diff --git a/docs/blueprints/app_application/uml/app_application_use_cases_impl.puml b/docs/blueprints/app_application/uml/impl/app_application_use_cases_impl.puml similarity index 100% rename from docs/blueprints/app_application/uml/app_application_use_cases_impl.puml rename to docs/blueprints/app_application/uml/impl/app_application_use_cases_impl.puml diff --git a/docs/blueprints/app_application/uml/img/app_admin_domain_model_impl.png b/docs/blueprints/app_application/uml/impl/img/app_admin_domain_model_impl.png similarity index 100% rename from docs/blueprints/app_application/uml/img/app_admin_domain_model_impl.png rename to docs/blueprints/app_application/uml/impl/img/app_admin_domain_model_impl.png diff --git a/docs/blueprints/app_application/uml/img/app_application_domain_model_impl.png b/docs/blueprints/app_application/uml/impl/img/app_application_domain_model_impl.png similarity index 100% rename from docs/blueprints/app_application/uml/img/app_application_domain_model_impl.png rename to docs/blueprints/app_application/uml/impl/img/app_application_domain_model_impl.png diff --git a/docs/blueprints/app_application/uml/img/app_application_use_cases_impl.png b/docs/blueprints/app_application/uml/impl/img/app_application_use_cases_impl.png similarity index 100% rename from docs/blueprints/app_application/uml/img/app_application_use_cases_impl.png rename to docs/blueprints/app_application/uml/impl/img/app_application_use_cases_impl.png diff --git a/docs/blueprints/ecdc/uml/impl/.gitignore b/docs/blueprints/ecdc/uml/impl/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/ecdc/uml/impl/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/ecdc/uml/ecdc_domain_model_impl.puml b/docs/blueprints/ecdc/uml/impl/ecdc_domain_model_impl.puml similarity index 100% rename from docs/blueprints/ecdc/uml/ecdc_domain_model_impl.puml rename to docs/blueprints/ecdc/uml/impl/ecdc_domain_model_impl.puml diff --git a/docs/blueprints/ecdc/uml/ecdc_use_cases_impl.puml b/docs/blueprints/ecdc/uml/impl/ecdc_use_cases_impl.puml similarity index 100% rename from docs/blueprints/ecdc/uml/ecdc_use_cases_impl.puml rename to docs/blueprints/ecdc/uml/impl/ecdc_use_cases_impl.puml diff --git a/docs/blueprints/ecdc/uml/img/ecdc_domain_model_impl.png b/docs/blueprints/ecdc/uml/impl/img/ecdc_domain_model_impl.png similarity index 100% rename from docs/blueprints/ecdc/uml/img/ecdc_domain_model_impl.png rename to docs/blueprints/ecdc/uml/impl/img/ecdc_domain_model_impl.png diff --git a/docs/blueprints/ecdc/uml/img/ecdc_use_cases_impl.png b/docs/blueprints/ecdc/uml/impl/img/ecdc_use_cases_impl.png similarity index 100% rename from docs/blueprints/ecdc/uml/img/ecdc_use_cases_impl.png rename to docs/blueprints/ecdc/uml/impl/img/ecdc_use_cases_impl.png diff --git a/docs/blueprints/owid/uml/impl/.gitignore b/docs/blueprints/owid/uml/impl/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/owid/uml/impl/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/owid/uml/img/owid_domain_model_impl.png b/docs/blueprints/owid/uml/impl/img/owid_domain_model_impl.png similarity index 100% rename from docs/blueprints/owid/uml/img/owid_domain_model_impl.png rename to docs/blueprints/owid/uml/impl/img/owid_domain_model_impl.png diff --git a/docs/blueprints/owid/uml/img/owid_use_cases_impl.png b/docs/blueprints/owid/uml/impl/img/owid_use_cases_impl.png similarity index 100% rename from docs/blueprints/owid/uml/img/owid_use_cases_impl.png rename to docs/blueprints/owid/uml/impl/img/owid_use_cases_impl.png diff --git a/docs/blueprints/owid/uml/owid_domain_model_impl.puml b/docs/blueprints/owid/uml/impl/owid_domain_model_impl.puml similarity index 100% rename from docs/blueprints/owid/uml/owid_domain_model_impl.puml rename to docs/blueprints/owid/uml/impl/owid_domain_model_impl.puml diff --git a/docs/blueprints/owid/uml/impl/owid_service_impl.puml b/docs/blueprints/owid/uml/impl/owid_service_impl.puml new file mode 100644 index 0000000000000000000000000000000000000000..38c762698593de038987deda1545261c88d08153 --- /dev/null +++ b/docs/blueprints/owid/uml/impl/owid_service_impl.puml @@ -0,0 +1,489 @@ +@startuml +left to right direction + +package covid19.blueprints.all.model { + + entity AllDateReported { + 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 AllLocationGroup { + 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 AllServiceDownload << (S,red) Service >> { + -log_error() + -log_success() + -prepare_download() + -download_with_wget() + -download_with_subprocess_and_os_native_wget() + download_file() + } + class AllServiceConfig << (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 AllImport { + 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.model { + + 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 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 + 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) + } +} + +package covid19.blueprints.owid.service { + 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() + } +} + +package covid19.blueprints.owid.views { + 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 +OwidServiceUpdateFull : SQLAlchemy database +OwidServiceUpdate : SQLAlchemy database +OwidService : SQLAlchemy database +AllServiceDownload : SQLAlchemy database +OwidServiceUpdateFull <|-- OwidServiceUpdateBase +OwidServiceUpdate <|-- OwidServiceUpdateBase +AllDateReported <|-- OwidDateReported +AllLocationGroup <|-- OwidContinent +OwidCountry "1" *--> "*" OwidContinent : region +OwidData "1" *--> "*" OwidCountry : country +OwidData "1" *--> "*" OwidDateReported : date_reported +OwidService "*" *--> "1" AllServiceConfig : cfg +OwidServiceImport "*" --> "1" AllServiceConfig : cfg +OwidServiceUpdate "*" --> "1" AllServiceConfig : cfg +AllServiceDownload "*" --> "1" AllServiceConfig : cfg +OwidService "1" *--> "1" OwidServiceImport : owid_service_import +OwidService "1" *--> "1" OwidServiceUpdate : owid_service_update +OwidService "1" *--> "1" OwidServiceUpdateFull : owid_service_update +OwidService "1" *--> "1" AllServiceDownload : 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 <|-- AllImport +AllImportIncrement <|-- AllImport +AllImport <|-- AllFlat +AllImport <|-- OwidImport +AllFlat <|-- OwidFlat +OwidImport <|-- OwidFlat +@enduml diff --git a/docs/blueprints/owid/uml/owid_use_cases_impl.puml b/docs/blueprints/owid/uml/impl/owid_use_cases_impl.puml similarity index 100% rename from docs/blueprints/owid/uml/owid_use_cases_impl.puml rename to docs/blueprints/owid/uml/impl/owid_use_cases_impl.puml diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/.gitignore b/docs/blueprints/owid/uml/use_cases__visual_data/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/owid/uml/use_cases__visual_data/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_1.png b/docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_1.png similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_1.png rename to docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_1.png diff --git a/docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_2.png b/docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_2.png similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_2.png rename to docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_2.png diff --git a/docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_3.png b/docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_3.png similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_3.png rename to docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_3.png diff --git a/docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_4.png b/docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_4.png similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_4.png rename to docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_4.png diff --git a/docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_5.png b/docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_5.png similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/img/owid_use_cases_visual_data_5.png rename to docs/blueprints/owid/uml/use_cases__visual_data/img/owid_use_cases_visual_data_5.png diff --git a/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_1.puml b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.puml similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_1.puml rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.puml diff --git a/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_2.puml b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.puml similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_2.puml rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.puml diff --git a/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_3.puml b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.puml similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_3.puml rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.puml diff --git a/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_4.puml b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.puml similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_4.puml rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.puml diff --git a/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_5.puml b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.puml similarity index 100% rename from docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_5.puml rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.puml diff --git a/docs/blueprints/rki_cases/uml/impl/.gitignore b/docs/blueprints/rki_cases/uml/impl/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/rki_cases/uml/impl/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/rki_cases/uml/img/rki_cases_domain_model_impl.png b/docs/blueprints/rki_cases/uml/impl/img/rki_cases_domain_model_impl.png similarity index 100% rename from docs/blueprints/rki_cases/uml/img/rki_cases_domain_model_impl.png rename to docs/blueprints/rki_cases/uml/impl/img/rki_cases_domain_model_impl.png diff --git a/docs/blueprints/rki_cases/uml/img/rki_cases_use_cases_impl.png b/docs/blueprints/rki_cases/uml/impl/img/rki_cases_use_cases_impl.png similarity index 100% rename from docs/blueprints/rki_cases/uml/img/rki_cases_use_cases_impl.png rename to docs/blueprints/rki_cases/uml/impl/img/rki_cases_use_cases_impl.png diff --git a/docs/blueprints/rki_cases/uml/rki_cases_domain_model_impl.puml b/docs/blueprints/rki_cases/uml/impl/rki_cases_domain_model_impl.puml similarity index 100% rename from docs/blueprints/rki_cases/uml/rki_cases_domain_model_impl.puml rename to docs/blueprints/rki_cases/uml/impl/rki_cases_domain_model_impl.puml diff --git a/docs/blueprints/rki_cases/uml/impl/rki_cases_service_impl.puml b/docs/blueprints/rki_cases/uml/impl/rki_cases_service_impl.puml new file mode 100644 index 0000000000000000000000000000000000000000..c7251fc236b87b1f2df80132b7ad4a475f8273f1 --- /dev/null +++ b/docs/blueprints/rki_cases/uml/impl/rki_cases_service_impl.puml @@ -0,0 +1,353 @@ +@startuml +left to right direction +package covid19.blueprints.all { + + interface 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) + } + interface 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[] + } +} +package covid19.blueprints.rki_cases { + + entity RkiImport { + id: Integer + fid: String + id_bundesland: String + bundesland: String + landkreis: String + altersgruppe: String + geschlecht: String + anzahl_fall: String + anzahl_todesfall: String + meldedatum: String + id_landkreis: String + datenstand: String + neuer_fall: String + neuer_todesfall: String + ref_datum: String + neu_genesen: String + anzahl_genesen: String + ist_erkrankungsbeginn: String + altersgruppe2: 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 RkiFlat { + 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 + fid: String + id_bundesland: String + bundesland: String + landkreis: String + altersgruppe: String + geschlecht: String + anzahl_fall: String + anzahl_todesfall: String + meldedatum: String + id_landkreis: String + datenstand: String + neuer_fall: String + neuer_todesfall: String + ref_datum: String + neu_genesen: String + anzahl_genesen: String + ist_erkrankungsbeginn: String + altersgruppe2: 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): RkiCasesFlat[] + {classifier} get_data_for_day(datum_reported: Date): RkiCasesFlat[] + } + + entity RkiMeldedatum { + 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 RkiBundesland { + id: Integer + id_bundesland: String + region: 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 RkiLandkreis { + id: Integer + id_landkreis: String + landkreis: 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 RkiData { + id: Integer + fid: String + id_bundesland: String + bundesland: String + landkreis: String + altersgruppe: String + geschlecht: String + anzahl_fall: String + anzahl_todesfall: String + meldedatum: String + id_landkreis: String + datenstand: String + neuer_fall: String + neuer_todesfall: String + ref_datum: String + neu_genesen: String + anzahl_genesen: String + ist_erkrankungsbeginn: String + altersgruppe2: 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 RkiServiceImport << (S,red) Service >> { + import_file() + } + class RkiServiceUpdateBase << (S,red) Service >> { + } + class RkiServiceUpdateFull << (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 RkiServiceUpdate << (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 RkiService << (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 rki_cases_views_frontend << (B,orchid) Boundary >> { + url_get_import() + url_get_flat() + url_get_years() + url_get_days() + url_get_days_for_year() + url_get_location_groups() + url_get_locations_for_location_group(location_group: str) + url_get_data_for_location() + url_get_data_for_day() + url_page_info() + url_page_tasks() + } + class rki_cases_celery_tasks << (B,orchid) Boundary >> { + task_download_file() + task_import_file() + task_import_file_flat() + task_full_update_dimension_tables() + task_full_update_fact_table() + task_full_update_star_schema() + task_update_dimension_tables() + task_update_fact_table() + task_update_star_schema() + } +} +RkiServiceImport : SQLAlchemy database +RkiServiceUpdateBase : SQLAlchemy database +RkiServiceUpdateFull : SQLAlchemy database +RkiServiceUpdate : SQLAlchemy database +RkiService : SQLAlchemy database +ApplicationServiceDownload : SQLAlchemy database +RkiServiceUpdateBase <|-- RkiServiceUpdateFull +RkiServiceUpdateBase <|-- RkiServiceUpdate +ApplicationDateReported <|-- RkiMeldedatum +ApplicationRegion <|-- RkiBundesland +RkiLandkreis "1" *--> "*" RkiBundesland : bundesland +RkiData "1" *--> "*" RkiLandkreis : landkreis +RkiData "1" *--> "*" RkiMeldedatum : meldedatum +RkiService "*" *--> "1" ApplicationServiceConfig : cfg +RkiServiceImport "*" --> "1" ApplicationServiceConfig : cfg +RkiServiceUpdate "*" --> "1" ApplicationServiceConfig : cfg +ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig : cfg +RkiService "1" *--> "1" RkiServiceImport : rki_service_import +RkiService "1" *--> "1" RkiServiceUpdate : rki_service_update +RkiService "1" *--> "1" RkiServiceUpdateFull : rki_service_update +RkiService "1" *--> "1" ApplicationServiceDownload : service_download +rki_cases_views_frontend "1" --> "1" RkiService : rki_service +rki_cases_celery_tasks "1" --> "1" RkiService : rki_service +AllImportFull <|-- DataImport +AllImportIncrement <|-- DataImport +DataImport <|-- AllFlat +DataImport <|-- RkiImport +AllFlat <|-- RkiFlat +RkiImport <|-- RkiFlat +@enduml diff --git a/docs/blueprints/rki_cases/uml/rki_cases_use_cases_impl.puml b/docs/blueprints/rki_cases/uml/impl/rki_cases_use_cases_impl.puml similarity index 100% rename from docs/blueprints/rki_cases/uml/rki_cases_use_cases_impl.puml rename to docs/blueprints/rki_cases/uml/impl/rki_cases_use_cases_impl.puml diff --git a/docs/blueprints/rki_cases/uml/rki_cases_domain_model.puml b/docs/blueprints/rki_cases/uml/rki_cases_domain_model.puml index c7251fc236b87b1f2df80132b7ad4a475f8273f1..5ea5ed062ee1e9f7abbd5337310ec56f2cc41de9 100644 --- a/docs/blueprints/rki_cases/uml/rki_cases_domain_model.puml +++ b/docs/blueprints/rki_cases/uml/rki_cases_domain_model.puml @@ -1,8 +1,8 @@ @startuml left to right direction -package covid19.blueprints.all { +package covid19.blueprints.all.model { - interface ApplicationDateReported { + interface AllDateReported { id: Integer date_reported: String year_week: String @@ -20,7 +20,8 @@ package covid19.blueprints.all { {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) {classifier} create_new_object_factory(my_date_rep: String) } - interface ApplicationRegion { + + interface AllLocation { id: Integer continent: String {classifier} remove_all() @@ -30,34 +31,23 @@ package covid19.blueprints.all { {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() + + interface AllLocationGroup { + 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 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 AllData { + id: Integer } +} + +package covid19.blueprints.all.model_import { interface AllImportFull { {classifier} download_file() @@ -75,7 +65,7 @@ package covid19.blueprints.all { {classifier} update_star_schema() } - interface DataImport { + interface AllImport { datum_reported: Date location: String location_group: String @@ -113,7 +103,8 @@ package covid19.blueprints.all { {classifier} get_data_for_day(datum_reported: Date): AllFlat[] } } -package covid19.blueprints.rki_cases { + +package covid19.blueprints.rki_cases.model_import { entity RkiImport { id: Integer @@ -186,6 +177,9 @@ package covid19.blueprints.rki_cases { {classifier} get_data_for_location(location: String): RkiCasesFlat[] {classifier} get_data_for_day(datum_reported: Date): RkiCasesFlat[] } +} + +package covid19.blueprints.rki_cases.model { entity RkiMeldedatum { id: Integer @@ -254,100 +248,21 @@ package covid19.blueprints.rki_cases { {classifier} get_by_id(other_id: Integer) {classifier} find_by_id(other_id: Integer) } - class RkiServiceImport << (S,red) Service >> { - import_file() - } - class RkiServiceUpdateBase << (S,red) Service >> { - } - class RkiServiceUpdateFull << (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 RkiServiceUpdate << (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 RkiService << (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 rki_cases_views_frontend << (B,orchid) Boundary >> { - url_get_import() - url_get_flat() - url_get_years() - url_get_days() - url_get_days_for_year() - url_get_location_groups() - url_get_locations_for_location_group(location_group: str) - url_get_data_for_location() - url_get_data_for_day() - url_page_info() - url_page_tasks() - } - class rki_cases_celery_tasks << (B,orchid) Boundary >> { - task_download_file() - task_import_file() - task_import_file_flat() - task_full_update_dimension_tables() - task_full_update_fact_table() - task_full_update_star_schema() - task_update_dimension_tables() - task_update_fact_table() - task_update_star_schema() - } } -RkiServiceImport : SQLAlchemy database -RkiServiceUpdateBase : SQLAlchemy database -RkiServiceUpdateFull : SQLAlchemy database -RkiServiceUpdate : SQLAlchemy database -RkiService : SQLAlchemy database -ApplicationServiceDownload : SQLAlchemy database -RkiServiceUpdateBase <|-- RkiServiceUpdateFull -RkiServiceUpdateBase <|-- RkiServiceUpdate -ApplicationDateReported <|-- RkiMeldedatum -ApplicationRegion <|-- RkiBundesland + +AllImportFull <|-- AllImport +AllImportIncrement <|-- AllImport +AllImport <|-- AllFlat +AllImport <|-- RkiImport +AllFlat <|-- RkiFlat +RkiImport <|-- RkiFlat + +AllDateReported <|-- RkiMeldedatum +AllLocationGroup <|-- RkiBundesland +AllLocation <|-- RkiLandkreis +AllData <|-- RkiData + RkiLandkreis "1" *--> "*" RkiBundesland : bundesland RkiData "1" *--> "*" RkiLandkreis : landkreis RkiData "1" *--> "*" RkiMeldedatum : meldedatum -RkiService "*" *--> "1" ApplicationServiceConfig : cfg -RkiServiceImport "*" --> "1" ApplicationServiceConfig : cfg -RkiServiceUpdate "*" --> "1" ApplicationServiceConfig : cfg -ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig : cfg -RkiService "1" *--> "1" RkiServiceImport : rki_service_import -RkiService "1" *--> "1" RkiServiceUpdate : rki_service_update -RkiService "1" *--> "1" RkiServiceUpdateFull : rki_service_update -RkiService "1" *--> "1" ApplicationServiceDownload : service_download -rki_cases_views_frontend "1" --> "1" RkiService : rki_service -rki_cases_celery_tasks "1" --> "1" RkiService : rki_service -AllImportFull <|-- DataImport -AllImportIncrement <|-- DataImport -DataImport <|-- AllFlat -DataImport <|-- RkiImport -AllFlat <|-- RkiFlat -RkiImport <|-- RkiFlat @enduml diff --git a/docs/blueprints/rki_vaccination/uml/impl/.gitignore b/docs/blueprints/rki_vaccination/uml/impl/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/rki_vaccination/uml/impl/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/rki_vaccination/uml/img/rki_vaccination_domain_model_impl.png b/docs/blueprints/rki_vaccination/uml/impl/img/rki_vaccination_domain_model_impl.png similarity index 100% rename from docs/blueprints/rki_vaccination/uml/img/rki_vaccination_domain_model_impl.png rename to docs/blueprints/rki_vaccination/uml/impl/img/rki_vaccination_domain_model_impl.png diff --git a/docs/blueprints/rki_vaccination/uml/rki_vaccination_domain_model_impl.puml b/docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_domain_model_impl.puml similarity index 100% rename from docs/blueprints/rki_vaccination/uml/rki_vaccination_domain_model_impl.puml rename to docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_domain_model_impl.puml diff --git a/docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_service_impl.puml b/docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_service_impl.puml new file mode 100644 index 0000000000000000000000000000000000000000..1286b52d15065620b443e30d9872777192887a31 --- /dev/null +++ b/docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_service_impl.puml @@ -0,0 +1,255 @@ +@startuml +left to right direction + +package covid19.blueprints.all { + + 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() + } +} +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 +RkiVaccinationService : SQLAlchemy database +ApplicationServiceDownload : SQLAlchemy database +ApplicationDateReported <|-- RkiVaccinationDateReported +RkiVaccinationData "1" *--> "*" RkiVaccinationDateReported : date_reported +RkiVaccinationService "*" *--> "1" ApplicationServiceConfig : cfg +RkiVaccinationServiceImport "*" --> "1" ApplicationServiceConfig : cfg +RkiVaccinationServiceUpdate "*" --> "1" ApplicationServiceConfig : cfg +ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig : cfg +RkiVaccinationService "1" *--> "1" RkiVaccinationServiceImport : rki_vaccination_service_import +RkiVaccinationService "1" *--> "1" RkiVaccinationServiceUpdate : rki_vaccination_service_update +RkiVaccinationService "1" *--> "1" ApplicationServiceDownload : service_download +rki_vaccination_views_frontend "1" --> "1" RkiVaccinationService : rki_vaccination_service +rki_vaccination_views_for_tasks "1" --> "1" RkiVaccinationService : rki_vaccination_service +rki_vaccination_celery_tasks "1" --> "1" RkiVaccinationService : rki_vaccination_service +@enduml diff --git a/docs/blueprints/rki_vaccination/uml/rki_vaccination_use_cases_impl.puml b/docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_use_cases_impl.puml similarity index 100% rename from docs/blueprints/rki_vaccination/uml/rki_vaccination_use_cases_impl.puml rename to docs/blueprints/rki_vaccination/uml/impl/rki_vaccination_use_cases_impl.puml diff --git a/docs/blueprints/who/uml/impl/.gitignore b/docs/blueprints/who/uml/impl/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b44ef384e2d834c8a456302f2f70af9320b0df87 --- /dev/null +++ b/docs/blueprints/who/uml/impl/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/docs/blueprints/who/uml/img/who_domain_model_impl.png b/docs/blueprints/who/uml/impl/img/who_domain_model_impl.png similarity index 100% rename from docs/blueprints/who/uml/img/who_domain_model_impl.png rename to docs/blueprints/who/uml/impl/img/who_domain_model_impl.png diff --git a/docs/blueprints/who/uml/img/who_use_cases_impl.png b/docs/blueprints/who/uml/impl/img/who_use_cases_impl.png similarity index 100% rename from docs/blueprints/who/uml/img/who_use_cases_impl.png rename to docs/blueprints/who/uml/impl/img/who_use_cases_impl.png diff --git a/docs/blueprints/who/uml/who_domain_model_impl.puml b/docs/blueprints/who/uml/impl/who_domain_model_impl.puml similarity index 100% rename from docs/blueprints/who/uml/who_domain_model_impl.puml rename to docs/blueprints/who/uml/impl/who_domain_model_impl.puml diff --git a/docs/blueprints/who/uml/who_services.puml b/docs/blueprints/who/uml/impl/who_services_impl.puml similarity index 100% rename from docs/blueprints/who/uml/who_services.puml rename to docs/blueprints/who/uml/impl/who_services_impl.puml diff --git a/docs/blueprints/who/uml/who_use_cases_impl.puml b/docs/blueprints/who/uml/impl/who_use_cases_impl.puml similarity index 100% rename from docs/blueprints/who/uml/who_use_cases_impl.puml rename to docs/blueprints/who/uml/impl/who_use_cases_impl.puml