From 4fb0745774404255bfcabea62bc0286ff52dea62 Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Sun, 9 May 2021 15:13:01 +0200 Subject: [PATCH] working on 0.0.31 Release: UML Modell for Requirements --- .../user_domain_model.png | Bin .../user_domain_model.txt | 0 .../user_use_cases.png | Bin .../user_use_cases.txt | 0 .../uml_requirements/user_domain_model.txt | 148 ++++++++ .../uml_requirements/user_use_cases.txt | 60 ++++ .../ecdc_domain_model.png | Bin .../ecdc_domain_model.txt | 0 .../ecdc_use_cases.png | Bin .../ecdc_use_cases.txt | 0 .../uml_requirements/ecdc_domain_model.txt | 225 ++++++++++++ .../ecdc/uml_requirements/ecdc_use_cases.txt | 66 ++++ .../owid_domain_model.txt | 0 .../owid_use_cases.txt | 0 .../owid_domain_model.png | Bin .../uml_requirements}/owid_domain_model.txt | 0 .../owid_use_cases.png | Bin .../uml_requirements}/owid_use_cases.txt | 0 .../owid_domain_model.png | Bin .../uml_implementation}/owid_domain_model.txt | 0 .../owid_use_cases.png | Bin .../uml_implementation}/owid_use_cases.txt | 0 .../uml_requirements/owid_domain_model.txt | 330 ++++++++++++++++++ .../owid/uml_requirements/owid_use_cases.txt | 58 +++ .../owid_use_cases_visual_data_1.png | Bin .../owid_use_cases_visual_data_1.txt | 0 .../owid_use_cases_visual_data_2.png | Bin .../owid_use_cases_visual_data_2.txt | 0 .../owid_use_cases_visual_data_3.png | Bin .../owid_use_cases_visual_data_3.txt | 0 .../owid_use_cases_visual_data_4.png | Bin .../owid_use_cases_visual_data_4.txt | 0 .../owid_use_cases_visual_data_5.png | Bin .../owid_use_cases_visual_data_5.txt | 0 .../owid_domain_model.png | Bin .../uml_implementation/owid_domain_model.txt | 330 ++++++++++++++++++ .../owid_use_cases.png | Bin .../uml_implementation/owid_use_cases.txt | 58 +++ .../uml_requirements/owid_domain_model.txt | 330 ++++++++++++++++++ .../uml_requirements/owid_use_cases.txt | 58 +++ .../rki_vaccination_domain_model.png | Bin .../rki_vaccination_domain_model.txt | 0 .../rki_vaccination_use_cases.png | Bin .../rki_vaccination_use_cases.txt | 0 .../rki_vaccination_domain_model.txt | 203 +++++++++++ .../rki_vaccination_use_cases.txt | 50 +++ 46 files changed, 1916 insertions(+) rename docs/blueprints/app_user/{uml/domain_model => uml_implementation}/user_domain_model.png (100%) rename docs/blueprints/app_user/{uml/domain_model => uml_implementation}/user_domain_model.txt (100%) rename docs/blueprints/app_user/{uml/use_cases => uml_implementation}/user_use_cases.png (100%) rename docs/blueprints/app_user/{uml/use_cases => uml_implementation}/user_use_cases.txt (100%) create mode 100644 docs/blueprints/app_user/uml_requirements/user_domain_model.txt create mode 100644 docs/blueprints/app_user/uml_requirements/user_use_cases.txt rename docs/blueprints/ecdc/{uml/domain_model => uml_implementation}/ecdc_domain_model.png (100%) rename docs/blueprints/ecdc/{uml/domain_model => uml_implementation}/ecdc_domain_model.txt (100%) rename docs/blueprints/ecdc/{uml/use_cases => uml_implementation}/ecdc_use_cases.png (100%) rename docs/blueprints/ecdc/{uml/use_cases => uml_implementation}/ecdc_use_cases.txt (100%) create mode 100644 docs/blueprints/ecdc/uml_requirements/ecdc_domain_model.txt create mode 100644 docs/blueprints/ecdc/uml_requirements/ecdc_use_cases.txt rename docs/blueprints/intensivregister/{uml/domain_model => uml_implementation}/owid_domain_model.txt (100%) rename docs/blueprints/intensivregister/{uml/use_cases => uml_implementation}/owid_use_cases.txt (100%) rename docs/blueprints/intensivregister/{uml/domain_model => uml_requirements}/owid_domain_model.png (100%) rename docs/blueprints/{owid/uml/domain_model => intensivregister/uml_requirements}/owid_domain_model.txt (100%) rename docs/blueprints/intensivregister/{uml/use_cases => uml_requirements}/owid_use_cases.png (100%) rename docs/blueprints/{owid/uml/use_cases => intensivregister/uml_requirements}/owid_use_cases.txt (100%) rename docs/blueprints/owid/{uml/domain_model => uml_implementation}/owid_domain_model.png (100%) rename docs/blueprints/{rki_cases/uml/domain_model => owid/uml_implementation}/owid_domain_model.txt (100%) rename docs/blueprints/owid/{uml/use_cases => uml_implementation}/owid_use_cases.png (100%) rename docs/blueprints/{rki_cases/uml/use_cases => owid/uml_implementation}/owid_use_cases.txt (100%) create mode 100644 docs/blueprints/owid/uml_requirements/owid_domain_model.txt create mode 100644 docs/blueprints/owid/uml_requirements/owid_use_cases.txt rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_1.png (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_1.txt (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_2.png (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_2.txt (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_3.png (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_3.txt (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_4.png (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_4.txt (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_5.png (100%) rename docs/blueprints/owid/{uml => }/use_cases__visual_data/owid_use_cases_visual_data_5.txt (100%) rename docs/blueprints/rki_cases/{uml/domain_model => uml_implementation}/owid_domain_model.png (100%) create mode 100644 docs/blueprints/rki_cases/uml_implementation/owid_domain_model.txt rename docs/blueprints/rki_cases/{uml/use_cases => uml_implementation}/owid_use_cases.png (100%) create mode 100644 docs/blueprints/rki_cases/uml_implementation/owid_use_cases.txt create mode 100644 docs/blueprints/rki_cases/uml_requirements/owid_domain_model.txt create mode 100644 docs/blueprints/rki_cases/uml_requirements/owid_use_cases.txt rename docs/blueprints/rki_vaccination/{uml/domain_model => uml_implementation}/rki_vaccination_domain_model.png (100%) rename docs/blueprints/rki_vaccination/{uml/domain_model => uml_implementation}/rki_vaccination_domain_model.txt (100%) rename docs/blueprints/rki_vaccination/{uml/use_cases => uml_implementation}/rki_vaccination_use_cases.png (100%) rename docs/blueprints/rki_vaccination/{uml/use_cases => uml_implementation}/rki_vaccination_use_cases.txt (100%) create mode 100644 docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_domain_model.txt create mode 100644 docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_use_cases.txt diff --git a/docs/blueprints/app_user/uml/domain_model/user_domain_model.png b/docs/blueprints/app_user/uml_implementation/user_domain_model.png similarity index 100% rename from docs/blueprints/app_user/uml/domain_model/user_domain_model.png rename to docs/blueprints/app_user/uml_implementation/user_domain_model.png diff --git a/docs/blueprints/app_user/uml/domain_model/user_domain_model.txt b/docs/blueprints/app_user/uml_implementation/user_domain_model.txt similarity index 100% rename from docs/blueprints/app_user/uml/domain_model/user_domain_model.txt rename to docs/blueprints/app_user/uml_implementation/user_domain_model.txt diff --git a/docs/blueprints/app_user/uml/use_cases/user_use_cases.png b/docs/blueprints/app_user/uml_implementation/user_use_cases.png similarity index 100% rename from docs/blueprints/app_user/uml/use_cases/user_use_cases.png rename to docs/blueprints/app_user/uml_implementation/user_use_cases.png diff --git a/docs/blueprints/app_user/uml/use_cases/user_use_cases.txt b/docs/blueprints/app_user/uml_implementation/user_use_cases.txt similarity index 100% rename from docs/blueprints/app_user/uml/use_cases/user_use_cases.txt rename to docs/blueprints/app_user/uml_implementation/user_use_cases.txt diff --git a/docs/blueprints/app_user/uml_requirements/user_domain_model.txt b/docs/blueprints/app_user/uml_requirements/user_domain_model.txt new file mode 100644 index 00000000..97901874 --- /dev/null +++ b/docs/blueprints/app_user/uml_requirements/user_domain_model.txt @@ -0,0 +1,148 @@ +@startuml +class UserService << (S,red) Service >> { + database: String + limit_nr: Integer + task_database_drop_create() + run_admin_database_dump() + {classifier} -run_ome_shell_command(cmd) + {classifier} run_admin_database_dump_reimport() + {classifier} run_admin_database_drop() +} +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 user_views_frontend << (B,orchid) Boundary >> { + url_user_index() + url_user_tasks() + url_user_info() +} +class user_celery_tasks << (B,orchid) Boundary >> { + task_user_alive_message() + task_user_database_drop_create() + task_user_import_all_files() + task_user_update_dimension_tables_only() + task_user_update_fact_table_initial_only() + task_user_update_fact_table_incremental_only() + task_user_update_star_schema_initial() + task_user_update_star_schema_incremental() +} +class user_views_for_tasks << (B,orchid) Boundary >> { + url_user_database_dump() + url_user_database_dump_reimport() + url_user_database_dropcreate_only() + url_user_database_drop() + url_user_download_all_files() + url_user_import_all_files() + url_user_update_dimension_tables_only() + url_user_update_fact_table_initial_only() + url_user_update_fact_table_incremental_only() + url_user_update_star_schema_initial() +} +class application_services << (P,yellow) Proxy >> { + +} +class AdminService << (P,red) Service >> { + +} +class ApplicationService << (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 >> { + +} +ApplicationServiceDownload "*" --> "1" ApplicationServiceConfig: cfg +user_views_frontend "1" --> "1" application_services: application_services +user_views_frontend "*" --> "1" ApplicationPage: page_info +user_celery_tasks "1" --> "1" application_services: application_services +user_views_for_tasks "1" --> "1" application_services: application_services +user_views_for_tasks "*" --> "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 +application_services "*" --> "1" UserService: user_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 +UserService "*" --> "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 +UserService : SQLAlchemy database +@enduml diff --git a/docs/blueprints/app_user/uml_requirements/user_use_cases.txt b/docs/blueprints/app_user/uml_requirements/user_use_cases.txt new file mode 100644 index 00000000..c72d3379 --- /dev/null +++ b/docs/blueprints/app_user/uml_requirements/user_use_cases.txt @@ -0,0 +1,60 @@ +@startuml +left to right direction +actor Visitor as vu +package user { + actor SysAdmin as su + actor Admin as au +} +package user_views_frontend { + usecase url_user_index as UC1 + usecase url_user_tasks as UC2 + usecase url_user_info as UC3 +} +package user_views_for_tasks { + usecase url_user_database_dump as UC51 + usecase url_user_database_dump_reimport as UC52 + usecase url_user_database_drop as UC53 + usecase url_user_download_all_files as UC54 + usecase url_user_alive_message_start as UC55 + usecase url_user_database_dropcreate_only as UC56 + usecase url_user_import_all_files as UC57 + usecase url_user_update_dimension_tables_only as UC58 + usecase url_user_update_fact_table_initial_only as UC59 + usecase url_user_update_fact_table_incremental_only as UC60 + usecase url_user_update_star_schema_initial as UC61 + usecase url_user_update_star_schema_incremental as UC62 +} +package user_celery_tasks { + usecase task_user_alive_message as UC105 + usecase task_user_database_drop_create as UC106 + usecase task_user_import_all_files as UC107 + usecase task_user_update_dimension_tables_only as UC108 + usecase task_user_update_fact_table_initial_only as UC109 + usecase task_user_update_fact_table_incremental_only as UC110 + usecase task_user_update_star_schema_initial as UC111 + usecase task_user_update_star_schema_incremental as UC112 +} +au --> UC1 +au --> UC2 +au --> UC3 +su --> UC51 +su --> UC52 +su --> UC53 +au --> UC54 +au --> UC55 +au --> UC56 +au --> UC57 +au --> UC58 +au --> UC59 +au --> UC60 +au --> UC61 +au --> UC62 +UC55 --> UC105 +UC56 --> UC106 +UC57 --> UC107 +UC58 --> UC108 +UC59 --> UC109 +UC60 --> UC110 +UC61 --> UC111 +UC62 --> UC112 +@enduml \ No newline at end of file diff --git a/docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.png b/docs/blueprints/ecdc/uml_implementation/ecdc_domain_model.png similarity index 100% rename from docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.png rename to docs/blueprints/ecdc/uml_implementation/ecdc_domain_model.png diff --git a/docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.txt b/docs/blueprints/ecdc/uml_implementation/ecdc_domain_model.txt similarity index 100% rename from docs/blueprints/ecdc/uml/domain_model/ecdc_domain_model.txt rename to docs/blueprints/ecdc/uml_implementation/ecdc_domain_model.txt diff --git a/docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.png b/docs/blueprints/ecdc/uml_implementation/ecdc_use_cases.png similarity index 100% rename from docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.png rename to docs/blueprints/ecdc/uml_implementation/ecdc_use_cases.png diff --git a/docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.txt b/docs/blueprints/ecdc/uml_implementation/ecdc_use_cases.txt similarity index 100% rename from docs/blueprints/ecdc/uml/use_cases/ecdc_use_cases.txt rename to docs/blueprints/ecdc/uml_implementation/ecdc_use_cases.txt diff --git a/docs/blueprints/ecdc/uml_requirements/ecdc_domain_model.txt b/docs/blueprints/ecdc/uml_requirements/ecdc_domain_model.txt new file mode 100644 index 00000000..4e708b3e --- /dev/null +++ b/docs/blueprints/ecdc/uml_requirements/ecdc_domain_model.txt @@ -0,0 +1,225 @@ +@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 EcdcDateReported { + id: Integer + dateiname: String + parent_dir: String + title: String + path_relative: String + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_kurse_all() +} +entity EcdcContinent { + id: Integer + dateiname: String + parent_dir: String + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_workflow_for_id(workflow_id: Integer) +} +entity EcdcCountry { + id: Integer + dateiname: String + parent_dir: String + title: String + lektion_nr: Integer + verified: Boolean + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_lektionen_for_workflow(workflow: Workflow) + {classifier} get_lektion_for_id(lektion_id: Integer) + {classifier} get_folien_for_lektion_id(lektion_id: Integer) + {classifier} get_all_verified() +} +entity EcdcData { + id: Integer + dateiname: String + parent_dir: String + title: String + lektion_nr: Integer + foliensatz_nr_in_lektion: Integer + get_absolute_path() + get_relative_path() + {classifier} get_foliensaetze_for_lektion(lektion: Lektion) + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) +} +entity ApplicationDateReported { + id: Integer + date_reported: String + year_week: String + datum: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_week: Integer + week_of_year: Integer + get_name_for_weekday() + {classifier} get_names_for_weekday() + {classifier} get_datum_parts(my_date_rep: String) + {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) + {classifier} create_new_object_factory(my_date_rep: String) +} +entity ApplicationRegion { + id: Integer + continent: String + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) +} +class ApplicationServiceDownload << (S,red) Service >> { + -log_error() + -log_success() + -prepare_download() + -download_with_wget() + -download_with_subprocess_and_os_native_wget() + download_file() +} +class ApplicationServiceConfig << (T,#FF7700) Transient >> { + limit_nr: Integer + data_path: String + slug: String + category: String + sub_category: String + tablename: String + cvsfile_name: String + url_src: String + cvsfile_path: String + msg_job: String + msg_ok: String + msg_error: String + create_config_for_who() + create_config_for_rki_vaccination() + create_config_for_owid() + create_config_for_ecdc() + create_config_for_rki_bundeslaender() + create_config_for_rki_landkreise() +} +class EcdcService << (S,red) Service >> { + pretask_database_drop_create() + task_database_drop_create() + run_download_only() + run_import_only() + run_update_dimension_tables_only() + run_update_fact_table_incremental_only() + run_update_fact_table_initial_only() + run_update_star_schema_incremental() + run_update_star_schema_initial() + download_all_files() + task_import_all_files() + update_dimension_tables_only() + update_fact_table_initial_only() + update_fact_table_incremental_only() +} +class EcdcServiceImport << (S,red) Service >> { + import_file() +} +class EcdcServiceUpdate << (S,red) Service >> { + -update_date_reported() + -update_continent() + -update_country() + -get_continent_from_import(ecdc_import: EcdcImport): + -get_country_from_import(ecdc_import: EcdcImport): + -get_date_reported_from_import() + -update_data_initial() + update_dimension_tables_only() + update_fact_table_initial_only() + update_star_schema_incremental() + update_star_schema_initial() +} +class ecdc_views_frontend << (B,orchid) Boundary >> { + url_ecdc_info() + url_ecdc_tasks() + url_ecdc_data_imported() + url_ecdc_date_reported_all() + url_ecdc_date_reported_one_notification_rate() + url_ecdc_date_reported_one_deaths_weekly() + url_ecdc_date_reported_one_cases_weekly() + url_ecdc_continent_all() + url_ecdc_continent_one() + url_ecdc_country_all() + url_ecdc_country_one() + url_ecdc_country_germany() +} +class ecdc_views_for_tasks << (B,orchid) Boundary >> { + task_ecdc_download_only() + task_who_import_only() + task_who_update_dimension_tables_only() + task_who_update_fact_table_initial_only() + task_who_update_fact_table_incremental_only() + task_who_update_star_schema_initial() + task_who_update_star_schema_incremental() +} +class ecdc_celery_tasks << (B,orchid) Boundary >> { + task_ecdc_download_only() + task_ecdc_import_only() + task_ecdc_update_dimension_tables_only() + task_ecdc_update_fact_table_initial_only() + task_ecdc_update_fact_table_incremental_only() + task_ecdc_update_star_schema_initial() + task_ecdc_update_star_schema_incremental() +} +ApplicationServiceDownload : SQLAlchemy database +EcdcServiceImport : SQLAlchemy database +EcdcServiceUpdate : SQLAlchemy database +EcdcService : SQLAlchemy database +ApplicationDateReported <|-- EcdcDateReported +ApplicationRegion <|-- EcdcContinent +EcdcCountry "1" *--> "*" EcdcContinent: continent +EcdcData "1" *--> "*" EcdcCountry: country +EcdcData "1" *--> "*" EcdcDateReported: date_reported +EcdcService "*" *--> "1" ApplicationServiceConfig: cfg +EcdcServiceImport "*" --> "1" ApplicationServiceConfig: cfg +EcdcServiceUpdate "*" --> "1" ApplicationServiceConfig: cfg +EcdcService "1" *--> "1" EcdcServiceImport: ecdc_service_import +EcdcService "1" *--> "1" EcdcServiceUpdate: ecdc_service_update +EcdcService "1" *--> "1" ApplicationServiceDownload: service_download +ecdc_views_frontend "1" --> "1" EcdcService: ecdc_service +ecdc_views_for_tasks "1" --> "1" EcdcService: ecdc_service +ecdc_celery_tasks "1" --> "1" EcdcService: ecdc_service +@enduml diff --git a/docs/blueprints/ecdc/uml_requirements/ecdc_use_cases.txt b/docs/blueprints/ecdc/uml_requirements/ecdc_use_cases.txt new file mode 100644 index 00000000..43bab7e8 --- /dev/null +++ b/docs/blueprints/ecdc/uml_requirements/ecdc_use_cases.txt @@ -0,0 +1,66 @@ +@startuml +left to right direction +actor Visitor as vu +package user { + actor SysAdmin as su + actor Admin as au +} +package ecdc_views_frontend { + usecase url_ecdc_info as UC1 + usecase url_ecdc_tasks as UC2 + usecase url_ecdc_data_imported as UC3 + usecase url_ecdc_date_reported_all as UC4 + usecase url_ecdc_date_reported_one_notification_rate as UC5 + usecase url_ecdc_date_reported_one_deaths_weekly as UC6 + usecase url_ecdc_date_reported_one_cases_weekly as UC7 + usecase url_ecdc_continent_all as UC8 + usecase url_ecdc_continent_one as UC9 + usecase url_ecdc_country_all as UC10 + usecase url_ecdc_country_one as UC11 + usecase url_ecdc_country_germany as UC12 +} +package ecdc_views_for_tasks { + usecase task_ecdc_download_only as UC50 + usecase task_who_import_only as UC51 + usecase task_who_update_dimension_tables_only as UC52 + usecase task_who_update_fact_table_initial_only as UC53 + usecase task_who_update_fact_table_incremental_only as UC54 + usecase task_who_update_star_schema_initial as UC55 + usecase task_who_update_star_schema_incremental as UC56 +} +package ecdc_celery_tasks { + usecase task_ecdc_download_only as UC100 + usecase task_ecdc_import_only as UC101 + usecase task_ecdc_update_dimension_tables_only as UC102 + usecase task_ecdc_update_fact_table_incremental_only as UC103 + usecase task_ecdc_update_fact_table_incremental_only as UC104 + usecase task_ecdc_update_fact_table_initial_only as UC105 + usecase task_ecdc_update_star_schema_incremental as UC106 +} +vu --> UC1 +vu --> UC2 +vu --> UC3 +vu --> UC4 +vu --> UC5 +vu --> UC6 +vu --> UC7 +vu --> UC8 +vu --> UC9 +vu --> UC10 +vu --> UC11 +vu --> UC12 +au --> UC50 +au --> UC51 +au --> UC52 +au --> UC53 +au --> UC54 +au --> UC55 +au --> UC56 +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/blueprints/intensivregister/uml/domain_model/owid_domain_model.txt b/docs/blueprints/intensivregister/uml_implementation/owid_domain_model.txt similarity index 100% rename from docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.txt rename to docs/blueprints/intensivregister/uml_implementation/owid_domain_model.txt diff --git a/docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.txt b/docs/blueprints/intensivregister/uml_implementation/owid_use_cases.txt similarity index 100% rename from docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.txt rename to docs/blueprints/intensivregister/uml_implementation/owid_use_cases.txt diff --git a/docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.png b/docs/blueprints/intensivregister/uml_requirements/owid_domain_model.png similarity index 100% rename from docs/blueprints/intensivregister/uml/domain_model/owid_domain_model.png rename to docs/blueprints/intensivregister/uml_requirements/owid_domain_model.png diff --git a/docs/blueprints/owid/uml/domain_model/owid_domain_model.txt b/docs/blueprints/intensivregister/uml_requirements/owid_domain_model.txt similarity index 100% rename from docs/blueprints/owid/uml/domain_model/owid_domain_model.txt rename to docs/blueprints/intensivregister/uml_requirements/owid_domain_model.txt diff --git a/docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.png b/docs/blueprints/intensivregister/uml_requirements/owid_use_cases.png similarity index 100% rename from docs/blueprints/intensivregister/uml/use_cases/owid_use_cases.png rename to docs/blueprints/intensivregister/uml_requirements/owid_use_cases.png diff --git a/docs/blueprints/owid/uml/use_cases/owid_use_cases.txt b/docs/blueprints/intensivregister/uml_requirements/owid_use_cases.txt similarity index 100% rename from docs/blueprints/owid/uml/use_cases/owid_use_cases.txt rename to docs/blueprints/intensivregister/uml_requirements/owid_use_cases.txt diff --git a/docs/blueprints/owid/uml/domain_model/owid_domain_model.png b/docs/blueprints/owid/uml_implementation/owid_domain_model.png similarity index 100% rename from docs/blueprints/owid/uml/domain_model/owid_domain_model.png rename to docs/blueprints/owid/uml_implementation/owid_domain_model.png diff --git a/docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.txt b/docs/blueprints/owid/uml_implementation/owid_domain_model.txt similarity index 100% rename from docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.txt rename to docs/blueprints/owid/uml_implementation/owid_domain_model.txt diff --git a/docs/blueprints/owid/uml/use_cases/owid_use_cases.png b/docs/blueprints/owid/uml_implementation/owid_use_cases.png similarity index 100% rename from docs/blueprints/owid/uml/use_cases/owid_use_cases.png rename to docs/blueprints/owid/uml_implementation/owid_use_cases.png diff --git a/docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.txt b/docs/blueprints/owid/uml_implementation/owid_use_cases.txt similarity index 100% rename from docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.txt rename to docs/blueprints/owid/uml_implementation/owid_use_cases.txt diff --git a/docs/blueprints/owid/uml_requirements/owid_domain_model.txt b/docs/blueprints/owid/uml_requirements/owid_domain_model.txt new file mode 100644 index 00000000..8836cb52 --- /dev/null +++ b/docs/blueprints/owid/uml_requirements/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_requirements/owid_use_cases.txt b/docs/blueprints/owid/uml_requirements/owid_use_cases.txt new file mode 100644 index 00000000..bbe591d1 --- /dev/null +++ b/docs/blueprints/owid/uml_requirements/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/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.png b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_1.png similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.png rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_1.png diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.txt b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_1.txt similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_1.txt rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_1.txt diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.png b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_2.png similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.png rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_2.png diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.txt b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_2.txt similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_2.txt rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_2.txt diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.png b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_3.png similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.png rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_3.png diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.txt b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_3.txt similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_3.txt rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_3.txt diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.png b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_4.png similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.png rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_4.png diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.txt b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_4.txt similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_4.txt rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_4.txt diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.png b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_5.png similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.png rename to docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_5.png diff --git a/docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.txt b/docs/blueprints/owid/use_cases__visual_data/owid_use_cases_visual_data_5.txt similarity index 100% rename from docs/blueprints/owid/uml/use_cases__visual_data/owid_use_cases_visual_data_5.txt rename to docs/blueprints/owid/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_implementation/owid_domain_model.png similarity index 100% rename from docs/blueprints/rki_cases/uml/domain_model/owid_domain_model.png rename to docs/blueprints/rki_cases/uml_implementation/owid_domain_model.png diff --git a/docs/blueprints/rki_cases/uml_implementation/owid_domain_model.txt b/docs/blueprints/rki_cases/uml_implementation/owid_domain_model.txt new file mode 100644 index 00000000..8836cb52 --- /dev/null +++ b/docs/blueprints/rki_cases/uml_implementation/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_implementation/owid_use_cases.png similarity index 100% rename from docs/blueprints/rki_cases/uml/use_cases/owid_use_cases.png rename to docs/blueprints/rki_cases/uml_implementation/owid_use_cases.png diff --git a/docs/blueprints/rki_cases/uml_implementation/owid_use_cases.txt b/docs/blueprints/rki_cases/uml_implementation/owid_use_cases.txt new file mode 100644 index 00000000..bbe591d1 --- /dev/null +++ b/docs/blueprints/rki_cases/uml_implementation/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/blueprints/rki_cases/uml_requirements/owid_domain_model.txt b/docs/blueprints/rki_cases/uml_requirements/owid_domain_model.txt new file mode 100644 index 00000000..8836cb52 --- /dev/null +++ b/docs/blueprints/rki_cases/uml_requirements/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_requirements/owid_use_cases.txt b/docs/blueprints/rki_cases/uml_requirements/owid_use_cases.txt new file mode 100644 index 00000000..bbe591d1 --- /dev/null +++ b/docs/blueprints/rki_cases/uml_requirements/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/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.png b/docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_domain_model.png similarity index 100% rename from docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.png rename to docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_domain_model.png diff --git a/docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.txt b/docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_domain_model.txt similarity index 100% rename from docs/blueprints/rki_vaccination/uml/domain_model/rki_vaccination_domain_model.txt rename to docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_domain_model.txt diff --git a/docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.png b/docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_use_cases.png similarity index 100% rename from docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.png rename to docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_use_cases.png diff --git a/docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.txt b/docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_use_cases.txt similarity index 100% rename from docs/blueprints/rki_vaccination/uml/use_cases/rki_vaccination_use_cases.txt rename to docs/blueprints/rki_vaccination/uml_implementation/rki_vaccination_use_cases.txt diff --git a/docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_domain_model.txt b/docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_domain_model.txt new file mode 100644 index 00000000..dfd7064b --- /dev/null +++ b/docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_domain_model.txt @@ -0,0 +1,203 @@ +@startuml +entity RkiVaccinationDateReported { + id: Integer + date_reported: String + year_week: String + datum: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_week: Integer + week_of_year: Integer + get_name_for_weekday() + {classifier} get_names_for_weekday() + {classifier} get_datum_parts(my_date_rep: String) + {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) + {classifier} create_new_object_factory(my_date_rep: String) +} +entity RkiVaccinationData { + id: Integer + dosen_kumulativ: Integer + dosen_differenz_zum_vortag: Integer + dosen_biontech_kumulativ: Integer + dosen_moderna_kumulativ: Integer + personen_erst_kumulativ: Integer + personen_voll_kumulativ: Integer + impf_quote_erst: Float + impf_quote_voll: Float + indikation_alter_dosen: Integer + indikation_beruf_dosen: Integer + indikation_medizinisch_dosen: Integer + indikation_pflegeheim_dosen: Integer + indikation_alter_erst: Integer + indikation_beruf_erst: Integer + indikation_medizinisch_erst: Integer + indikation_pflegeheim_erst: Integer + indikation_alter_voll: Integer + indikation_beruf_voll: Integer + indikation_medizinisch_voll: Integer + indikation_pflegeheim_voll: Integer + get_absolute_path() + get_relative_path() + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_all_as_dict() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} get_kurse_all() +} +entity RkiVaccinationImport { + datum: String + dosen_kumulativ: Integer + dosen_differenz_zum_vortag: Integer + dosen_biontech_kumulativ: Integer + dosen_moderna_kumulativ: Integer + personen_erst_kumulativ: Integer + personen_voll_kumulativ: Integer + impf_quote_erst: Float + impf_quote_voll: Float + indikation_alter_dosen: Integer + indikation_beruf_dosen: Integer + indikation_medizinisch_dosen: Integer + indikation_pflegeheim_dosen: Integer + indikation_alter_erst: Integer + indikation_beruf_erst: Integer + indikation_medizinisch_erst: Integer + indikation_pflegeheim_erst: Integer + indikation_alter_voll: Integer + indikation_beruf_voll: Integer + indikation_medizinisch_voll: Integer + indikation_pflegeheim_voll: Integer + + {classifier} remove_all() + {classifier} get_all_as_page(page: Integer) + {classifier} get_all() + {classifier} get_by_id(other_id: Integer) + {classifier} find_by_id(other_id: Integer) + {classifier} find_by_datum(other_datum: String) + {classifier} get_date_rep() + {classifier} get_date_reported_as_array() + {classifier} get_daterep_missing_in_vaccination_data() +} +entity ApplicationDateReported { + id: Integer + date_reported: String + year_week: String + datum: Date + year: Integer + month: Integer + day_of_month: Integer + day_of_week: Integer + week_of_year: Integer + get_name_for_weekday() + {classifier} get_names_for_weekday() + {classifier} get_datum_parts(my_date_rep: String) + {classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer) + {classifier} my_year_week(my_iso_year: Integer, week_number: Integer) + {classifier} create_new_object_factory(my_date_rep: String) +} +class ApplicationServiceDownload << (S,red) Service >> { + -log_error() + -log_success() + -prepare_download() + -download_with_wget() + -download_with_subprocess_and_os_native_wget() + download_file() +} +class ApplicationServiceConfig << (T,#FF7700) Transient >> { + limit_nr: Integer + data_path: String + slug: String + category: String + sub_category: String + tablename: String + cvsfile_name: String + url_src: String + cvsfile_path: String + msg_job: String + msg_ok: String + msg_error: String + create_config_for_who() + create_config_for_rki_vaccination() + create_config_for_owid() + create_config_for_ecdc() + create_config_for_rki_bundeslaender() + create_config_for_rki_landkreise() +} +class RkiVaccinationService << (S,red) Service >> { + pretask_database_drop_create() + task_database_drop_create() + run_download_only() + run_import_only() + run_update_dimension_tables_only() + run_update_fact_table_incremental_only() + run_update_fact_table_initial_only() + run_update_star_schema_incremental() + run_update_star_schema_initial() + download_all_files() + task_import_all_files() + update_dimension_tables_only() + update_fact_table_initial_only() + update_fact_table_incremental_only() +} +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_requirements/rki_vaccination_use_cases.txt b/docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_use_cases.txt new file mode 100644 index 00000000..705cc8ed --- /dev/null +++ b/docs/blueprints/rki_vaccination/uml_requirements/rki_vaccination_use_cases.txt @@ -0,0 +1,50 @@ +@startuml +left to right direction +actor Visitor as vu +package user { + actor SysAdmin as su + actor Admin as au +} +package rki_views_frontend { + usecase url_vaccination_info as UC1 + usecase url_vaccination_tasks as UC2 + usecase url_vaccination_imported as UC3 + usecase url_vaccination_data as UC4 +} +package rki_vaccination_views_for_tasks { + usecase task_who_download_only as UC50 + usecase task_who_import_only as UC51 + usecase task_who_update_dimension_tables_only as UC52 + usecase task_who_update_fact_table_initial_only as UC53 + usecase task_who_update_fact_table_incremental_only as UC54 + usecase task_who_update_star_schema_initial as UC55 + usecase task_who_update_star_schema_incremental as UC56 +} +package rki_vaccination_celery_tasks { + usecase url_vaccination_task_download_only as UC100 + usecase url_vaccination_task_import_only as UC101 + usecase url_vaccination_task_update_dimensiontables_only as UC102 + usecase url_vaccination_task_update_facttable_incremental_only as UC103 + usecase url_vaccination_task_update_facttable_initial_only as UC104 + usecase url_vaccination_task_update_starschema_initial as UC105 + usecase url_vaccination_task_update_starschema_incremental as UC106 +} +vu --> UC1 +vu --> UC2 +vu --> UC3 +vu --> UC4 +au --> UC50 +au --> UC51 +au --> UC52 +au --> UC53 +au --> UC54 +au --> UC55 +au --> UC56 +UC50 --> UC100 +UC51 --> UC101 +UC52 --> UC102 +UC53 --> UC103 +UC54 --> UC104 +UC55 --> UC105 +UC56 --> UC106 +@enduml \ No newline at end of file -- GitLab