Skip to content

Commit

Permalink
0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Luboš Mátl committed Jun 20, 2024
1 parent 7f6ae9d commit 074bbd1
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 96 deletions.
1 change: 1 addition & 0 deletions developers_chamber/bin/pydev.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from developers_chamber.scripts.toggle import *
from developers_chamber.scripts.version import *
from developers_chamber.scripts.init_aliasses import *

click_completion.init()


Expand Down
6 changes: 3 additions & 3 deletions developers_chamber/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def create_release(version_file, release_type, remote_name=None, branch_name=Non
g.tag("-d", str(version))

g.checkout(branch_name or "HEAD", b=release_branch_name)
g.commit(message=f'Bump version to "{version}"')
g.commit(message=f"Bump version to '{version}'")

g.tag(str(version))
if remote_name:
Expand Down Expand Up @@ -102,7 +102,7 @@ def create_deployment_branch(environment, remote_name=None, is_hot=False):
pass

g.checkout("HEAD", b=deployment_branch_name)
g.commit("--allow-empty", message='Deployment of "{}"'.format(source_branch_name))
g.commit("--allow-empty", message="Deployment of '{}'".format(source_branch_name))

if remote_name:
g.push(remote_name, deployment_branch_name, force=True)
Expand Down Expand Up @@ -181,7 +181,7 @@ def merge_release_branch(to_branch_name=None, remote_name=None):

# GitPython does not support merge --no-ff or what?
git_cmd = git.cmd.Git(".")
no_ff_commit = 'Merge branch "{}"'.format(source_branch_name)
no_ff_commit = f"Merge branch '{source_branch_name}'"
git_cmd.execute(
("git", "merge", "--no-ff", "-m", no_ff_commit, str(source_branch_name))
)
Expand Down
30 changes: 20 additions & 10 deletions developers_chamber/project_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,27 @@
from python_hosts.exception import UnableToWriteHosts
from python_hosts.hosts import Hosts, HostsEntry

from developers_chamber.bitbucket_utils import \
create_pull_request as bitbucket_create_pull_request
from developers_chamber.bitbucket_utils import (
create_pull_request as bitbucket_create_pull_request,
)
from developers_chamber.git_utils import get_current_branch_name
from developers_chamber.jira_utils import (clean_issue_key, get_issue_fields,
log_issue_time)
from developers_chamber.toggle_utils import (check_workspace_and_project,
get_full_timer_report,
get_running_timer_data,
start_timer, stop_running_timer)
from developers_chamber.utils import (call_command, call_compose_command,
pretty_time_delta)
from developers_chamber.jira_utils import (
clean_issue_key,
get_issue_fields,
log_issue_time,
)
from developers_chamber.toggle_utils import (
check_workspace_and_project,
get_full_timer_report,
get_running_timer_data,
start_timer,
stop_running_timer,
)
from developers_chamber.utils import (
call_command,
call_compose_command,
pretty_time_delta,
)

LOGGER = logging.getLogger()

Expand Down
5 changes: 3 additions & 2 deletions developers_chamber/scripts/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import click

from developers_chamber.bitbucket_utils import \
create_merge_release_pull_request as create_merge_release_pull_request_func
from developers_chamber.bitbucket_utils import (
create_merge_release_pull_request as create_merge_release_pull_request_func,
)
from developers_chamber.git_utils import get_current_branch_name
from developers_chamber.scripts import cli

Expand Down
67 changes: 36 additions & 31 deletions developers_chamber/scripts/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,46 @@

import click

from developers_chamber.ecs_utils import \
deploy_new_task_definition as deploy_new_task_definition_func
from developers_chamber.ecs_utils import \
get_services_names as get_services_names_func
from developers_chamber.ecs_utils import \
get_task_definition_for_service as get_task_definition_for_service_func
from developers_chamber.ecs_utils import \
get_tasks_for_service as get_tasks_for_service_func
from developers_chamber.ecs_utils import \
redeploy_cluster_services as redeploy_cluster_services_func
from developers_chamber.ecs_utils import \
redeploy_services as redeploy_services_func
from developers_chamber.ecs_utils import \
register_new_task_definition as register_new_task_definition_func
from developers_chamber.ecs_utils import \
run_service_task as run_service_task_func
from developers_chamber.ecs_utils import (
deploy_new_task_definition as deploy_new_task_definition_func,
)
from developers_chamber.ecs_utils import get_services_names as get_services_names_func
from developers_chamber.ecs_utils import (
get_task_definition_for_service as get_task_definition_for_service_func,
)
from developers_chamber.ecs_utils import (
get_tasks_for_service as get_tasks_for_service_func,
)
from developers_chamber.ecs_utils import (
redeploy_cluster_services as redeploy_cluster_services_func,
)
from developers_chamber.ecs_utils import redeploy_services as redeploy_services_func
from developers_chamber.ecs_utils import (
register_new_task_definition as register_new_task_definition_func,
)
from developers_chamber.ecs_utils import run_service_task as run_service_task_func
from developers_chamber.ecs_utils import run_task as run_task_func
from developers_chamber.ecs_utils import \
run_task_and_wait_for_success as run_task_and_wait_for_success_func
from developers_chamber.ecs_utils import \
start_cluster_services as start_cluster_services_func
from developers_chamber.ecs_utils import (
run_task_and_wait_for_success as run_task_and_wait_for_success_func,
)
from developers_chamber.ecs_utils import (
start_cluster_services as start_cluster_services_func,
)
from developers_chamber.ecs_utils import start_service as start_service_func
from developers_chamber.ecs_utils import start_services as start_services_func
from developers_chamber.ecs_utils import stop_service as stop_service_func
from developers_chamber.ecs_utils import \
stop_service_and_wait_for_tasks_to_stop as \
stop_service_and_wait_for_tasks_to_stop_func
from developers_chamber.ecs_utils import \
stop_services_and_wait_for_tasks_to_stop as \
stop_services_and_wait_for_tasks_to_stop_func
from developers_chamber.ecs_utils import \
update_service_to_latest_task_definition as \
update_service_to_latest_task_definition_func
from developers_chamber.ecs_utils import \
wait_for_services_stable as wait_for_services_stable_func
from developers_chamber.ecs_utils import (
stop_service_and_wait_for_tasks_to_stop as stop_service_and_wait_for_tasks_to_stop_func,
)
from developers_chamber.ecs_utils import (
stop_services_and_wait_for_tasks_to_stop as stop_services_and_wait_for_tasks_to_stop_func,
)
from developers_chamber.ecs_utils import (
update_service_to_latest_task_definition as update_service_to_latest_task_definition_func,
)
from developers_chamber.ecs_utils import (
wait_for_services_stable as wait_for_services_stable_func,
)
from developers_chamber.scripts import cli

default_region = os.environ.get("AWS_REGION")
Expand Down
25 changes: 15 additions & 10 deletions developers_chamber/scripts/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@

import click

from developers_chamber.git_utils import \
bump_version_from_release_tag as bump_version_from_release_tag_func
from developers_chamber.git_utils import \
checkout_to_release_branch as checkout_to_release_branch_func
from developers_chamber.git_utils import (
bump_version_from_release_tag as bump_version_from_release_tag_func,
)
from developers_chamber.git_utils import (
checkout_to_release_branch as checkout_to_release_branch_func,
)
from developers_chamber.git_utils import commit_version as commit_version_func
from developers_chamber.git_utils import \
create_deployment_branch as create_deployment_branch_func
from developers_chamber.git_utils import (
create_deployment_branch as create_deployment_branch_func,
)
from developers_chamber.git_utils import create_release as create_release_func
from developers_chamber.git_utils import \
create_release_branch as create_release_branch_func
from developers_chamber.git_utils import \
merge_release_branch as merge_release_branch_func
from developers_chamber.git_utils import (
create_release_branch as create_release_branch_func,
)
from developers_chamber.git_utils import (
merge_release_branch as merge_release_branch_func,
)
from developers_chamber.scripts import cli
from developers_chamber.types import EnumType, ReleaseType
from developers_chamber.version_utils import get_next_version, get_version
Expand Down
5 changes: 3 additions & 2 deletions developers_chamber/scripts/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import click

from developers_chamber.git_utils import get_current_branch_name
from developers_chamber.gitlab_utils import \
create_merge_request as create_merge_request_func
from developers_chamber.gitlab_utils import (
create_merge_request as create_merge_request_func,
)
from developers_chamber.scripts import cli

DEFAULT_API_URL = os.environ.get("GITLAB_API_URL", "https://gitlab.com/api/v4")
Expand Down
11 changes: 5 additions & 6 deletions developers_chamber/scripts/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import click

from developers_chamber.jira_utils import \
get_branch_name as get_branch_name_func
from developers_chamber.jira_utils import (get_current_user_issues,
get_issue_worklog)
from developers_chamber.jira_utils import \
invoke_issues_transition as invoke_issues_transition_func
from developers_chamber.jira_utils import get_branch_name as get_branch_name_func
from developers_chamber.jira_utils import get_current_user_issues, get_issue_worklog
from developers_chamber.jira_utils import (
invoke_issues_transition as invoke_issues_transition_func,
)
from developers_chamber.jira_utils import log_issue_time as log_issue_time_func
from developers_chamber.jira_utils import show_issue as show_issue_func
from developers_chamber.scripts import cli
Expand Down
44 changes: 28 additions & 16 deletions developers_chamber/scripts/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,37 @@
import click

from developers_chamber.bitbucket_utils import get_commit_builds
from developers_chamber.click.options import (ContainerCommandType,
ContainerDirToCopyType,
ContainerEnvironment)
from developers_chamber.click.options import (
ContainerCommandType,
ContainerDirToCopyType,
ContainerEnvironment,
)
from developers_chamber.git_utils import create_branch as create_branch_func
from developers_chamber.git_utils import (get_commit_hash,
get_current_branch_name)
from developers_chamber.git_utils import get_commit_hash, get_current_branch_name
from developers_chamber.jira_utils import get_branch_name
from developers_chamber.project_utils import bind_library as bind_library_func
from developers_chamber.project_utils import (compose_build, compose_exec,
compose_install,
compose_kill_all, compose_run,
compose_stop, compose_up)
from developers_chamber.project_utils import \
copy_containers_dirs as copy_containers_dirs_func
from developers_chamber.project_utils import \
create_or_update_pull_request as create_or_update_pull_request_func
from developers_chamber.project_utils import (docker_clean, set_hosts,
start_task, stop_task,
sync_timer_to_jira)
from developers_chamber.project_utils import (
compose_build,
compose_exec,
compose_install,
compose_kill_all,
compose_run,
compose_stop,
compose_up,
)
from developers_chamber.project_utils import (
copy_containers_dirs as copy_containers_dirs_func,
)
from developers_chamber.project_utils import (
create_or_update_pull_request as create_or_update_pull_request_func,
)
from developers_chamber.project_utils import (
docker_clean,
set_hosts,
start_task,
stop_task,
sync_timer_to_jira,
)
from developers_chamber.scripts import cli

default_project_name = os.environ.get("PROJECT_DOCKER_COMPOSE_PROJECT_NAME")
Expand Down
16 changes: 9 additions & 7 deletions developers_chamber/scripts/qa.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from developers_chamber.qa.base import QACheck, QACheckRunner
from developers_chamber.qa.checks import (ImportOrderQACheck,
MigrationFilenamesQACheck,
MissingMigrationsQACheck,
MissingTranslationsQACheck,
PrintStatementsQACheck,
TestMethodNamesQACheck,
UnusedImportsQACheck)
from developers_chamber.qa.checks import (
ImportOrderQACheck,
MigrationFilenamesQACheck,
MissingMigrationsQACheck,
MissingTranslationsQACheck,
PrintStatementsQACheck,
TestMethodNamesQACheck,
UnusedImportsQACheck,
)
from developers_chamber.scripts import cli


Expand Down
5 changes: 3 additions & 2 deletions developers_chamber/scripts/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import click

from developers_chamber.scripts import cli
from developers_chamber.slack_utils import \
upload_new_migration as upload_new_migration_func
from developers_chamber.slack_utils import (
upload_new_migration as upload_new_migration_func,
)
from developers_chamber.utils import MIGRATIONS_PATTERN

slack_bot_token = os.environ.get("SLACK_BOT_TOKEN")
Expand Down
11 changes: 7 additions & 4 deletions developers_chamber/scripts/toggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
import click

from developers_chamber.scripts import cli
from developers_chamber.toggle_utils import (get_full_timer_report,
get_running_timer_data,
get_timer_report, start_timer,
stop_running_timer)
from developers_chamber.toggle_utils import (
get_full_timer_report,
get_running_timer_data,
get_timer_report,
start_timer,
stop_running_timer,
)
from developers_chamber.utils import pretty_time_delta

api_key = os.environ.get("TOGGL_API_KEY")
Expand Down
5 changes: 3 additions & 2 deletions developers_chamber/scripts/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

from developers_chamber.scripts import cli
from developers_chamber.types import EnumType, ReleaseType
from developers_chamber.version_utils import \
bump_to_next_version as bump_to_next_version_func
from developers_chamber.version_utils import (
bump_to_next_version as bump_to_next_version_func,
)
from developers_chamber.version_utils import get_next_version, get_version

default_version_files = os.environ.get("VERSION_FILES", "version.json").split(",")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='developers-chamber',
version='0.1.4',
version='0.1.5',
description='A small plugin which help with development, deployment, git',
keywords='django, skripts, easy live, git, bitbucket, Jira',
author='Druids team',
Expand Down

0 comments on commit 074bbd1

Please sign in to comment.