Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use https://github.com/jedie/cli-base-utilities #88

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manageprojects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Manage Python / Django projects
"""

__version__ = '0.13.0'
__version__ = '0.14.0'
__author__ = 'Jens Diemer <[email protected]>'
2 changes: 1 addition & 1 deletion manageprojects/cli/cli_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import rich_click as click
from bx_py_utils.path import assert_is_dir, assert_is_file
from cli_base.cli_tools.subprocess_utils import verbose_check_call
from rich import print # noqa
from rich_click import RichGroup

Expand All @@ -29,7 +30,6 @@
from manageprojects.data_classes import CookiecutterResult
from manageprojects.format_file import format_one_file
from manageprojects.utilities.log_utils import log_config
from manageprojects.utilities.subprocess_utils import verbose_check_call
from manageprojects.utilities.version_info import print_version


Expand Down
2 changes: 1 addition & 1 deletion manageprojects/cli/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import rich_click as click
from bx_py_utils.path import assert_is_file
from cli_base.cli_tools.subprocess_utils import verbose_check_call
from rich import print # noqa; noqa
from rich_click import RichGroup

import manageprojects
from manageprojects import constants
from manageprojects.utilities import code_style
from manageprojects.utilities.publish import publish_package
from manageprojects.utilities.subprocess_utils import verbose_check_call
from manageprojects.utilities.version_info import print_version


Expand Down
2 changes: 1 addition & 1 deletion manageprojects/format_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Optional

from bx_py_utils.dict_utils import dict_get
from cli_base.cli_tools.subprocess_utils import ToolsExecutor
from editorconfig import EditorConfigError, get_properties
from packaging.specifiers import SpecifierSet
from packaging.version import Version
Expand All @@ -13,7 +14,6 @@
from manageprojects.exceptions import NoPyProjectTomlFound
from manageprojects.git import Git, GitError, NoGitRepoError
from manageprojects.utilities.pyproject_toml import TomlDocument, get_pyproject_toml
from manageprojects.utilities.subprocess_utils import ToolsExecutor


MAX_PY3_VER = 15
Expand Down
3 changes: 1 addition & 2 deletions manageprojects/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
from shutil import which

from bx_py_utils.path import assert_is_file
from cli_base.cli_tools.subprocess_utils import verbose_check_call, verbose_check_output
from packaging.version import InvalidVersion, Version

from manageprojects.utilities.subprocess_utils import verbose_check_call, verbose_check_output


logger = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions manageprojects/test_utils/click_cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
import rich_click
from bx_py_utils.path import assert_is_file
from bx_py_utils.test_utils.context_managers import MassContextManager
from cli_base.cli_tools.subprocess_utils import verbose_check_output
from click.testing import CliRunner, Result

from manageprojects.utilities.subprocess_utils import verbose_check_output


TERMINAL_WIDTH = 100

Expand Down
2 changes: 1 addition & 1 deletion manageprojects/tests/test_utilities_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from unittest import TestCase
from unittest.mock import patch

from cli_base.cli_tools import subprocess_utils
from packaging.version import Version

import manageprojects
Expand All @@ -12,7 +13,6 @@
from manageprojects.test_utils.logs import AssertLogs
from manageprojects.test_utils.subprocess import FakeStdout, SubprocessCallMock
from manageprojects.tests.base import GIT_BIN_PARENT
from manageprojects.utilities import subprocess_utils
from manageprojects.utilities.publish import (
PublisherGit,
build,
Expand Down
1 change: 0 additions & 1 deletion manageprojects/tests/test_version_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def test_no_git(self):
with AssertLogs(self, loggers=('manageprojects',)) as logs, RedirectOut() as buffer:
print_version(module=manageprojects, project_root=temp_path)

self.assertEqual(buffer.stderr, '')
self.assertIn(f'manageprojects v{__version__} ', buffer.stdout)

logs.assert_in('Error print version', 'Traceback')
3 changes: 1 addition & 2 deletions manageprojects/utilities/code_style.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import sys
from pathlib import Path


from manageprojects.utilities.subprocess_utils import ToolsExecutor, verbose_check_call
from cli_base.cli_tools.subprocess_utils import ToolsExecutor, verbose_check_call


def _call_darker(*args, package_root: Path, color: bool = True, verbose: bool = False):
Expand Down
2 changes: 1 addition & 1 deletion manageprojects/utilities/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import sys

from cli_base.cli_tools.subprocess_utils import verbose_check_call, verbose_check_output
from packaging.version import Version
from rich import print # noqa

from manageprojects.git import Git, GitError
from manageprojects.utilities.subprocess_utils import verbose_check_call, verbose_check_output


def exit_with_error(txt, hint=None):
Expand Down
246 changes: 0 additions & 246 deletions manageprojects/utilities/subprocess_utils.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"codespell", # https://github.com/codespell-project/codespell
"mypy", # https://github.com/python/mypy

"bx_py_utils", # https://github.com/boxine/bx_py_utils
"cli-base-utilities", # https://github.com/jedie/cli-base-utilities
"click", # https://github.com/pallets/click/
"rich-click", # https://github.com/ewels/rich-click
"rich", # https://github.com/Textualize/rich
Expand Down
Loading