From a9c62055696e147f4e412a616e0975cad82fcc67 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 08:50:04 -0500 Subject: [PATCH 01/14] Renamed mepo.d -> src/mepo --- {mepo.d => src/mepo}/cmdline/branch_parser.py | 0 {mepo.d => src/mepo}/cmdline/config_parser.py | 0 {mepo.d => src/mepo}/cmdline/parser.py | 0 {mepo.d => src/mepo}/cmdline/stash_parser.py | 0 {mepo.d => src/mepo}/cmdline/tag_parser.py | 0 {mepo.d => src/mepo}/command/branch/branch.py | 0 {mepo.d => src/mepo}/command/branch/create/create.py | 0 {mepo.d => src/mepo}/command/branch/delete/delete.py | 0 {mepo.d => src/mepo}/command/branch/list/list.py | 0 {mepo.d => src/mepo}/command/changed-files/changed-files.py | 0 .../mepo}/command/checkout-if-exists/checkout-if-exists.py | 0 {mepo.d => src/mepo}/command/checkout/checkout.py | 0 {mepo.d => src/mepo}/command/clone/clone.py | 0 {mepo.d => src/mepo}/command/command.py | 0 {mepo.d => src/mepo}/command/commit/commit.py | 0 {mepo.d => src/mepo}/command/compare/compare.py | 0 {mepo.d => src/mepo}/command/config/config.py | 0 {mepo.d => src/mepo}/command/config/delete/delete.py | 0 {mepo.d => src/mepo}/command/config/get/get.py | 0 {mepo.d => src/mepo}/command/config/print/print.py | 0 {mepo.d => src/mepo}/command/config/set/set.py | 0 {mepo.d => src/mepo}/command/develop/develop.py | 0 {mepo.d => src/mepo}/command/diff/diff.py | 0 {mepo.d => src/mepo}/command/fetch/fetch.py | 0 {mepo.d => src/mepo}/command/init/init.py | 0 {mepo.d => src/mepo}/command/list/list.py | 0 {mepo.d => src/mepo}/command/pull-all/pull-all.py | 0 {mepo.d => src/mepo}/command/pull/pull.py | 0 {mepo.d => src/mepo}/command/push/push.py | 0 {mepo.d => src/mepo}/command/reset/reset.py | 0 {mepo.d => src/mepo}/command/restore-state/restore-state.py | 0 {mepo.d => src/mepo}/command/save/save.py | 0 {mepo.d => src/mepo}/command/stage/stage.py | 0 {mepo.d => src/mepo}/command/stash/apply/apply.py | 0 {mepo.d => src/mepo}/command/stash/list/list.py | 0 {mepo.d => src/mepo}/command/stash/pop/pop.py | 0 {mepo.d => src/mepo}/command/stash/push/push.py | 0 {mepo.d => src/mepo}/command/stash/show/show.py | 0 {mepo.d => src/mepo}/command/stash/stash.py | 0 {mepo.d => src/mepo}/command/status/status.py | 0 {mepo.d => src/mepo}/command/tag/create/create.py | 0 {mepo.d => src/mepo}/command/tag/delete/delete.py | 0 {mepo.d => src/mepo}/command/tag/list/list.py | 0 {mepo.d => src/mepo}/command/tag/push/push.py | 0 {mepo.d => src/mepo}/command/tag/tag.py | 0 {mepo.d => src/mepo}/command/unstage/unstage.py | 0 {mepo.d => src/mepo}/command/whereis/whereis.py | 0 {mepo.d => src/mepo}/config/config_file.py | 0 {mepo.d => src/mepo}/main.py | 0 {mepo.d => src/mepo}/repository/git.py | 0 {mepo.d => src/mepo}/state/component.py | 0 {mepo.d => src/mepo}/state/exceptions.py | 0 {mepo.d => src/mepo}/state/state.py | 0 {mepo.d => src/mepo}/utest/input/args.py | 0 {mepo.d => src/mepo}/utest/input/components.yaml | 0 {mepo.d => src/mepo}/utest/output/compare_brief_output.txt | 0 {mepo.d => src/mepo}/utest/output/compare_full_output.txt | 0 {mepo.d => src/mepo}/utest/output/list_output.txt | 0 {mepo.d => src/mepo}/utest/output/status_output.txt | 0 {mepo.d => src/mepo}/utest/test_mepo_commands.py | 0 {mepo.d => src/mepo}/utilities/colors.py | 0 {mepo.d => src/mepo}/utilities/mepoconfig.py | 0 {mepo.d => src/mepo}/utilities/shellcmd.py | 0 {mepo.d => src/mepo}/utilities/verify.py | 0 {mepo.d => src/mepo}/utilities/version.py | 0 65 files changed, 0 insertions(+), 0 deletions(-) rename {mepo.d => src/mepo}/cmdline/branch_parser.py (100%) rename {mepo.d => src/mepo}/cmdline/config_parser.py (100%) rename {mepo.d => src/mepo}/cmdline/parser.py (100%) rename {mepo.d => src/mepo}/cmdline/stash_parser.py (100%) rename {mepo.d => src/mepo}/cmdline/tag_parser.py (100%) rename {mepo.d => src/mepo}/command/branch/branch.py (100%) rename {mepo.d => src/mepo}/command/branch/create/create.py (100%) rename {mepo.d => src/mepo}/command/branch/delete/delete.py (100%) rename {mepo.d => src/mepo}/command/branch/list/list.py (100%) rename {mepo.d => src/mepo}/command/changed-files/changed-files.py (100%) rename {mepo.d => src/mepo}/command/checkout-if-exists/checkout-if-exists.py (100%) rename {mepo.d => src/mepo}/command/checkout/checkout.py (100%) rename {mepo.d => src/mepo}/command/clone/clone.py (100%) rename {mepo.d => src/mepo}/command/command.py (100%) rename {mepo.d => src/mepo}/command/commit/commit.py (100%) rename {mepo.d => src/mepo}/command/compare/compare.py (100%) rename {mepo.d => src/mepo}/command/config/config.py (100%) rename {mepo.d => src/mepo}/command/config/delete/delete.py (100%) rename {mepo.d => src/mepo}/command/config/get/get.py (100%) rename {mepo.d => src/mepo}/command/config/print/print.py (100%) rename {mepo.d => src/mepo}/command/config/set/set.py (100%) rename {mepo.d => src/mepo}/command/develop/develop.py (100%) rename {mepo.d => src/mepo}/command/diff/diff.py (100%) rename {mepo.d => src/mepo}/command/fetch/fetch.py (100%) rename {mepo.d => src/mepo}/command/init/init.py (100%) rename {mepo.d => src/mepo}/command/list/list.py (100%) rename {mepo.d => src/mepo}/command/pull-all/pull-all.py (100%) rename {mepo.d => src/mepo}/command/pull/pull.py (100%) rename {mepo.d => src/mepo}/command/push/push.py (100%) rename {mepo.d => src/mepo}/command/reset/reset.py (100%) rename {mepo.d => src/mepo}/command/restore-state/restore-state.py (100%) rename {mepo.d => src/mepo}/command/save/save.py (100%) rename {mepo.d => src/mepo}/command/stage/stage.py (100%) rename {mepo.d => src/mepo}/command/stash/apply/apply.py (100%) rename {mepo.d => src/mepo}/command/stash/list/list.py (100%) rename {mepo.d => src/mepo}/command/stash/pop/pop.py (100%) rename {mepo.d => src/mepo}/command/stash/push/push.py (100%) rename {mepo.d => src/mepo}/command/stash/show/show.py (100%) rename {mepo.d => src/mepo}/command/stash/stash.py (100%) rename {mepo.d => src/mepo}/command/status/status.py (100%) rename {mepo.d => src/mepo}/command/tag/create/create.py (100%) rename {mepo.d => src/mepo}/command/tag/delete/delete.py (100%) rename {mepo.d => src/mepo}/command/tag/list/list.py (100%) rename {mepo.d => src/mepo}/command/tag/push/push.py (100%) rename {mepo.d => src/mepo}/command/tag/tag.py (100%) rename {mepo.d => src/mepo}/command/unstage/unstage.py (100%) rename {mepo.d => src/mepo}/command/whereis/whereis.py (100%) rename {mepo.d => src/mepo}/config/config_file.py (100%) rename {mepo.d => src/mepo}/main.py (100%) rename {mepo.d => src/mepo}/repository/git.py (100%) rename {mepo.d => src/mepo}/state/component.py (100%) rename {mepo.d => src/mepo}/state/exceptions.py (100%) rename {mepo.d => src/mepo}/state/state.py (100%) rename {mepo.d => src/mepo}/utest/input/args.py (100%) rename {mepo.d => src/mepo}/utest/input/components.yaml (100%) rename {mepo.d => src/mepo}/utest/output/compare_brief_output.txt (100%) rename {mepo.d => src/mepo}/utest/output/compare_full_output.txt (100%) rename {mepo.d => src/mepo}/utest/output/list_output.txt (100%) rename {mepo.d => src/mepo}/utest/output/status_output.txt (100%) rename {mepo.d => src/mepo}/utest/test_mepo_commands.py (100%) rename {mepo.d => src/mepo}/utilities/colors.py (100%) rename {mepo.d => src/mepo}/utilities/mepoconfig.py (100%) rename {mepo.d => src/mepo}/utilities/shellcmd.py (100%) rename {mepo.d => src/mepo}/utilities/verify.py (100%) rename {mepo.d => src/mepo}/utilities/version.py (100%) diff --git a/mepo.d/cmdline/branch_parser.py b/src/mepo/cmdline/branch_parser.py similarity index 100% rename from mepo.d/cmdline/branch_parser.py rename to src/mepo/cmdline/branch_parser.py diff --git a/mepo.d/cmdline/config_parser.py b/src/mepo/cmdline/config_parser.py similarity index 100% rename from mepo.d/cmdline/config_parser.py rename to src/mepo/cmdline/config_parser.py diff --git a/mepo.d/cmdline/parser.py b/src/mepo/cmdline/parser.py similarity index 100% rename from mepo.d/cmdline/parser.py rename to src/mepo/cmdline/parser.py diff --git a/mepo.d/cmdline/stash_parser.py b/src/mepo/cmdline/stash_parser.py similarity index 100% rename from mepo.d/cmdline/stash_parser.py rename to src/mepo/cmdline/stash_parser.py diff --git a/mepo.d/cmdline/tag_parser.py b/src/mepo/cmdline/tag_parser.py similarity index 100% rename from mepo.d/cmdline/tag_parser.py rename to src/mepo/cmdline/tag_parser.py diff --git a/mepo.d/command/branch/branch.py b/src/mepo/command/branch/branch.py similarity index 100% rename from mepo.d/command/branch/branch.py rename to src/mepo/command/branch/branch.py diff --git a/mepo.d/command/branch/create/create.py b/src/mepo/command/branch/create/create.py similarity index 100% rename from mepo.d/command/branch/create/create.py rename to src/mepo/command/branch/create/create.py diff --git a/mepo.d/command/branch/delete/delete.py b/src/mepo/command/branch/delete/delete.py similarity index 100% rename from mepo.d/command/branch/delete/delete.py rename to src/mepo/command/branch/delete/delete.py diff --git a/mepo.d/command/branch/list/list.py b/src/mepo/command/branch/list/list.py similarity index 100% rename from mepo.d/command/branch/list/list.py rename to src/mepo/command/branch/list/list.py diff --git a/mepo.d/command/changed-files/changed-files.py b/src/mepo/command/changed-files/changed-files.py similarity index 100% rename from mepo.d/command/changed-files/changed-files.py rename to src/mepo/command/changed-files/changed-files.py diff --git a/mepo.d/command/checkout-if-exists/checkout-if-exists.py b/src/mepo/command/checkout-if-exists/checkout-if-exists.py similarity index 100% rename from mepo.d/command/checkout-if-exists/checkout-if-exists.py rename to src/mepo/command/checkout-if-exists/checkout-if-exists.py diff --git a/mepo.d/command/checkout/checkout.py b/src/mepo/command/checkout/checkout.py similarity index 100% rename from mepo.d/command/checkout/checkout.py rename to src/mepo/command/checkout/checkout.py diff --git a/mepo.d/command/clone/clone.py b/src/mepo/command/clone/clone.py similarity index 100% rename from mepo.d/command/clone/clone.py rename to src/mepo/command/clone/clone.py diff --git a/mepo.d/command/command.py b/src/mepo/command/command.py similarity index 100% rename from mepo.d/command/command.py rename to src/mepo/command/command.py diff --git a/mepo.d/command/commit/commit.py b/src/mepo/command/commit/commit.py similarity index 100% rename from mepo.d/command/commit/commit.py rename to src/mepo/command/commit/commit.py diff --git a/mepo.d/command/compare/compare.py b/src/mepo/command/compare/compare.py similarity index 100% rename from mepo.d/command/compare/compare.py rename to src/mepo/command/compare/compare.py diff --git a/mepo.d/command/config/config.py b/src/mepo/command/config/config.py similarity index 100% rename from mepo.d/command/config/config.py rename to src/mepo/command/config/config.py diff --git a/mepo.d/command/config/delete/delete.py b/src/mepo/command/config/delete/delete.py similarity index 100% rename from mepo.d/command/config/delete/delete.py rename to src/mepo/command/config/delete/delete.py diff --git a/mepo.d/command/config/get/get.py b/src/mepo/command/config/get/get.py similarity index 100% rename from mepo.d/command/config/get/get.py rename to src/mepo/command/config/get/get.py diff --git a/mepo.d/command/config/print/print.py b/src/mepo/command/config/print/print.py similarity index 100% rename from mepo.d/command/config/print/print.py rename to src/mepo/command/config/print/print.py diff --git a/mepo.d/command/config/set/set.py b/src/mepo/command/config/set/set.py similarity index 100% rename from mepo.d/command/config/set/set.py rename to src/mepo/command/config/set/set.py diff --git a/mepo.d/command/develop/develop.py b/src/mepo/command/develop/develop.py similarity index 100% rename from mepo.d/command/develop/develop.py rename to src/mepo/command/develop/develop.py diff --git a/mepo.d/command/diff/diff.py b/src/mepo/command/diff/diff.py similarity index 100% rename from mepo.d/command/diff/diff.py rename to src/mepo/command/diff/diff.py diff --git a/mepo.d/command/fetch/fetch.py b/src/mepo/command/fetch/fetch.py similarity index 100% rename from mepo.d/command/fetch/fetch.py rename to src/mepo/command/fetch/fetch.py diff --git a/mepo.d/command/init/init.py b/src/mepo/command/init/init.py similarity index 100% rename from mepo.d/command/init/init.py rename to src/mepo/command/init/init.py diff --git a/mepo.d/command/list/list.py b/src/mepo/command/list/list.py similarity index 100% rename from mepo.d/command/list/list.py rename to src/mepo/command/list/list.py diff --git a/mepo.d/command/pull-all/pull-all.py b/src/mepo/command/pull-all/pull-all.py similarity index 100% rename from mepo.d/command/pull-all/pull-all.py rename to src/mepo/command/pull-all/pull-all.py diff --git a/mepo.d/command/pull/pull.py b/src/mepo/command/pull/pull.py similarity index 100% rename from mepo.d/command/pull/pull.py rename to src/mepo/command/pull/pull.py diff --git a/mepo.d/command/push/push.py b/src/mepo/command/push/push.py similarity index 100% rename from mepo.d/command/push/push.py rename to src/mepo/command/push/push.py diff --git a/mepo.d/command/reset/reset.py b/src/mepo/command/reset/reset.py similarity index 100% rename from mepo.d/command/reset/reset.py rename to src/mepo/command/reset/reset.py diff --git a/mepo.d/command/restore-state/restore-state.py b/src/mepo/command/restore-state/restore-state.py similarity index 100% rename from mepo.d/command/restore-state/restore-state.py rename to src/mepo/command/restore-state/restore-state.py diff --git a/mepo.d/command/save/save.py b/src/mepo/command/save/save.py similarity index 100% rename from mepo.d/command/save/save.py rename to src/mepo/command/save/save.py diff --git a/mepo.d/command/stage/stage.py b/src/mepo/command/stage/stage.py similarity index 100% rename from mepo.d/command/stage/stage.py rename to src/mepo/command/stage/stage.py diff --git a/mepo.d/command/stash/apply/apply.py b/src/mepo/command/stash/apply/apply.py similarity index 100% rename from mepo.d/command/stash/apply/apply.py rename to src/mepo/command/stash/apply/apply.py diff --git a/mepo.d/command/stash/list/list.py b/src/mepo/command/stash/list/list.py similarity index 100% rename from mepo.d/command/stash/list/list.py rename to src/mepo/command/stash/list/list.py diff --git a/mepo.d/command/stash/pop/pop.py b/src/mepo/command/stash/pop/pop.py similarity index 100% rename from mepo.d/command/stash/pop/pop.py rename to src/mepo/command/stash/pop/pop.py diff --git a/mepo.d/command/stash/push/push.py b/src/mepo/command/stash/push/push.py similarity index 100% rename from mepo.d/command/stash/push/push.py rename to src/mepo/command/stash/push/push.py diff --git a/mepo.d/command/stash/show/show.py b/src/mepo/command/stash/show/show.py similarity index 100% rename from mepo.d/command/stash/show/show.py rename to src/mepo/command/stash/show/show.py diff --git a/mepo.d/command/stash/stash.py b/src/mepo/command/stash/stash.py similarity index 100% rename from mepo.d/command/stash/stash.py rename to src/mepo/command/stash/stash.py diff --git a/mepo.d/command/status/status.py b/src/mepo/command/status/status.py similarity index 100% rename from mepo.d/command/status/status.py rename to src/mepo/command/status/status.py diff --git a/mepo.d/command/tag/create/create.py b/src/mepo/command/tag/create/create.py similarity index 100% rename from mepo.d/command/tag/create/create.py rename to src/mepo/command/tag/create/create.py diff --git a/mepo.d/command/tag/delete/delete.py b/src/mepo/command/tag/delete/delete.py similarity index 100% rename from mepo.d/command/tag/delete/delete.py rename to src/mepo/command/tag/delete/delete.py diff --git a/mepo.d/command/tag/list/list.py b/src/mepo/command/tag/list/list.py similarity index 100% rename from mepo.d/command/tag/list/list.py rename to src/mepo/command/tag/list/list.py diff --git a/mepo.d/command/tag/push/push.py b/src/mepo/command/tag/push/push.py similarity index 100% rename from mepo.d/command/tag/push/push.py rename to src/mepo/command/tag/push/push.py diff --git a/mepo.d/command/tag/tag.py b/src/mepo/command/tag/tag.py similarity index 100% rename from mepo.d/command/tag/tag.py rename to src/mepo/command/tag/tag.py diff --git a/mepo.d/command/unstage/unstage.py b/src/mepo/command/unstage/unstage.py similarity index 100% rename from mepo.d/command/unstage/unstage.py rename to src/mepo/command/unstage/unstage.py diff --git a/mepo.d/command/whereis/whereis.py b/src/mepo/command/whereis/whereis.py similarity index 100% rename from mepo.d/command/whereis/whereis.py rename to src/mepo/command/whereis/whereis.py diff --git a/mepo.d/config/config_file.py b/src/mepo/config/config_file.py similarity index 100% rename from mepo.d/config/config_file.py rename to src/mepo/config/config_file.py diff --git a/mepo.d/main.py b/src/mepo/main.py similarity index 100% rename from mepo.d/main.py rename to src/mepo/main.py diff --git a/mepo.d/repository/git.py b/src/mepo/repository/git.py similarity index 100% rename from mepo.d/repository/git.py rename to src/mepo/repository/git.py diff --git a/mepo.d/state/component.py b/src/mepo/state/component.py similarity index 100% rename from mepo.d/state/component.py rename to src/mepo/state/component.py diff --git a/mepo.d/state/exceptions.py b/src/mepo/state/exceptions.py similarity index 100% rename from mepo.d/state/exceptions.py rename to src/mepo/state/exceptions.py diff --git a/mepo.d/state/state.py b/src/mepo/state/state.py similarity index 100% rename from mepo.d/state/state.py rename to src/mepo/state/state.py diff --git a/mepo.d/utest/input/args.py b/src/mepo/utest/input/args.py similarity index 100% rename from mepo.d/utest/input/args.py rename to src/mepo/utest/input/args.py diff --git a/mepo.d/utest/input/components.yaml b/src/mepo/utest/input/components.yaml similarity index 100% rename from mepo.d/utest/input/components.yaml rename to src/mepo/utest/input/components.yaml diff --git a/mepo.d/utest/output/compare_brief_output.txt b/src/mepo/utest/output/compare_brief_output.txt similarity index 100% rename from mepo.d/utest/output/compare_brief_output.txt rename to src/mepo/utest/output/compare_brief_output.txt diff --git a/mepo.d/utest/output/compare_full_output.txt b/src/mepo/utest/output/compare_full_output.txt similarity index 100% rename from mepo.d/utest/output/compare_full_output.txt rename to src/mepo/utest/output/compare_full_output.txt diff --git a/mepo.d/utest/output/list_output.txt b/src/mepo/utest/output/list_output.txt similarity index 100% rename from mepo.d/utest/output/list_output.txt rename to src/mepo/utest/output/list_output.txt diff --git a/mepo.d/utest/output/status_output.txt b/src/mepo/utest/output/status_output.txt similarity index 100% rename from mepo.d/utest/output/status_output.txt rename to src/mepo/utest/output/status_output.txt diff --git a/mepo.d/utest/test_mepo_commands.py b/src/mepo/utest/test_mepo_commands.py similarity index 100% rename from mepo.d/utest/test_mepo_commands.py rename to src/mepo/utest/test_mepo_commands.py diff --git a/mepo.d/utilities/colors.py b/src/mepo/utilities/colors.py similarity index 100% rename from mepo.d/utilities/colors.py rename to src/mepo/utilities/colors.py diff --git a/mepo.d/utilities/mepoconfig.py b/src/mepo/utilities/mepoconfig.py similarity index 100% rename from mepo.d/utilities/mepoconfig.py rename to src/mepo/utilities/mepoconfig.py diff --git a/mepo.d/utilities/shellcmd.py b/src/mepo/utilities/shellcmd.py similarity index 100% rename from mepo.d/utilities/shellcmd.py rename to src/mepo/utilities/shellcmd.py diff --git a/mepo.d/utilities/verify.py b/src/mepo/utilities/verify.py similarity index 100% rename from mepo.d/utilities/verify.py rename to src/mepo/utilities/verify.py diff --git a/mepo.d/utilities/version.py b/src/mepo/utilities/version.py similarity index 100% rename from mepo.d/utilities/version.py rename to src/mepo/utilities/version.py From 3443483b3162adf927958166c6951c3b3618f170 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 09:24:11 -0500 Subject: [PATCH 02/14] Adjusted paths for importing modules --- src/mepo/cmdline/parser.py | 10 +++++----- src/mepo/command/branch/branch.py | 8 ++++---- src/mepo/command/branch/create/create.py | 6 +++--- src/mepo/command/branch/delete/delete.py | 6 +++--- src/mepo/command/branch/list/list.py | 6 +++--- src/mepo/command/changed-files/changed-files.py | 15 ++++++++------- .../checkout-if-exists/checkout-if-exists.py | 8 ++++---- src/mepo/command/checkout/checkout.py | 8 ++++---- src/mepo/command/clone/clone.py | 12 ++++++------ src/mepo/command/command.py | 4 ++-- src/mepo/command/commit/commit.py | 8 ++++---- src/mepo/command/compare/compare.py | 9 +++++---- src/mepo/command/config/config.py | 10 +++++----- src/mepo/command/config/delete/delete.py | 2 +- src/mepo/command/config/get/get.py | 2 +- src/mepo/command/config/print/print.py | 2 +- src/mepo/command/config/set/set.py | 2 +- src/mepo/command/develop/develop.py | 8 ++++---- src/mepo/command/diff/diff.py | 8 ++++---- src/mepo/command/fetch/fetch.py | 8 ++++---- src/mepo/command/init/init.py | 4 ++-- src/mepo/command/list/list.py | 2 +- src/mepo/command/pull-all/pull-all.py | 8 ++++---- src/mepo/command/pull/pull.py | 10 +++++----- src/mepo/command/push/push.py | 6 +++--- src/mepo/command/reset/reset.py | 6 +++--- src/mepo/command/restore-state/restore-state.py | 8 ++++---- src/mepo/command/save/save.py | 10 +++++----- src/mepo/command/stage/stage.py | 8 ++++---- src/mepo/command/stash/apply/apply.py | 6 +++--- src/mepo/command/stash/list/list.py | 4 ++-- src/mepo/command/stash/pop/pop.py | 6 +++--- src/mepo/command/stash/push/push.py | 6 +++--- src/mepo/command/stash/show/show.py | 6 +++--- src/mepo/command/stash/stash.py | 12 ++++++------ src/mepo/command/status/status.py | 12 ++++++------ src/mepo/command/tag/create/create.py | 6 +++--- src/mepo/command/tag/delete/delete.py | 6 +++--- src/mepo/command/tag/list/list.py | 6 +++--- src/mepo/command/tag/push/push.py | 6 +++--- src/mepo/command/tag/tag.py | 10 +++++----- src/mepo/command/unstage/unstage.py | 8 ++++---- src/mepo/command/whereis/whereis.py | 4 ++-- src/mepo/config/config_file.py | 2 +- src/mepo/repository/git.py | 9 +++++---- src/mepo/state/component.py | 6 ++++-- src/mepo/state/state.py | 9 +++++---- 47 files changed, 167 insertions(+), 161 deletions(-) diff --git a/src/mepo/cmdline/parser.py b/src/mepo/cmdline/parser.py index 34f9045e..237cc04b 100644 --- a/src/mepo/cmdline/parser.py +++ b/src/mepo/cmdline/parser.py @@ -1,10 +1,10 @@ import argparse -from cmdline.branch_parser import MepoBranchArgParser -from cmdline.stash_parser import MepoStashArgParser -from cmdline.tag_parser import MepoTagArgParser -from cmdline.config_parser import MepoConfigArgParser -from utilities import mepoconfig +from mepo.cmdline.branch_parser import MepoBranchArgParser +from mepo.cmdline.stash_parser import MepoStashArgParser +from mepo.cmdline.tag_parser import MepoTagArgParser +from mepo.cmdline.config_parser import MepoConfigArgParser +from mepo.utilities import mepoconfig class MepoArgParser(object): diff --git a/src/mepo/command/branch/branch.py b/src/mepo/command/branch/branch.py index 06b3ec11..961465c5 100644 --- a/src/mepo/command/branch/branch.py +++ b/src/mepo/command/branch/branch.py @@ -1,10 +1,10 @@ import subprocess as sp -from state.state import MepoState +from mepo.state.state import MepoState -from command.branch.list import list -from command.branch.create import create -from command.branch.delete import delete +from mepo.command.branch.list import list +from mepo.command.branch.create import create +from mepo.command.branch.delete import delete def run(args): d = { diff --git a/src/mepo/command/branch/create/create.py b/src/mepo/command/branch/create/create.py index d6772a6d..ba17415b 100644 --- a/src/mepo/command/branch/create/create.py +++ b/src/mepo/command/branch/create/create.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/branch/delete/delete.py b/src/mepo/command/branch/delete/delete.py index 3206b3de..dc60bc92 100644 --- a/src/mepo/command/branch/delete/delete.py +++ b/src/mepo/command/branch/delete/delete.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/branch/list/list.py b/src/mepo/command/branch/list/list.py index 71740248..16ce794d 100644 --- a/src/mepo/command/branch/list/list.py +++ b/src/mepo/command/branch/list/list.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/changed-files/changed-files.py b/src/mepo/command/changed-files/changed-files.py index c2a1e2a9..4ae24ae2 100644 --- a/src/mepo/command/changed-files/changed-files.py +++ b/src/mepo/command/changed-files/changed-files.py @@ -1,11 +1,12 @@ -from state.state import MepoState -from utilities import colors -from utilities import verify -from utilities.version import version_to_string, sanitize_version_string -from repository.git import GitRepository -from shutil import get_terminal_size -from state.component import MepoVersion import os +from shutil import get_terminal_size + +from mepo.state.state import MepoState +from mepo.state.component import MepoVersion +from mepo.utilities import colors +from mepo.utilities import verify +from mepo.utilities.version import version_to_string, sanitize_version_string +from mepo.repository.git import GitRepository VER_LEN = 30 diff --git a/src/mepo/command/checkout-if-exists/checkout-if-exists.py b/src/mepo/command/checkout-if-exists/checkout-if-exists.py index 528afb19..dfea26c2 100644 --- a/src/mepo/command/checkout-if-exists/checkout-if-exists.py +++ b/src/mepo/command/checkout-if-exists/checkout-if-exists.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from utilities import colors +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.utilities import colors def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/checkout/checkout.py b/src/mepo/command/checkout/checkout.py index 0e18eb46..6e16ba1b 100644 --- a/src/mepo/command/checkout/checkout.py +++ b/src/mepo/command/checkout/checkout.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from utilities import colors +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.utilities import colors def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/clone/clone.py b/src/mepo/command/clone/clone.py index 448e2849..5f0033a4 100644 --- a/src/mepo/command/clone/clone.py +++ b/src/mepo/command/clone/clone.py @@ -1,13 +1,13 @@ -from state.state import MepoState, StateDoesNotExistError -from repository.git import GitRepository -from command.init import init as mepo_init -from utilities import shellcmd, colors, mepoconfig -from urllib.parse import urlparse - import os import pathlib import shutil import shlex +from urllib.parse import urlparse + +from mepo.state.state import MepoState, StateDoesNotExistError +from mepo.repository.git import GitRepository +from mepo.command.init import init as mepo_init +from mepo.utilities import shellcmd, colors, mepoconfig def run(args): diff --git a/src/mepo/command/command.py b/src/mepo/command/command.py index 221c9261..8a6a509a 100644 --- a/src/mepo/command/command.py +++ b/src/mepo/command/command.py @@ -1,11 +1,11 @@ from importlib import import_module -from utilities import mepoconfig +from mepo.utilities import mepoconfig def run(args): mepo_cmd = mepoconfig.get_alias_command(args.mepo_cmd) # Load the module containing the 'run' method of specified mepo command - cmd_module = import_module('command.{}.{}'.format(mepo_cmd, mepo_cmd)) + cmd_module = import_module('mepo.command.{}.{}'.format(mepo_cmd, mepo_cmd)) # Execute 'run' method of the specified mepo command cmd_module.run(args) diff --git a/src/mepo/command/commit/commit.py b/src/mepo/command/commit/commit.py index 7b2ac349..f91c1277 100644 --- a/src/mepo/command/commit/commit.py +++ b/src/mepo/command/commit/commit.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from command.stage.stage import stage_files +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.command.stage.stage import stage_files # Popping up an EDITOR is based on https://stackoverflow.com/a/39989442 import os, tempfile, subprocess diff --git a/src/mepo/command/compare/compare.py b/src/mepo/command/compare/compare.py index 9f78165c..f16348af 100644 --- a/src/mepo/command/compare/compare.py +++ b/src/mepo/command/compare/compare.py @@ -1,9 +1,10 @@ -from state.state import MepoState -from utilities import colors -from utilities.version import version_to_string, sanitize_version_string -from repository.git import GitRepository from shutil import get_terminal_size +from mepo.state.state import MepoState +from mepo.utilities import colors +from mepo.utilities.version import version_to_string, sanitize_version_string +from mepo.repository.git import GitRepository + VER_LEN = 30 def run(args): diff --git a/src/mepo/command/config/config.py b/src/mepo/command/config/config.py index 689ccaa4..211b7dad 100644 --- a/src/mepo/command/config/config.py +++ b/src/mepo/command/config/config.py @@ -1,11 +1,11 @@ import subprocess as sp -from state.state import MepoState +from mepo.state.state import MepoState -from command.config.get import get -from command.config.set import set -from command.config.delete import delete -from command.config.print import print +from mepo.command.config.get import get +from mepo.command.config.set import set +from mepo.command.config.delete import delete +from mepo.command.config.print import print def run(args): d = { diff --git a/src/mepo/command/config/delete/delete.py b/src/mepo/command/config/delete/delete.py index dbf58dad..b7b85b29 100644 --- a/src/mepo/command/config/delete/delete.py +++ b/src/mepo/command/config/delete/delete.py @@ -1,4 +1,4 @@ -from utilities import mepoconfig +from mepo.utilities import mepoconfig def run(args): section, option = mepoconfig.split_entry(args.entry) diff --git a/src/mepo/command/config/get/get.py b/src/mepo/command/config/get/get.py index 6ca83465..e88d1456 100644 --- a/src/mepo/command/config/get/get.py +++ b/src/mepo/command/config/get/get.py @@ -1,4 +1,4 @@ -from utilities import mepoconfig +from mepo.utilities import mepoconfig def run(args): section, option = mepoconfig.split_entry(args.entry) diff --git a/src/mepo/command/config/print/print.py b/src/mepo/command/config/print/print.py index 16d85c62..1a612c3f 100644 --- a/src/mepo/command/config/print/print.py +++ b/src/mepo/command/config/print/print.py @@ -1,4 +1,4 @@ -from utilities import mepoconfig +from mepo.utilities import mepoconfig def run(args): mepoconfig.print() diff --git a/src/mepo/command/config/set/set.py b/src/mepo/command/config/set/set.py index 6ac0a4c2..80d9079c 100644 --- a/src/mepo/command/config/set/set.py +++ b/src/mepo/command/config/set/set.py @@ -1,4 +1,4 @@ -from utilities import mepoconfig +from mepo.utilities import mepoconfig def run(args): section, option = mepoconfig.split_entry(args.entry) diff --git a/src/mepo/command/develop/develop.py b/src/mepo/command/develop/develop.py index 8c2aa923..aec6f28c 100644 --- a/src/mepo/command/develop/develop.py +++ b/src/mepo/command/develop/develop.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from utilities import colors +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.utilities import colors def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/diff/diff.py b/src/mepo/command/diff/diff.py index 8353196b..6afcd409 100644 --- a/src/mepo/command/diff/diff.py +++ b/src/mepo/command/diff/diff.py @@ -3,12 +3,12 @@ import multiprocessing as mp import os -from state.state import MepoState -from repository.git import GitRepository -from utilities import verify - from shutil import get_terminal_size +from mepo.state.state import MepoState +from mepo.repository.git import GitRepository +from mepo.utilities import verify + def run(args): foundDiff = False diff --git a/src/mepo/command/fetch/fetch.py b/src/mepo/command/fetch/fetch.py index cddbbcb9..299db8c2 100644 --- a/src/mepo/command/fetch/fetch.py +++ b/src/mepo/command/fetch/fetch.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from utilities import colors +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.utilities import colors def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/init/init.py b/src/mepo/command/init/init.py index c868f082..b4ef2126 100644 --- a/src/mepo/command/init/init.py +++ b/src/mepo/command/init/init.py @@ -1,5 +1,5 @@ -from state.state import MepoState -from utilities import mepoconfig +from mepo.state.state import MepoState +from mepo.utilities import mepoconfig def run(args): if args.style: diff --git a/src/mepo/command/list/list.py b/src/mepo/command/list/list.py index d60e932d..25a8e4d1 100644 --- a/src/mepo/command/list/list.py +++ b/src/mepo/command/list/list.py @@ -1,4 +1,4 @@ -from state.state import MepoState +from mepo.state.state import MepoState def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/pull-all/pull-all.py b/src/mepo/command/pull-all/pull-all.py index c902b56f..a47bf691 100644 --- a/src/mepo/command/pull-all/pull-all.py +++ b/src/mepo/command/pull-all/pull-all.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from repository.git import GitRepository -from state.component import MepoVersion -from utilities import colors +from mepo.state.state import MepoState +from mepo.repository.git import GitRepository +from mepo.state.component import MepoVersion +from mepo.utilities import colors def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/pull/pull.py b/src/mepo/command/pull/pull.py index 92aa0bf2..f934e80b 100644 --- a/src/mepo/command/pull/pull.py +++ b/src/mepo/command/pull/pull.py @@ -1,8 +1,8 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from state.component import MepoVersion -from utilities import colors +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.state.component import MepoVersion +from mepo.utilities import colors def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/push/push.py b/src/mepo/command/push/push.py index adcf2aea..3b7d27a7 100644 --- a/src/mepo/command/push/push.py +++ b/src/mepo/command/push/push.py @@ -1,6 +1,6 @@ -from utilities import verify -from state.state import MepoState -from repository.git import GitRepository +from mepo.utilities import verify +from mepo.state.state import MepoState +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/reset/reset.py b/src/mepo/command/reset/reset.py index 41cf79ef..7ea0104a 100644 --- a/src/mepo/command/reset/reset.py +++ b/src/mepo/command/reset/reset.py @@ -1,10 +1,10 @@ import os import shutil -from state.state import MepoState -from state.exceptions import NotInRootDirError +from mepo.state.state import MepoState +from mepo.state.exceptions import NotInRootDirError -from command.clone import clone as mepo_clone +from mepo.command.clone import clone as mepo_clone # This command will "reset" the mepo clone. This will delete all # the subrepos, remove the .mepo directory, and then re-clone all the diff --git a/src/mepo/command/restore-state/restore-state.py b/src/mepo/command/restore-state/restore-state.py index 38a124bf..b713bf37 100644 --- a/src/mepo/command/restore-state/restore-state.py +++ b/src/mepo/command/restore-state/restore-state.py @@ -3,10 +3,10 @@ import multiprocessing as mp import atexit -from state.state import MepoState -from repository.git import GitRepository -from utilities.version import version_to_string -from utilities import colors +from mepo.state.state import MepoState +from mepo.repository.git import GitRepository +from mepo.utilities.version import version_to_string +from mepo.utilities import colors def run(args): print('Checking status...'); sys.stdout.flush() diff --git a/src/mepo/command/save/save.py b/src/mepo/command/save/save.py index 336b3f79..44f3edfb 100644 --- a/src/mepo/command/save/save.py +++ b/src/mepo/command/save/save.py @@ -1,8 +1,8 @@ -from state.state import MepoState -from state.component import MepoVersion -from repository.git import GitRepository -from config.config_file import ConfigFile -from utilities.version import sanitize_version_string +from mepo.state.state import MepoState +from mepo.state.component import MepoVersion +from mepo.repository.git import GitRepository +from mepo.config.config_file import ConfigFile +from mepo.utilities.version import sanitize_version_string import os diff --git a/src/mepo/command/stage/stage.py b/src/mepo/command/stage/stage.py index ea93d9a7..5f7d3d7b 100644 --- a/src/mepo/command/stage/stage.py +++ b/src/mepo/command/stage/stage.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository -from state.component import MepoVersion +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository +from mepo.state.component import MepoVersion def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/stash/apply/apply.py b/src/mepo/command/stash/apply/apply.py index 04f7e374..564b0340 100644 --- a/src/mepo/command/stash/apply/apply.py +++ b/src/mepo/command/stash/apply/apply.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/stash/list/list.py b/src/mepo/command/stash/list/list.py index 62eb0d90..d7f0510b 100644 --- a/src/mepo/command/stash/list/list.py +++ b/src/mepo/command/stash/list/list.py @@ -1,5 +1,5 @@ -from state.state import MepoState -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/stash/pop/pop.py b/src/mepo/command/stash/pop/pop.py index 12f79daf..ff9a2fc8 100644 --- a/src/mepo/command/stash/pop/pop.py +++ b/src/mepo/command/stash/pop/pop.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/stash/push/push.py b/src/mepo/command/stash/push/push.py index 276a95e2..e806e0be 100644 --- a/src/mepo/command/stash/push/push.py +++ b/src/mepo/command/stash/push/push.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/stash/show/show.py b/src/mepo/command/stash/show/show.py index 69f37664..fda6ee32 100644 --- a/src/mepo/command/stash/show/show.py +++ b/src/mepo/command/stash/show/show.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/stash/stash.py b/src/mepo/command/stash/stash.py index 05d65754..fe0ef3eb 100644 --- a/src/mepo/command/stash/stash.py +++ b/src/mepo/command/stash/stash.py @@ -1,12 +1,12 @@ import subprocess as sp -from state.state import MepoState +from mepo.state.state import MepoState -from command.stash.list import list -from command.stash.pop import pop -from command.stash.apply import apply -from command.stash.push import push -from command.stash.show import show +from mepo.command.stash.list import list +from mepo.command.stash.pop import pop +from mepo.command.stash.apply import apply +from mepo.command.stash.push import push +from mepo.command.stash.show import show def run(args): d = { diff --git a/src/mepo/command/status/status.py b/src/mepo/command/status/status.py index 91720592..9f7bc912 100644 --- a/src/mepo/command/status/status.py +++ b/src/mepo/command/status/status.py @@ -2,14 +2,14 @@ import time import multiprocessing as mp import atexit - -from state.state import MepoState -from repository.git import GitRepository -from utilities.version import version_to_string, sanitize_version_string -from utilities import colors, shellcmd -from command.whereis.whereis import _get_relative_path import shlex +from mepo.state.state import MepoState +from mepo.repository.git import GitRepository +from mepo.utilities.version import version_to_string, sanitize_version_string +from mepo.utilities import colors, shellcmd +from mepo.command.whereis.whereis import _get_relative_path + def run(args): print('Checking status...'); sys.stdout.flush() allcomps = MepoState.read_state() diff --git a/src/mepo/command/tag/create/create.py b/src/mepo/command/tag/create/create.py index cc765d47..aca4e3cf 100644 --- a/src/mepo/command/tag/create/create.py +++ b/src/mepo/command/tag/create/create.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository # Popping up an EDITOR is based on https://stackoverflow.com/a/39989442 import os, tempfile, subprocess diff --git a/src/mepo/command/tag/delete/delete.py b/src/mepo/command/tag/delete/delete.py index f063e6a6..8998f4c3 100644 --- a/src/mepo/command/tag/delete/delete.py +++ b/src/mepo/command/tag/delete/delete.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/tag/list/list.py b/src/mepo/command/tag/list/list.py index c04c3257..a7c2a985 100644 --- a/src/mepo/command/tag/list/list.py +++ b/src/mepo/command/tag/list/list.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/tag/push/push.py b/src/mepo/command/tag/push/push.py index 975c2e1d..e428ed1b 100644 --- a/src/mepo/command/tag/push/push.py +++ b/src/mepo/command/tag/push/push.py @@ -1,6 +1,6 @@ -from state.state import MepoState -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/tag/tag.py b/src/mepo/command/tag/tag.py index 7158f1b0..9b02fe89 100644 --- a/src/mepo/command/tag/tag.py +++ b/src/mepo/command/tag/tag.py @@ -1,11 +1,11 @@ import subprocess as sp -from state.state import MepoState +from mepo.state.state import MepoState -from command.tag.list import list -from command.tag.create import create -from command.tag.delete import delete -from command.tag.push import push +from mepo.command.tag.list import list +from mepo.command.tag.create import create +from mepo.command.tag.delete import delete +from mepo.command.tag.push import push def run(args): d = { diff --git a/src/mepo/command/unstage/unstage.py b/src/mepo/command/unstage/unstage.py index 76e726b5..d0f9600b 100644 --- a/src/mepo/command/unstage/unstage.py +++ b/src/mepo/command/unstage/unstage.py @@ -1,7 +1,7 @@ -from state.state import MepoState -from utilities import shellcmd -from utilities import verify -from repository.git import GitRepository +from mepo.state.state import MepoState +from mepo.utilities import shellcmd +from mepo.utilities import verify +from mepo.repository.git import GitRepository def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/command/whereis/whereis.py b/src/mepo/command/whereis/whereis.py index df6c0430..c5da6099 100644 --- a/src/mepo/command/whereis/whereis.py +++ b/src/mepo/command/whereis/whereis.py @@ -1,7 +1,7 @@ import os -from state.state import MepoState -from utilities import verify +from mepo.state.state import MepoState +from mepo.utilities import verify def run(args): allcomps = MepoState.read_state() diff --git a/src/mepo/config/config_file.py b/src/mepo/config/config_file.py index c72ee3ad..b4c10896 100644 --- a/src/mepo/config/config_file.py +++ b/src/mepo/config/config_file.py @@ -1,7 +1,7 @@ import pathlib import yaml -from state.exceptions import SuffixNotRecognizedError +from mepo.state.exceptions import SuffixNotRecognizedError # From https://github.com/yaml/pyyaml/issues/127#issuecomment-525800484 class AddBlankLinesDumper(yaml.SafeDumper): diff --git a/src/mepo/repository/git.py b/src/mepo/repository/git.py index b54b54b9..e3a566af 100644 --- a/src/mepo/repository/git.py +++ b/src/mepo/repository/git.py @@ -3,11 +3,12 @@ import subprocess import shlex -from state.state import MepoState -from utilities import shellcmd -from utilities import colors from urllib.parse import urljoin -from state.exceptions import RepoAlreadyClonedError + +from mepo.state.state import MepoState +from mepo.utilities import shellcmd +from mepo.utilities import colors +from mepo.state.exceptions import RepoAlreadyClonedError class GitRepository(object): """ diff --git a/src/mepo/state/component.py b/src/mepo/state/component.py index e121075f..5d79f395 100644 --- a/src/mepo/state/component.py +++ b/src/mepo/state/component.py @@ -1,9 +1,11 @@ import os import shlex import textwrap + from collections import namedtuple -from utilities.version import MepoVersion -from utilities import shellcmd, mepoconfig + +from mepo.utilities.version import MepoVersion +from mepo.utilities import shellcmd, mepoconfig from urllib.parse import urlparse # This will be used to store the "final nodes" from each subrepo diff --git a/src/mepo/state/state.py b/src/mepo/state/state.py index 45ced347..24be3511 100644 --- a/src/mepo/state/state.py +++ b/src/mepo/state/state.py @@ -4,11 +4,12 @@ import glob import pickle -from config.config_file import ConfigFile -from state.component import MepoComponent -from utilities import shellcmd from pathlib import Path -from state.exceptions import StateDoesNotExistError, StateAlreadyInitializedError + +from mepo.config.config_file import ConfigFile +from mepo.state.component import MepoComponent +from mepo.utilities import shellcmd +from mepo.state.exceptions import StateDoesNotExistError, StateAlreadyInitializedError class MepoState(object): From e2d253f17d1e418c1a03bf3c454af965aa82c645 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 09:25:34 -0500 Subject: [PATCH 03/14] Renamed doc -> docs --- {doc => docs}/.gitignore | 0 {doc => docs}/make_md_docs.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {doc => docs}/.gitignore (100%) rename {doc => docs}/make_md_docs.py (100%) diff --git a/doc/.gitignore b/docs/.gitignore similarity index 100% rename from doc/.gitignore rename to docs/.gitignore diff --git a/doc/make_md_docs.py b/docs/make_md_docs.py similarity index 100% rename from doc/make_md_docs.py rename to docs/make_md_docs.py From d513f892cb0e7731387a39f7aceb3d2a2650b558 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 09:44:51 -0500 Subject: [PATCH 04/14] Moved test directory out of src --- {src/mepo/utest => tests}/input/args.py | 0 {src/mepo/utest => tests}/input/components.yaml | 0 .../utest => tests}/output/compare_brief_output.txt | 0 .../utest => tests}/output/compare_full_output.txt | 0 {src/mepo/utest => tests}/output/list_output.txt | 0 {src/mepo/utest => tests}/output/status_output.txt | 0 {src/mepo/utest => tests}/test_mepo_commands.py | 12 ++++++------ 7 files changed, 6 insertions(+), 6 deletions(-) rename {src/mepo/utest => tests}/input/args.py (100%) rename {src/mepo/utest => tests}/input/components.yaml (100%) rename {src/mepo/utest => tests}/output/compare_brief_output.txt (100%) rename {src/mepo/utest => tests}/output/compare_full_output.txt (100%) rename {src/mepo/utest => tests}/output/list_output.txt (100%) rename {src/mepo/utest => tests}/output/status_output.txt (100%) rename {src/mepo/utest => tests}/test_mepo_commands.py (91%) diff --git a/src/mepo/utest/input/args.py b/tests/input/args.py similarity index 100% rename from src/mepo/utest/input/args.py rename to tests/input/args.py diff --git a/src/mepo/utest/input/components.yaml b/tests/input/components.yaml similarity index 100% rename from src/mepo/utest/input/components.yaml rename to tests/input/components.yaml diff --git a/src/mepo/utest/output/compare_brief_output.txt b/tests/output/compare_brief_output.txt similarity index 100% rename from src/mepo/utest/output/compare_brief_output.txt rename to tests/output/compare_brief_output.txt diff --git a/src/mepo/utest/output/compare_full_output.txt b/tests/output/compare_full_output.txt similarity index 100% rename from src/mepo/utest/output/compare_full_output.txt rename to tests/output/compare_full_output.txt diff --git a/src/mepo/utest/output/list_output.txt b/tests/output/list_output.txt similarity index 100% rename from src/mepo/utest/output/list_output.txt rename to tests/output/list_output.txt diff --git a/src/mepo/utest/output/status_output.txt b/tests/output/status_output.txt similarity index 100% rename from src/mepo/utest/output/status_output.txt rename to tests/output/status_output.txt diff --git a/src/mepo/utest/test_mepo_commands.py b/tests/test_mepo_commands.py similarity index 91% rename from src/mepo/utest/test_mepo_commands.py rename to tests/test_mepo_commands.py index c1fc5a64..34364864 100644 --- a/src/mepo/utest/test_mepo_commands.py +++ b/tests/test_mepo_commands.py @@ -10,12 +10,12 @@ from input import args -from command.init import init as mepo_init -from command.clone import clone as mepo_clone -from command.list import list as mepo_list -from command.status import status as mepo_status -from command.compare import compare as mepo_compare -from command.develop import develop as mepo_develop +from mepo.command.init import init as mepo_init +from mepo.command.clone import clone as mepo_clone +from mepo.command.list import list as mepo_list +from mepo.command.status import status as mepo_status +from mepo.command.compare import compare as mepo_compare +from mepo.command.develop import develop as mepo_develop class TestMepoCommands(unittest.TestCase): From 277ba9dc9e7ea832e52fd9048f02ad15edc5fa3b Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 09:45:35 -0500 Subject: [PATCH 05/14] Updated path in top-level mepo script --- mepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mepo b/mepo index c53176fe..426a8c97 100755 --- a/mepo +++ b/mepo @@ -9,7 +9,7 @@ if sys.version_info < (3, 6, 0): sys.exit('ERROR: Python version needs to be >= 3.6.0') # Add mepo.d to path -MEPO_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mepo.d') +MEPO_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src', 'mepo') sys.path.insert(0, MEPO_D) if __name__ == '__main__': From 3a021d3e3c888769ef229c27b428a892e64a72ec Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 11:24:03 -0500 Subject: [PATCH 06/14] Added pyproject.toml for pip installation --- pyproject.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..3e6181e0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "mepo" +version = "v1.55.0" +authors = ["GMAO SI Team"] +description = "Tool to manage (m)ultiple git r(epo)sitories" +requires-python = ">= 3.9" +license = {file = "LICENSE"} +readme = "README.md" +dependencies = [ + "pyyaml>=6.0.1", +] + +[project.urls] +Homepage = "https://github.com/GEOS-ESM/mepo" + +[project.scripts] +mepo = "mepo:main" + +[tool.setuptools] +include-package-data = true From b9e8c71e5d6e03c1c5fcb61031a883aa8d93360a Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 12 Mar 2024 16:57:32 -0500 Subject: [PATCH 07/14] Some fixes 1. module paths 2. new version number in pyproject.toml 3. location of test script --- .github/workflows/mepo.yaml | 2 +- pyproject.toml | 10 ++++++---- src/mepo/main.py | 4 ++-- tests/test_mepo_commands.py | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mepo.yaml b/.github/workflows/mepo.yaml index 4e7710c2..50206b9d 100644 --- a/.github/workflows/mepo.yaml +++ b/.github/workflows/mepo.yaml @@ -27,5 +27,5 @@ jobs: timeout-minutes: 5 - name: Run unit tests - run: python3 mepo.d/utest/test_mepo_commands.py -v + run: python3 tests/test_mepo_commands.py -v timeout-minutes: 5 diff --git a/pyproject.toml b/pyproject.toml index 3e6181e0..02a97b61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,11 @@ build-backend = "setuptools.build_meta" [project] name = "mepo" -version = "v1.55.0" -authors = ["GMAO SI Team"] -description = "Tool to manage (m)ultiple git r(epo)sitories" +version = "v1.59.0" +authors = [ + {name = "GMAO SI Team", email = "gmao.siteam@nasa.gov"}, +] +description = "Add description here" requires-python = ">= 3.9" license = {file = "LICENSE"} readme = "README.md" @@ -18,7 +20,7 @@ dependencies = [ Homepage = "https://github.com/GEOS-ESM/mepo" [project.scripts] -mepo = "mepo:main" +mepo = "mepo.main:main" [tool.setuptools] include-package-data = true diff --git a/src/mepo/main.py b/src/mepo/main.py index 620c7e57..30a31351 100644 --- a/src/mepo/main.py +++ b/src/mepo/main.py @@ -1,5 +1,5 @@ -from cmdline.parser import MepoArgParser -from command import command +from mepo.cmdline.parser import MepoArgParser +from mepo.command import command def main(): args = MepoArgParser().parse() diff --git a/tests/test_mepo_commands.py b/tests/test_mepo_commands.py index 34364864..dbdd88ef 100644 --- a/tests/test_mepo_commands.py +++ b/tests/test_mepo_commands.py @@ -1,7 +1,7 @@ import os import sys THIS_DIR = os.path.dirname(os.path.realpath(__file__)) -sys.path.insert(0, os.path.join(THIS_DIR, '..')) +sys.path.insert(0, os.path.join(THIS_DIR, '..', 'src')) import shutil import shlex import unittest From 6f9608d7a6c357d3a404de2f7010bb3748c19d32 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Wed, 13 Mar 2024 07:42:02 -0500 Subject: [PATCH 08/14] Updated paths for helper script --- mepo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mepo b/mepo index 426a8c97..e5389cc6 100755 --- a/mepo +++ b/mepo @@ -8,10 +8,10 @@ import traceback if sys.version_info < (3, 6, 0): sys.exit('ERROR: Python version needs to be >= 3.6.0') -# Add mepo.d to path -MEPO_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src', 'mepo') -sys.path.insert(0, MEPO_D) +# Add src (containing dir mepo) to path +SRC_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src') +sys.path.insert(0, SRC_D) if __name__ == '__main__': - from main import main + from mepo.main import main main() From 749869cfd97a2cb499afa9a6bdee7d821063548b Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Wed, 13 Mar 2024 07:42:53 -0500 Subject: [PATCH 09/14] Fixed doc generation --- docs/make_md_docs.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/make_md_docs.py b/docs/make_md_docs.py index c8a19619..2b92747e 100644 --- a/docs/make_md_docs.py +++ b/docs/make_md_docs.py @@ -13,12 +13,12 @@ doc_dir_path = os.path.dirname(os.path.realpath(__file__)) # Then we need to get to the mepo/mepo.d/command directory. First the "main" dir main_dir_path = os.path.dirname(doc_dir_path) -# Now add 'mepo.d' -mepod_dir_path = os.path.join(main_dir_path,'mepo.d') +# Now add 'src/mepo' +mepod_dir_path = os.path.join(main_dir_path, 'src', 'mepo') # And then 'command' -command_dir_path = os.path.join(mepod_dir_path,'command') +command_dir_path = os.path.join(mepod_dir_path, 'command') -mepo_command_path = os.path.join(main_dir_path,'mepo') +mepo_command_path = os.path.join(main_dir_path, 'mepo') def get_command_list(directory): # Walk the tree @@ -50,12 +50,12 @@ def get_command_list(directory): return sorted(all_useful_commands) def create_markdown_from_usage(command, mdFile): - cmd = [mepo_command_path,command,'--help'] + cmd = [mepo_command_path, command, '--help'] # Some commands have spaces, so we need to break it up again cmd = ' '.join(cmd).split() - result = sp.run(cmd,capture_output=True,universal_newlines=True,env={'COLUMNS':'256'}) + result = sp.run(cmd, capture_output=True, universal_newlines=True, env={'COLUMNS':'256'}) output = result.stdout output_list = output.split("\n") @@ -84,7 +84,7 @@ def create_markdown_from_usage(command, mdFile): if __name__ == "__main__": - doc_file='Mepo-Commands.md' + doc_file = 'Mepo-Commands.md' mdFile = MdUtils(file_name=doc_file) mdFile.new_header(level=1, title="Overview") @@ -99,4 +99,3 @@ def create_markdown_from_usage(command, mdFile): mdFile.new_table_of_contents(table_title='Table of Contents', depth=2) mdFile.create_md_file() print(f'Generated {doc_file}.') - From 4de9a144063b630c5ddc09437626fe9268dab324 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Thu, 14 Mar 2024 09:13:25 -0500 Subject: [PATCH 10/14] Moved helper script to the bin directory --- mepo => bin/mepo | 4 ++-- docs/make_md_docs.py | 2 +- pyproject.toml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename mepo => bin/mepo (85%) diff --git a/mepo b/bin/mepo similarity index 85% rename from mepo rename to bin/mepo index e5389cc6..58bc11d0 100755 --- a/mepo +++ b/bin/mepo @@ -8,8 +8,8 @@ import traceback if sys.version_info < (3, 6, 0): sys.exit('ERROR: Python version needs to be >= 3.6.0') -# Add src (containing dir mepo) to path -SRC_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src') +# Add direactory containing mepo to path +SRC_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src') sys.path.insert(0, SRC_D) if __name__ == '__main__': diff --git a/docs/make_md_docs.py b/docs/make_md_docs.py index 2b92747e..07ba6d08 100644 --- a/docs/make_md_docs.py +++ b/docs/make_md_docs.py @@ -18,7 +18,7 @@ # And then 'command' command_dir_path = os.path.join(mepod_dir_path, 'command') -mepo_command_path = os.path.join(main_dir_path, 'mepo') +mepo_command_path = os.path.join(main_dir_path, 'bin', 'mepo') def get_command_list(directory): # Walk the tree diff --git a/pyproject.toml b/pyproject.toml index 02a97b61..e0b106c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta" [project] name = "mepo" -version = "v1.59.0" +version = "v1.60.0" authors = [ - {name = "GMAO SI Team", email = "gmao.siteam@nasa.gov"}, + {name = "GMAO SI Team", email = "siteam@gmao.gsfc.nasa.gov"}, ] -description = "Add description here" +description = "Tool to manage (m)ultiple r(epo)sitories" requires-python = ">= 3.9" license = {file = "LICENSE"} readme = "README.md" From 4e250e11fb7bb4d4dab76f8d9f2e9a54a9385ed5 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Thu, 14 Mar 2024 09:42:47 -0500 Subject: [PATCH 11/14] Updated gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2f836aac..3ce728f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *~ *.pyc +*.egg-info +dist +venv \ No newline at end of file From 9a043c472981b4764627b58d0a4bcd9501d5c6b5 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Fri, 22 Mar 2024 15:53:31 -0500 Subject: [PATCH 12/14] Update required Python version in bin/mepo Co-authored-by: Matthew Thompson --- bin/mepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mepo b/bin/mepo index 58bc11d0..9037d7de 100755 --- a/bin/mepo +++ b/bin/mepo @@ -5,7 +5,7 @@ import sys import traceback # Version check -if sys.version_info < (3, 6, 0): +if sys.version_info < (3, 9, 0): sys.exit('ERROR: Python version needs to be >= 3.6.0') # Add direactory containing mepo to path From 33017cd457cfa23a6761ef02a320d0bc92f44b71 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Fri, 22 Mar 2024 16:20:20 -0500 Subject: [PATCH 13/14] Updated CHANGELOG --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b26be00..844940d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added `pyproject.toml` to aid with `pip` installation. + ### Changed -### Removed +- Converted `mepo` to a Python project via the following renaming + -- `mepo.d` -> `src/mepo` + -- `mepo.d/utest` -> `tests` + -- `doc` --> `docs` +- Helper script `mepo`, used for development, moved to the `bin` directory. ## [1.52.0] - 2024-01-10 From 5027609f545f72bfd008fe02d2ebfe55f87510dc Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Fri, 22 Mar 2024 16:20:36 -0500 Subject: [PATCH 14/14] This release should probably be 2.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0b106c2..0379e921 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "mepo" -version = "v1.60.0" +version = "v2.0.0" authors = [ {name = "GMAO SI Team", email = "siteam@gmao.gsfc.nasa.gov"}, ]