diff --git a/developers_chamber/bin/pydev.py b/developers_chamber/bin/pydev.py index c3bdb3e..bf202cb 100644 --- a/developers_chamber/bin/pydev.py +++ b/developers_chamber/bin/pydev.py @@ -21,7 +21,9 @@ from developers_chamber.scripts import cli -from developers_chamber.scripts.bitbucket import * + +if "bitbucket" in INSTALLED_MODULES: + from developers_chamber.scripts.bitbucket import * from developers_chamber.scripts.docker import * if "aws" in INSTALLED_MODULES: @@ -30,7 +32,8 @@ if "git" in INSTALLED_MODULES: from developers_chamber.scripts.git import * -from developers_chamber.scripts.gitlab import * +if "gitlab" in INSTALLED_MODULES: + from developers_chamber.scripts.gitlab import * if "jira" in INSTALLED_MODULES: from developers_chamber.scripts.jira import * diff --git a/developers_chamber/utils.py b/developers_chamber/utils.py index dca9ad3..3847505 100644 --- a/developers_chamber/utils.py +++ b/developers_chamber/utils.py @@ -5,7 +5,6 @@ import sys from click import ClickException -from git import Repo LOGGER = logging.getLogger() MIGRATIONS_PATTERN = r"migrations\/([^\/]+)\.py$" @@ -81,6 +80,8 @@ def _get_repo(self): """ Returns the repo object. """ + from git import Repo + return Repo(".") def _get_active_branch_name(self): @@ -133,11 +134,13 @@ def _is_repo_clean(self): modules = { "git": ["git"], - "jira": ["jira", "unidecode"], + "jira": ["jira", "unidecode", "git"], "aws": ["boto3"], - "qa": ["isort", "flake8"], + "qa": ["isort", "flake8", "git"], "toggle": ["toggl"], "slack": ["slack_sdk"], + "bitbucket": ["git"], + "gitlab": ["git"], } INSTALLED_MODULES = [] diff --git a/setup.py b/setup.py index cccedb0..14f7cff 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="developers-chamber", - version="0.1.9", + version="0.1.10", description="A small plugin which help with development, deployment, git", keywords="django, skripts, easy live, git, bitbucket, Jira", author="Druids team", @@ -29,10 +29,18 @@ "boto3<2", ], "qa": [ + "gitpython==3.1.30", "isort==5.12.0", "flake8>=7.0.0", ], + "bitbucket": [ + "gitpython==3.1.30", + ], + "gitlab": [ + "gitpython==3.1.30", + ], "jira": [ + "gitpython==3.1.30", "jira==2.0.0", "unidecode==1.1.1", ],