From d413a06dc0a28273dea276834e920501fd133120 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Mon, 10 May 2021 22:16:12 +0200
Subject: [PATCH] working on: 0.0.34 Release

---
 .../uml/owid_domain_model_star_schema.puml    | 308 ++++--------------
 1 file changed, 56 insertions(+), 252 deletions(-)

diff --git a/docs/blueprints/owid/uml/owid_domain_model_star_schema.puml b/docs/blueprints/owid/uml/owid_domain_model_star_schema.puml
index db171a49..65f46599 100644
--- a/docs/blueprints/owid/uml/owid_domain_model_star_schema.puml
+++ b/docs/blueprints/owid/uml/owid_domain_model_star_schema.puml
@@ -1,61 +1,7 @@
 @startuml
 left to right direction
 
-
-package covid19.blueprints.all.model {
-
-	interface AllDateReported {
-	    id: Integer
-		date_reported:  String
-	    year_week:  String
-	    datum: Date
-	    year: Integer
-	    month: Integer
-	    day_of_month: Integer
-	    day_of_week: Integer
-	    week_of_year: Integer
-		get_name_for_weekday()
-		{classifier} get_names_for_weekday()
-		{classifier} get_datum_parts(my_date_rep: String)
-		{classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer)
-		{classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer)
-		{classifier} my_year_week(my_iso_year: Integer, week_number: Integer)
-		{classifier} create_new_object_factory(my_date_rep: String)
-	}
-	interface AllDateReported {
-	    id: Integer
-		date_reported:  String
-	    year_week:  String
-	    datum: Date
-	    year: Integer
-	    month: Integer
-	    day_of_month: Integer
-	    day_of_week: Integer
-	    week_of_year: Integer
-		get_name_for_weekday()
-		{classifier} get_names_for_weekday()
-		{classifier} get_datum_parts(my_date_rep: String)
-		{classifier} get_datum(my_year: Integer, my_month: Integer, my_day: Integer)
-		{classifier} get_datum_as_str(my_year: Integer, my_month: Integer, my_day: Integer)
-		{classifier} my_year_week(my_iso_year: Integer, week_number: Integer)
-		{classifier} create_new_object_factory(my_date_rep: String)
-	}
-	interface AllLocationGroup {
-	    id: Integer
-	    continent:  String
-	    {classifier} remove_all()
-	    {classifier} get_all_as_page(page: Integer)
-	    {classifier} get_all()
-	    {classifier} get_all_as_dict()
-	    {classifier} get_by_id(other_id: Integer)
-	    {classifier} find_by_id(other_id: Integer)
-	}
-	interface AllLocation {
-	    id: Integer
-    }
-	interface AllData {
-	    id: Integer
-	}
+package covid19.blueprints.all.model_import {
 
 	interface AllImportFull {
 		{classifier} download_file()
@@ -112,8 +58,7 @@ package covid19.blueprints.all.model {
 	}
 }
 
-
-package covid19.blueprints.owid {
+package covid19.blueprints.owid.model_import {
 	entity OwidImport {
 	    id: Integer
 		iso_code:  String
@@ -270,211 +215,70 @@ package covid19.blueprints.owid {
 		{classifier} get_data_for_location(location: String): OwidFlat[]
 		{classifier} get_data_for_day(datum_reported: Date): OwidFlat[]
 	}
-	entity OwidDateReported {
-	    id: Integer
-		date_reported:  String
-	    year_week:  String
-	    datum: Date
-	    year: Integer
-	    month: Integer
-	    day_of_month: Integer
-	    day_of_week: Integer
-	    week_of_year: Integer
-	    {classifier} remove_all()
-	    {classifier} get_all_as_page(page: Integer)
-	    {classifier} get_all()
-	    {classifier} get_all_as_dict()
-	    {classifier} get_by_id(other_id: Integer)
-	    {classifier} find_by_id(other_id: Integer)
-	}
-	entity OwidContinent {
-	    id: Integer
-	    continent:  String
-	    {classifier} remove_all()
-	    {classifier} get_all_as_page(page: Integer)
-	    {classifier} get_all()
-	    {classifier} get_all_as_dict()
-	    {classifier} get_by_id(other_id: Integer)
-	    {classifier} find_by_id(other_id: Integer)
-	}
-	entity OwidCountry {
-	    id: Integer
-		iso_code:  String
-	    location:  String
-	    stringency_index:  String
-	    population:  String
-	    population_density:  String
-	    median_age:  String
-	    aged_65_older:  String
-	    aged_70_older:  String
-	    gdp_per_capita:  String
-	    extreme_poverty:  String
-	    cardiovasc_death_rate:  String
-	    diabetes_prevalence:  String
-	    female_smokers:  String
-	    male_smokers:  String
-	    handwashing_facilities:  String
-	    hospital_beds_per_thousand:  String
-	    life_expectancy:  String
-	    human_development_index:  String
-	    {classifier} remove_all()
-	    {classifier} get_all_as_page(page: Integer)
-	    {classifier} get_all()
-	    {classifier} get_all_as_dict()
-	    {classifier} get_by_id(other_id: Integer)
-	    {classifier} find_by_id(other_id: Integer)
-	}
-	entity OwidData {
-	    id: Integer
-	    total_cases:  String
-	    new_cases:  String
-	    new_cases_smoothed:  String
-	    total_deaths:  String
-	    new_deaths:  String
-	    new_deaths_smoothed:  String
-	    total_cases_per_million:  String
-	    new_cases_per_million:  String
-	    new_cases_smoothed_per_million:  String
-	    total_deaths_per_million:  String
-	    new_deaths_per_million:  String
-	    new_deaths_smoothed_per_million:  String
-	    reproduction_rate:  String
-	    icu_patients:  String
-	    icu_patients_per_million:  String
-	    hosp_patients:  String
-	    hosp_patients_per_million:  String
-	    weekly_icu_admissions:  String
-	    weekly_icu_admissions_per_million:  String
-	    weekly_hosp_admissions:  String
-	    weekly_hosp_admissions_per_million:  String
-	    new_tests:  String
-	    total_tests:  String
-	    total_tests_per_thousand:  String
-	    new_tests_per_thousand:  String
-	    new_tests_smoothed:  String
-	    new_tests_smoothed_per_thousand:  String
-	    positive_rate:  String
-	    tests_per_case:  String
-	    tests_units:  String
-	    total_vaccinations:  String
-	    people_vaccinated:  String
-	    people_fully_vaccinated:  String
-	    new_vaccinations:  String
-	    new_vaccinations_smoothed:  String
-	    total_vaccinations_per_hundred:  String
-	    people_vaccinated_per_hundred:  String
-	    people_fully_vaccinated_per_hundred:  String
-	    new_vaccinations_smoothed_per_million:  String
-	    stringency_index:  String
-	    {classifier} remove_all()
-	    {classifier} get_all_as_page(page: Integer)
-	    {classifier} get_all()
-	    {classifier} get_all_as_dict()
-	    {classifier} get_by_id(other_id: Integer)
-	    {classifier} find_by_id(other_id: Integer)
-	}
+}
+
+
+package covid19.blueprints.all.model {
+	entity AllDateReported {}
+	entity AllLocationGroup {}
+	entity AllLocation {}
+	entity AllData {}
+}
+
+package covid19.blueprints.owid.model {
+	entity OwidDateReported {}
+	entity OwidContinent {}
+	entity OwidCountry {}
+	entity OwidData {}
+}
+
+package covid19.blueprints.all.service {
+	class AllServiceDownload  << (S,red) Service >> {}
+	class AllServiceConfig  << (S,red) Service >> {}
+}
+
+package covid19.blueprints.owid.service {
 	class OwidServiceImport << (S,red) Service >> {
 		import_file()
 	}
-	class OwidServiceUpdateBase << (S,red) Service >> {
-	}
-	class OwidServiceUpdateFull << (S,red) Service >> {
-		-full_update_date_reported()
-		-full_update_continent()
-		-full_update_country()
-		-full_update_fact_table()
-		-full_update_dimension_tables()
-		full_update_dimension_tables()
-		full_update_fact_table()
-		full_update_star_schema()
-	}
-	class OwidServiceUpdate << (S,red) Service >> {
-		-update_date_reported()
-		-full_update_continent()
-		-full_update_country()
-		-update_fact_table()
-	    -update_dimension_tables()
-		update_dimension_tables()
-		update_fact_table()
-		update_star_schema()
-		-get_new_dates_reported_from_import()
-	}
-	class OwidService << (S,red) Service >> {
-	    pretask_database_drop_create()
-	    task_database_drop_create()
-	    run_download_only()
-	    run_import_only()
-	    run_update_dimension_tables_only()
-	    run_update_fact_table_incremental_only()
-	    run_update_fact_table_initial_only()
-	    run_update_star_schema_incremental()
-	    run_update_star_schema_initial()
-	    download_all_files()
-	    task_import_all_files()
-	    update_dimension_tables_only()
-	    update_fact_table_initial_only()
-	    update_fact_table_incremental_only()
-	}
-	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()
-	}
+	class OwidService << (S,red) Service >> {}
+}
 
+package covid19.blueprints.owid.views {
+	class owid_views_frontend  << (B,orchid) Boundary >>  {}
+	class owid_views_for_tasks  << (B,orchid) Boundary >>  {}
+	class owid_celery_tasks  << (B,orchid) Boundary >>  {}
 }
-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
+
+AllImportFull <|-- AllImport
+AllImportIncrement <|-- AllImport
+AllImport <|-- AllFlat
+AllFlat <|-- OwidFlat
+
+AllImport <|-- OwidImport
+OwidImport <|-- OwidFlat
+
+AllDateReported <|-- OwidDateReported
+AllLocationGroup <|-- OwidContinent
+AllLocation <|--  OwidCountry
+AllData <|-- OwidData
+
 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
+
+OwidServiceImport : SQLAlchemy database
+OwidService : SQLAlchemy database
+AllServiceDownload : SQLAlchemy database
+
+OwidService "*" *--> "1"  AllServiceConfig : cfg
+OwidServiceImport "*" --> "1"  AllServiceConfig : cfg
+
 OwidService "1" *--> "1" OwidServiceImport : owid_service_import
-OwidService "1" *--> "1" OwidServiceUpdate : owid_service_update
-OwidService "1" *--> "1" OwidServiceUpdateFull : owid_service_update
-OwidService "1" *--> "1" ApplicationServiceDownload : service_download
+OwidService "1" *--> "1" AllServiceDownload : owid_service_dowload
+
 owid_views_frontend "1" --> "1" OwidService : owid_service
 owid_views_for_tasks "1" --> "1" OwidService : owid_service
 owid_celery_tasks "1" --> "1" OwidService : owid_service
-AllImportFull <|-- DataImport
-AllImportIncrement <|-- DataImport
-DataImport <|-- AllFlat
-DataImport <|-- OwidImport
-AllFlat <|-- OwidFlat
-OwidImport <|-- OwidFlat
+
 @enduml
-- 
GitLab