diff --git a/docs/uml_blueprints/admin/admin_domain_model.png b/docs/blueprints/app_admin/uml/domain_model/admin_domain_model.png similarity index 100% rename from docs/uml_blueprints/admin/admin_domain_model.png rename to docs/blueprints/app_admin/uml/domain_model/admin_domain_model.png diff --git a/docs/uml_blueprints/admin/admin_domain_model.txt b/docs/blueprints/app_admin/uml/domain_model/admin_domain_model.txt similarity index 100% rename from docs/uml_blueprints/admin/admin_domain_model.txt rename to docs/blueprints/app_admin/uml/domain_model/admin_domain_model.txt diff --git a/docs/uml_blueprints/admin/admin_use_cases.png b/docs/blueprints/app_admin/uml/use_cases/admin_use_cases.png similarity index 100% rename from docs/uml_blueprints/admin/admin_use_cases.png rename to docs/blueprints/app_admin/uml/use_cases/admin_use_cases.png diff --git a/docs/uml_blueprints/admin/admin_use_cases.txt b/docs/blueprints/app_admin/uml/use_cases/admin_use_cases.txt similarity index 100% rename from docs/uml_blueprints/admin/admin_use_cases.txt rename to docs/blueprints/app_admin/uml/use_cases/admin_use_cases.txt diff --git a/docs/uml_blueprints/application/application_domain_model.png b/docs/blueprints/app_all/uml/domain_model/application_domain_model.png similarity index 100% rename from docs/uml_blueprints/application/application_domain_model.png rename to docs/blueprints/app_all/uml/domain_model/application_domain_model.png diff --git a/docs/uml_blueprints/application/application_domain_model.txt b/docs/blueprints/app_all/uml/domain_model/application_domain_model.txt similarity index 100% rename from docs/uml_blueprints/application/application_domain_model.txt rename to docs/blueprints/app_all/uml/domain_model/application_domain_model.txt diff --git a/docs/uml_blueprints/application/application_use_cases.png b/docs/blueprints/app_all/uml/use_cases/application_use_cases.png similarity index 100% rename from docs/uml_blueprints/application/application_use_cases.png rename to docs/blueprints/app_all/uml/use_cases/application_use_cases.png diff --git a/docs/uml_blueprints/application/application_use_cases.txt b/docs/blueprints/app_all/uml/use_cases/application_use_cases.txt similarity index 100% rename from docs/uml_blueprints/application/application_use_cases.txt rename to docs/blueprints/app_all/uml/use_cases/application_use_cases.txt diff --git a/docs/blueprints/app_application/uml/domain_model/application_domain_model.png b/docs/blueprints/app_application/uml/domain_model/application_domain_model.png new file mode 100644 index 0000000000000000000000000000000000000000..9fbd38afa4d0392717b40d36d278ef89098b1e8b Binary files /dev/null and b/docs/blueprints/app_application/uml/domain_model/application_domain_model.png differ diff --git a/docs/blueprints/app_application/uml/domain_model/application_domain_model.txt b/docs/blueprints/app_application/uml/domain_model/application_domain_model.txt new file mode 100644 index 0000000000000000000000000000000000000000..99d3544a4c1b381096ee809c773ba0be93197df6 --- /dev/null +++ b/docs/blueprints/app_application/uml/domain_model/application_domain_model.txt @@ -0,0 +1,162 @@ +@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) +} +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) +} +entity RkiDateReported { + 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) +} +class ApplicationPage << (T,#FF7700) Transient >> { + title: String + subtitle: String + subtitle_info: String +} +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 ApplicationServiceDownload << (S,red) Service >> { + -log_error() + -log_success() + -prepare_download() + -download_with_wget() + -download_with_subprocess_and_os_native_wget() + download_file() +} +class database << (S,#FF7700) Singleton >> { + {static} int port + {static} bool run_run_with_debug + {static} int ITEMS_PER_PAGE + app: Flask + db: SQLAlchemy + admin: Admin + app_cors: CORS + app_bootstrap: Bootstrap + create_app() + create_db(my_app) + create_db_test(my_app) + create_celery(my_app) + create_admin(my_app) +} +class application_workers << (B,orchid) Boundary >> { + run_mq(my_app, my_celery) + run_app(my_app) +} +class application_views << (B,orchid) Boundary >> { + url_home() + url_root() +} +class application_services << (P,yellow) Proxy >> { + +} +class ApplicationService << (S,red) Service >> { + +} +class AdminService << (S,red) Service >> { + +} +class WhoService << (S,red) Service >> { + +} +class EcdcService << (S,red) Service >> { + +} +class RkiVaccinationService << (S,red) Service >> { + +} +class RkiBundeslaenderService << (S,red) Service >> { + +} +class RkiLandkreiseService << (S,red) Service >> { + +} +class OwidService << (S,red) Service >> { + +} +ApplicationDateReported <|-- RkiDateReported +ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig: cfg +application_workers "1" --> "1" application_services: application_services +application_views "1" --> "1" application_services: application_services +application_views "*" --> "1" ApplicationPage: page_info +application_services "*" --> "1" ApplicationService: application_service +application_services "*" --> "1" AdminService: admin_service +application_services "*" --> "1" WhoService: who_service +application_services "*" --> "1" EcdcService: ecdc_service +application_services "*" --> "1" RkiVaccinationService: rki_vaccination_service +application_services "*" --> "1" RkiBundeslaenderService: rki_service_bundeslaender +application_services "*" --> "1" RkiLandkreiseService: rki_service_landkreise +application_services "*" --> "1" OwidService: owid_service +ApplicationService "*" --> "1" database +ApplicationServiceDownload "*" --> "1" database +AdminService "*" --> "1" database +WhoService "*" --> "1" database +EcdcService "*" --> "1" database +RkiBundeslaenderService "*" --> "1" database +RkiLandkreiseService "*" --> "1" database +RkiVaccinationService "*" --> "1" database +OwidService "*" --> "1" database +ApplicationService : SQLAlchemy database +ApplicationServiceDownload : SQLAlchemy database +AdminService : SQLAlchemy database +WhoService : SQLAlchemy database +EcdcService : SQLAlchemy database +RkiBundeslaenderService : SQLAlchemy database +RkiLandkreiseService : SQLAlchemy database +RkiVaccinationService : SQLAlchemy database +OwidService : SQLAlchemy database +@enduml diff --git a/docs/blueprints/app_application/uml/use_cases/application_use_cases.png b/docs/blueprints/app_application/uml/use_cases/application_use_cases.png new file mode 100644 index 0000000000000000000000000000000000000000..b58eaaebcd65ab5fbb52c03918d11a11b1604f80 Binary files /dev/null and b/docs/blueprints/app_application/uml/use_cases/application_use_cases.png differ diff --git a/docs/blueprints/app_application/uml/use_cases/application_use_cases.txt b/docs/blueprints/app_application/uml/use_cases/application_use_cases.txt new file mode 100644 index 0000000000000000000000000000000000000000..787d4b90ad657cc70bd71edd8d9240739ca9752e --- /dev/null +++ b/docs/blueprints/app_application/uml/use_cases/application_use_cases.txt @@ -0,0 +1,15 @@ +@startuml +left to right direction +left to right direction +actor Visitor as vu +package user { + actor SysAdmin as su + actor Admin as au +} +package application_views_frontend { + usecase url_home as UC1 + usecase url_root as UC2 +} +vu --> UC1 +vu --> UC2 +@enduml \ No newline at end of file diff --git a/docs/uml_blueprints/user/user_domain_model.png b/docs/blueprints/app_user/uml/domain_model/user_domain_model.png similarity index 100% rename from docs/uml_blueprints/user/user_domain_model.png rename to docs/blueprints/app_user/uml/domain_model/user_domain_model.png diff --git a/docs/uml_blueprints/user/user_domain_model.txt b/docs/blueprints/app_user/uml/domain_model/user_domain_model.txt similarity index 100% rename from docs/uml_blueprints/user/user_domain_model.txt rename to docs/blueprints/app_user/uml/domain_model/user_domain_model.txt diff --git a/docs/uml_blueprints/user/user_use_cases.png b/docs/blueprints/app_user/uml/use_cases/user_use_cases.png similarity index 100% rename from docs/uml_blueprints/user/user_use_cases.png rename to docs/blueprints/app_user/uml/use_cases/user_use_cases.png diff --git a/docs/uml_blueprints/user/user_use_cases.txt b/docs/blueprints/app_user/uml/use_cases/user_use_cases.txt similarity index 100% rename from docs/uml_blueprints/user/user_use_cases.txt rename to docs/blueprints/app_user/uml/use_cases/user_use_cases.txt diff --git a/docs/uml_blueprints/ecdc/ecdc_domain_model.png b/docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.png similarity index 100% rename from docs/uml_blueprints/ecdc/ecdc_domain_model.png rename to docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.png diff --git a/docs/uml_blueprints/ecdc/ecdc_domain_model.txt b/docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.txt similarity index 100% rename from docs/uml_blueprints/ecdc/ecdc_domain_model.txt rename to docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.txt diff --git a/docs/uml_blueprints/ecdc/ecdc_use_cases.png b/docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.png similarity index 100% rename from docs/uml_blueprints/ecdc/ecdc_use_cases.png rename to docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.png diff --git a/docs/uml_blueprints/ecdc/ecdc_use_cases.txt b/docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.txt similarity index 100% rename from docs/uml_blueprints/ecdc/ecdc_use_cases.txt rename to docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.txt diff --git a/docs/uml_blueprints/owid/owid_domain_model.png b/docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.png similarity index 100% rename from docs/uml_blueprints/owid/owid_domain_model.png rename to docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.png diff --git a/docs/uml_blueprints/owid/owid_domain_model.txt b/docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_domain_model.txt rename to docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.txt diff --git a/docs/uml_blueprints/owid/owid_use_cases.png b/docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.png similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases.png rename to docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.png diff --git a/docs/uml_blueprints/owid/owid_use_cases.txt b/docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases.txt rename to docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.txt diff --git a/docs/blueprints/owid/uml/domain_model/owid_domain_model.png b/docs/blueprints/owid/uml/domain_model/owid_domain_model.png new file mode 100644 index 0000000000000000000000000000000000000000..11b3308ec299995c6f2fb30e1e09934204f2c449 Binary files /dev/null and b/docs/blueprints/owid/uml/domain_model/owid_domain_model.png differ diff --git a/docs/blueprints/owid/uml/domain_model/owid_domain_model.txt b/docs/blueprints/owid/uml/domain_model/owid_domain_model.txt new file mode 100644 index 0000000000000000000000000000000000000000..8836cb52b77331ab2d07d78a6e10aeafbd2dfde0 --- /dev/null +++ b/docs/blueprints/owid/uml/domain_model/owid_domain_model.txt @@ -0,0 +1,330 @@ +@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() +} +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() +} +OwidServiceImport : SQLAlchemy database +OwidServiceUpdateBase : SQLAlchemy database +OwidServiceUpdateFull : SQLAlchemy database +OwidServiceUpdate : SQLAlchemy database +OwidService : SQLAlchemy database +ApplicationServiceDownload : SQLAlchemy database +OwidServiceUpdateFull <|-- OwidServiceUpdateBase +OwidServiceUpdate <|-- OwidServiceUpdateBase +ApplicationDateReported <|-- OwidDateReported +ApplicationRegion <|-- OwidContinent +OwidCountry "1" *--> "*" OwidContinent : region +OwidData "1" *--> "*" OwidCountry : country +OwidData "1" *--> "*" OwidDateReported : date_reported +OwidService "*" *--> "1" ApplicationServiceConfig : cfg +OwidServiceImport "*" --> "1" ApplicationServiceConfig : cfg +OwidServiceUpdate "*" --> "1" ApplicationServiceConfig : cfg +ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig : 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" ApplicationServiceDownload : service_download +owid_views_frontend "1" --> "1" OwidService : owid_service +owid_views_for_tasks "1" --> "1" OwidService : owid_service +owid_celery_tasks "1" --> "1" OwidService : owid_service +@enduml diff --git a/docs/blueprints/owid/uml/use_cases/owid_use_cases.png b/docs/blueprints/owid/uml/use_cases/owid_use_cases.png new file mode 100644 index 0000000000000000000000000000000000000000..5a30ecc6f03aaf56651009513022036f6425c791 Binary files /dev/null and b/docs/blueprints/owid/uml/use_cases/owid_use_cases.png differ diff --git a/docs/blueprints/owid/uml/use_cases/owid_use_cases.txt b/docs/blueprints/owid/uml/use_cases/owid_use_cases.txt new file mode 100644 index 0000000000000000000000000000000000000000..bbe591d1b8bcce045063eb5c5eba3da6652f88f5 --- /dev/null +++ b/docs/blueprints/owid/uml/use_cases/owid_use_cases.txt @@ -0,0 +1,58 @@ +@startuml +left to right direction +actor Visitor as vu +package user { + actor SysAdmin as su + actor Admin as au +} +package owid_views_frontend { + usecase owid_info as UC1 + usecase owid_imported as UC2 + usecase owid_date_reported as UC3 + usecase owid_date_continent as UC4 + usecase owid_date_country as UC5 + usecase owid_date_country_germany as UC6 + usecase owid_date_reports as UC7 +} +package owid_views_for_tasks { + usecase owid_tasks as UC57 + usecase task_owid_download_only as UC50 + usecase task_owid_import_only as UC51 + usecase task_owid_update_dimension_tables_only as UC52 + usecase task_owid_update_fact_table_initial_only as UC53 + usecase task_owid_update_fact_table_incremental_only as UC54 + usecase task_owid_update_star_schema_initial as UC55 + usecase task_owid_update_star_schema_incremental as UC56 +} +package owid_celery_tasks { + usecase owid_task_download_only as UC100 + usecase owid_task_import_only as UC101 + usecase owid_task_update_dimensiontables_only as UC102 + usecase owid_task_update_facttable_incremental_only as UC103 + usecase owid_task_update_facttable_initial_only as UC104 + usecase owid_task_update_starschema_initial as UC105 + usecase owid_task_update_starschema_incremental as UC106 +} +vu --> UC1 +vu --> UC2 +vu --> UC3 +vu --> UC4 +vu --> UC5 +vu --> UC6 +vu --> UC7 +au --> UC50 +au --> UC51 +au --> UC52 +au --> UC53 +au --> UC54 +au --> UC55 +au --> UC56 +au --> UC57 +UC50 --> UC100 +UC51 --> UC101 +UC52 --> UC102 +UC53 --> UC103 +UC54 --> UC104 +UC55 --> UC105 +UC56 --> UC106 +@enduml \ No newline at end of file diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_1.png b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.png similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_1.png rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.png diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_1.txt b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_1.txt rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.txt diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_2.png b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.png similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_2.png rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.png diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_2.txt b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_2.txt rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.txt diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_3.png b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.png similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_3.png rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.png diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_3.txt b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_3.txt rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.txt diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_4.png b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.png similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_4.png rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.png diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_4.txt b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_4.txt rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.txt diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_5.png b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.png similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_5.png rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.png diff --git a/docs/uml_blueprints/owid/owid_use_cases_visual_data_5.txt b/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.txt similarity index 100% rename from docs/uml_blueprints/owid/owid_use_cases_visual_data_5.txt rename to docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.txt diff --git a/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.png b/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.png new file mode 100644 index 0000000000000000000000000000000000000000..11b3308ec299995c6f2fb30e1e09934204f2c449 Binary files /dev/null and b/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.png differ diff --git a/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.txt b/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.txt new file mode 100644 index 0000000000000000000000000000000000000000..8836cb52b77331ab2d07d78a6e10aeafbd2dfde0 --- /dev/null +++ b/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.txt @@ -0,0 +1,330 @@ +@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() +} +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() +} +OwidServiceImport : SQLAlchemy database +OwidServiceUpdateBase : SQLAlchemy database +OwidServiceUpdateFull : SQLAlchemy database +OwidServiceUpdate : SQLAlchemy database +OwidService : SQLAlchemy database +ApplicationServiceDownload : SQLAlchemy database +OwidServiceUpdateFull <|-- OwidServiceUpdateBase +OwidServiceUpdate <|-- OwidServiceUpdateBase +ApplicationDateReported <|-- OwidDateReported +ApplicationRegion <|-- OwidContinent +OwidCountry "1" *--> "*" OwidContinent : region +OwidData "1" *--> "*" OwidCountry : country +OwidData "1" *--> "*" OwidDateReported : date_reported +OwidService "*" *--> "1" ApplicationServiceConfig : cfg +OwidServiceImport "*" --> "1" ApplicationServiceConfig : cfg +OwidServiceUpdate "*" --> "1" ApplicationServiceConfig : cfg +ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig : 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" ApplicationServiceDownload : service_download +owid_views_frontend "1" --> "1" OwidService : owid_service +owid_views_for_tasks "1" --> "1" OwidService : owid_service +owid_celery_tasks "1" --> "1" OwidService : owid_service +@enduml diff --git a/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.png b/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.png new file mode 100644 index 0000000000000000000000000000000000000000..5a30ecc6f03aaf56651009513022036f6425c791 Binary files /dev/null and b/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.png differ diff --git a/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.txt b/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.txt new file mode 100644 index 0000000000000000000000000000000000000000..bbe591d1b8bcce045063eb5c5eba3da6652f88f5 --- /dev/null +++ b/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.txt @@ -0,0 +1,58 @@ +@startuml +left to right direction +actor Visitor as vu +package user { + actor SysAdmin as su + actor Admin as au +} +package owid_views_frontend { + usecase owid_info as UC1 + usecase owid_imported as UC2 + usecase owid_date_reported as UC3 + usecase owid_date_continent as UC4 + usecase owid_date_country as UC5 + usecase owid_date_country_germany as UC6 + usecase owid_date_reports as UC7 +} +package owid_views_for_tasks { + usecase owid_tasks as UC57 + usecase task_owid_download_only as UC50 + usecase task_owid_import_only as UC51 + usecase task_owid_update_dimension_tables_only as UC52 + usecase task_owid_update_fact_table_initial_only as UC53 + usecase task_owid_update_fact_table_incremental_only as UC54 + usecase task_owid_update_star_schema_initial as UC55 + usecase task_owid_update_star_schema_incremental as UC56 +} +package owid_celery_tasks { + usecase owid_task_download_only as UC100 + usecase owid_task_import_only as UC101 + usecase owid_task_update_dimensiontables_only as UC102 + usecase owid_task_update_facttable_incremental_only as UC103 + usecase owid_task_update_facttable_initial_only as UC104 + usecase owid_task_update_starschema_initial as UC105 + usecase owid_task_update_starschema_incremental as UC106 +} +vu --> UC1 +vu --> UC2 +vu --> UC3 +vu --> UC4 +vu --> UC5 +vu --> UC6 +vu --> UC7 +au --> UC50 +au --> UC51 +au --> UC52 +au --> UC53 +au --> UC54 +au --> UC55 +au --> UC56 +au --> UC57 +UC50 --> UC100 +UC51 --> UC101 +UC52 --> UC102 +UC53 --> UC103 +UC54 --> UC104 +UC55 --> UC105 +UC56 --> UC106 +@enduml \ No newline at end of file diff --git a/docs/uml_blueprints/rki_vaccination/rki_vaccination_domain_model.png b/docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.png similarity index 100% rename from docs/uml_blueprints/rki_vaccination/rki_vaccination_domain_model.png rename to docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.png diff --git a/docs/uml_blueprints/rki_vaccination/rki_vaccination_domain_model.txt b/docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.txt similarity index 100% rename from docs/uml_blueprints/rki_vaccination/rki_vaccination_domain_model.txt rename to docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.txt diff --git a/docs/uml_blueprints/rki_vaccination/rki_vaccination_use_cases.png b/docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.png similarity index 100% rename from docs/uml_blueprints/rki_vaccination/rki_vaccination_use_cases.png rename to docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.png diff --git a/docs/uml_blueprints/rki_vaccination/rki_vaccination_use_cases.txt b/docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.txt similarity index 100% rename from docs/uml_blueprints/rki_vaccination/rki_vaccination_use_cases.txt rename to docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.txt diff --git a/docs/uml_blueprints/who/who_domain_model.png b/docs/blueprints/who/uml/domain_model/who_domain_model.png similarity index 100% rename from docs/uml_blueprints/who/who_domain_model.png rename to docs/blueprints/who/uml/domain_model/who_domain_model.png diff --git a/docs/uml_blueprints/who/who_domain_model.txt b/docs/blueprints/who/uml/domain_model/who_domain_model.txt similarity index 100% rename from docs/uml_blueprints/who/who_domain_model.txt rename to docs/blueprints/who/uml/domain_model/who_domain_model.txt diff --git a/docs/uml_blueprints/who/who_use_cases.png b/docs/blueprints/who/uml/use_cases/who_use_cases.png similarity index 100% rename from docs/uml_blueprints/who/who_use_cases.png rename to docs/blueprints/who/uml/use_cases/who_use_cases.png diff --git a/docs/uml_blueprints/who/who_use_cases.txt b/docs/blueprints/who/uml/use_cases/who_use_cases.txt similarity index 100% rename from docs/uml_blueprints/who/who_use_cases.txt rename to docs/blueprints/who/uml/use_cases/who_use_cases.txt