From 7374dba1988457de0176d7d2ab7e84153b78d0bc Mon Sep 17 00:00:00 2001 From: Pak Kin Lau Date: Sun, 24 Dec 2023 02:16:03 +0800 Subject: [PATCH] Automated add-commit-push. Datetime tag: 24/12/2023 02:16:03 --- gites.svg | 13 --- gites/classes_gites.puml | 80 +++++++++++++++ gites/gites.svg | 199 -------------------------------------- gites/output.dot | 37 +++++++ gites/packages_gites.puml | 46 +++++++++ 5 files changed, 163 insertions(+), 212 deletions(-) delete mode 100644 gites.svg create mode 100644 gites/classes_gites.puml delete mode 100644 gites/gites.svg create mode 100644 gites/output.dot create mode 100644 gites/packages_gites.puml diff --git a/gites.svg b/gites.svg deleted file mode 100644 index 32aaee9..0000000 --- a/gites.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -G - - - diff --git a/gites/classes_gites.puml b/gites/classes_gites.puml new file mode 100644 index 0000000..6b0ff54 --- /dev/null +++ b/gites/classes_gites.puml @@ -0,0 +1,80 @@ +@startuml classes_gites +set namespaceSeparator none +class "ConfigJSONHandler" as gites.subpackage.config_json_handler.ConfigJSONHandler { + config_data : dict + config_json_path + default_datastore_json_name + gites_datastore_json_location + json_initial_setup_check + root_dir_of_gites_datastore_json + check_initial_setup_then_get_datastore_json_address() +} +class "CreateRepoManager" as gites.subpackage.creat_repo_manager.CreateRepoManager { + datastore_json_handler + new_created_repo_folder_name + new_created_repo_url + check_remote_origin() + initialize_repo() + run(cmd) +} +class "DatastoreJSONHandler" as gites.subpackage.datastore_json_handler.DatastoreJSONHandler { + config_json_handler + data : dict + gites_datastore_json_location + list_of_repo_details + root_dir + get_root_directory() + load_datastore_json() +} +class "GitPullManager" as gites.subpackage.pull_manager.GitPullManager { + datastore_json_handler + failed_repo : list + no_effect_repo : list + repo_list + repo_that_remote_has_new_update : list + root_folder + success_repo : list + lpull() +} +class "GitPushManager" as gites.subpackage.git_push_manager.GitPushManager { + datastore_json_handler + failed_repo : list + no_effect_repo : list + repo_list + repo_that_remote_has_new_update : list + root_folder + success_repo : list + lpush() +} +class "RepoCloner" as gites.subpackage.repo_cloner.RepoCloner { + datastore_json_handler + failed : list + list_of_repo_details + no_effect : list + root_folder + success : list + clone_repo(remote_url, local_path) + clone_repositories() + lclone() + print_summary() +} +class "TestConfigJSONHandler" as gites.tests.test_datastore_json_handler.TestConfigJSONHandler { + gites_datastore_json_location : str +} +class "TestDatastoreJSONHandler" as gites.tests.test_datastore_json_handler.TestDatastoreJSONHandler { + mock_config : AsyncMock, MagicMock, dict + mock_datastore_data : dict + setUp() + test_get_root_directory_linux() + test_get_root_directory_windows() + test_load_datastore_json() +} +class "_SubprocessHandler" as gites.subpackage._subprocess_handler._SubprocessHandler { + run(command, running_location) +} +gites.subpackage.config_json_handler.ConfigJSONHandler --* gites.subpackage.datastore_json_handler.DatastoreJSONHandler : config_json_handler +gites.subpackage.datastore_json_handler.DatastoreJSONHandler --* gites.subpackage.creat_repo_manager.CreateRepoManager : datastore_json_handler +gites.subpackage.datastore_json_handler.DatastoreJSONHandler --* gites.subpackage.git_push_manager.GitPushManager : datastore_json_handler +gites.subpackage.datastore_json_handler.DatastoreJSONHandler --* gites.subpackage.pull_manager.GitPullManager : datastore_json_handler +gites.subpackage.datastore_json_handler.DatastoreJSONHandler --* gites.subpackage.repo_cloner.RepoCloner : datastore_json_handler +@enduml diff --git a/gites/gites.svg b/gites/gites.svg deleted file mode 100644 index dfeceb8..0000000 --- a/gites/gites.svg +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -G - - - -gites_cli - -gites.cli - - - -gites_subpackage - -gites. -subpackage - - - -gites_subpackage->gites_cli - - - - - -gites_tests_test_datastore_json_handler - -gites. -tests. -test_datastore_json_handler - - - -gites_subpackage->gites_tests_test_datastore_json_handler - - - - - - -gites_subpackage__subprocess_handler - -gites. -subpackage. -_subprocess_handler - - - -gites_subpackage_creat_repo_manager - -gites. -subpackage. -creat_repo_manager - - - -gites_subpackage__subprocess_handler->gites_subpackage_creat_repo_manager - - - - - -gites_subpackage_git_push_manager - -gites. -subpackage. -git_push_manager - - - -gites_subpackage__subprocess_handler->gites_subpackage_git_push_manager - - - - - -gites_subpackage_pull_manager - -gites. -subpackage. -pull_manager - - - -gites_subpackage__subprocess_handler->gites_subpackage_pull_manager - - - - - -gites_subpackage_repo_cloner - -gites. -subpackage. -repo_cloner - - - -gites_subpackage__subprocess_handler->gites_subpackage_repo_cloner - - - - - -gites_subpackage__timing - -gites. -subpackage. -_timing - - - -gites_subpackage__timing->gites_subpackage_repo_cloner - - - - - -gites_subpackage_config_json_handler - -gites. -subpackage. -config_json_handler - - - -gites_subpackage_config_json_handler->gites_cli - - - - - - -gites_subpackage_datastore_json_handler - -gites. -subpackage. -datastore_json_handler - - - -gites_subpackage_config_json_handler->gites_subpackage_datastore_json_handler - - - - - -gites_subpackage_datastore_json_handler->gites_subpackage_creat_repo_manager - - - - - -gites_subpackage_datastore_json_handler->gites_subpackage_git_push_manager - - - - - -gites_subpackage_datastore_json_handler->gites_subpackage_pull_manager - - - - - -gites_subpackage_datastore_json_handler->gites_subpackage_repo_cloner - - - - - -gites_subpackage_datastore_json_handler->gites_tests_test_datastore_json_handler - - - - - -gites_subpackage_git_push_manager->gites_cli - - - - -gites_subpackage_pull_manager->gites_cli - - - - -gites_subpackage_repo_cloner->gites_cli - - - - diff --git a/gites/output.dot b/gites/output.dot new file mode 100644 index 0000000..fce5881 --- /dev/null +++ b/gites/output.dot @@ -0,0 +1,37 @@ + +digraph G { + concentrate = true; + + rankdir = TB; + node [style=filled,fillcolor="#ffffff",fontcolor="#000000",fontname=Helvetica,fontsize=10]; + + gites_cli [fillcolor="#964040",fontcolor="#ffffff",label="gites.cli"]; + gites_subpackage [fillcolor="#f31616",fontcolor="#ffffff",label="gites\.\nsubpackage"]; + gites_subpackage__subprocess_handler [fillcolor="#e72222",fontcolor="#ffffff",label="gites\.\nsubpackage\.\n_subprocess_handler"]; + gites_subpackage__timing [fillcolor="#c24747",fontcolor="#ffffff",label="gites\.\nsubpackage\.\n_timing"]; + gites_subpackage_config_json_handler [fillcolor="#ce3b3b",fontcolor="#ffffff",label="gites\.\nsubpackage\.\nconfig_json_handler"]; + gites_subpackage_creat_repo_manager [fillcolor="#ac4949",fontcolor="#ffffff",label="gites\.\nsubpackage\.\ncreat_repo_manager"]; + gites_subpackage_datastore_json_handler [fillcolor="#f30c0c",fontcolor="#ffffff",label="gites\.\nsubpackage\.\ndatastore_json_handler"]; + gites_subpackage_git_push_manager [fillcolor="#a83838",fontcolor="#ffffff",label="gites\.\nsubpackage\.\ngit_push_manager"]; + gites_subpackage_pull_manager [fillcolor="#a83838",fontcolor="#ffffff",label="gites\.\nsubpackage\.\npull_manager"]; + gites_subpackage_repo_cloner [fillcolor="#a13535",fontcolor="#ffffff",label="gites\.\nsubpackage\.\nrepo_cloner"]; + gites_tests_test_datastore_json_handler [fillcolor="#ac4949",fontcolor="#ffffff",label="gites\.\ntests\.\ntest_datastore_json_handler"]; + gites_subpackage -> gites_cli [fillcolor="#f31616"]; + gites_subpackage -> gites_tests_test_datastore_json_handler [fillcolor="#f31616",minlen="2"]; + gites_subpackage__subprocess_handler -> gites_subpackage_creat_repo_manager [fillcolor="#e72222",weight="2"]; + gites_subpackage__subprocess_handler -> gites_subpackage_git_push_manager [fillcolor="#e72222",weight="2"]; + gites_subpackage__subprocess_handler -> gites_subpackage_pull_manager [fillcolor="#e72222",weight="2"]; + gites_subpackage__subprocess_handler -> gites_subpackage_repo_cloner [fillcolor="#e72222",weight="2"]; + gites_subpackage__timing -> gites_subpackage_repo_cloner [fillcolor="#c24747",weight="2"]; + gites_subpackage_config_json_handler -> gites_cli [fillcolor="#ce3b3b",minlen="2"]; + gites_subpackage_config_json_handler -> gites_subpackage_datastore_json_handler [fillcolor="#ce3b3b",weight="2"]; + gites_subpackage_datastore_json_handler -> gites_subpackage_creat_repo_manager [fillcolor="#f30c0c",weight="2"]; + gites_subpackage_datastore_json_handler -> gites_subpackage_git_push_manager [fillcolor="#f30c0c",weight="2"]; + gites_subpackage_datastore_json_handler -> gites_subpackage_pull_manager [fillcolor="#f30c0c",weight="2"]; + gites_subpackage_datastore_json_handler -> gites_subpackage_repo_cloner [fillcolor="#f30c0c",weight="2"]; + gites_subpackage_datastore_json_handler -> gites_tests_test_datastore_json_handler [fillcolor="#f30c0c",minlen="2"]; + gites_subpackage_git_push_manager -> gites_cli [fillcolor="#a83838",minlen="2"]; + gites_subpackage_pull_manager -> gites_cli [fillcolor="#a83838",minlen="2"]; + gites_subpackage_repo_cloner -> gites_cli [fillcolor="#a13535",minlen="2"]; +} + diff --git a/gites/packages_gites.puml b/gites/packages_gites.puml new file mode 100644 index 0000000..f8d252d --- /dev/null +++ b/gites/packages_gites.puml @@ -0,0 +1,46 @@ +@startuml packages_gites +set namespaceSeparator none +package "gites" as gites { +} +package "gites.cli" as gites.cli { +} +package "gites.subpackage" as gites.subpackage { +} +package "gites.subpackage._subprocess_handler" as gites.subpackage._subprocess_handler { +} +package "gites.subpackage._timing" as gites.subpackage._timing { +} +package "gites.subpackage.config_json_handler" as gites.subpackage.config_json_handler { +} +package "gites.subpackage.creat_repo_manager" as gites.subpackage.creat_repo_manager { +} +package "gites.subpackage.datastore_json_handler" as gites.subpackage.datastore_json_handler { +} +package "gites.subpackage.git_push_manager" as gites.subpackage.git_push_manager { +} +package "gites.subpackage.pull_manager" as gites.subpackage.pull_manager { +} +package "gites.subpackage.repo_cloner" as gites.subpackage.repo_cloner { +} +package "gites.subpackage.util" as gites.subpackage.util { +} +package "gites.tests" as gites.tests { +} +package "gites.tests.test_datastore_json_handler" as gites.tests.test_datastore_json_handler { +} +gites.cli --> gites.subpackage.config_json_handler +gites.cli --> gites.subpackage.git_push_manager +gites.cli --> gites.subpackage.pull_manager +gites.cli --> gites.subpackage.repo_cloner +gites.subpackage.creat_repo_manager --> gites.subpackage._subprocess_handler +gites.subpackage.creat_repo_manager --> gites.subpackage.datastore_json_handler +gites.subpackage.creat_repo_manager --> gites.subpackage.util +gites.subpackage.datastore_json_handler --> gites.subpackage.config_json_handler +gites.subpackage.git_push_manager --> gites.subpackage._subprocess_handler +gites.subpackage.git_push_manager --> gites.subpackage.datastore_json_handler +gites.subpackage.pull_manager --> gites.subpackage._subprocess_handler +gites.subpackage.pull_manager --> gites.subpackage.datastore_json_handler +gites.subpackage.repo_cloner --> gites.subpackage._subprocess_handler +gites.subpackage.repo_cloner --> gites.subpackage._timing +gites.subpackage.repo_cloner --> gites.subpackage.datastore_json_handler +@enduml