From beb1c7f303307992f6c7fbc08f8c9d7fe0a326da Mon Sep 17 00:00:00 2001 From: lavadk Date: Mon, 17 May 2021 15:50:55 +0300 Subject: [PATCH] tengine -> tengi, pypi --- .gitmodules | 3 --- liker/command/handler_set_reactions.py | 4 ++-- liker/command/handler_take_message.py | 4 ++-- liker/command/handler_update_markup.py | 4 ++-- liker/command/params.py | 4 ++-- liker/custom_markup/channel_post_handler.py | 4 ++-- liker/custom_markup/comment_handler.py | 6 +++--- liker/custom_markup/markup_synchronizer.py | 2 +- liker/custom_markup/markup_utils.py | 2 +- liker/enabling_manager.py | 2 +- liker/run.py | 2 +- liker/setup/daemons.py | 2 +- liker/setup/dependencies.py | 2 +- liker/setup/logs.py | 2 +- liker/state/channel_state.py | 4 ++-- liker/state/comment_trail.py | 2 +- liker/state/enabled_channels.py | 4 ++-- liker/state/markup_trail.py | 2 +- liker/state/reaction_hashes.py | 4 ++-- requirements.txt | 1 + requirements_test.txt | 1 + tengine | 1 - tests/test_integrated_ping.py | 4 ++-- 23 files changed, 32 insertions(+), 34 deletions(-) delete mode 160000 tengine diff --git a/.gitmodules b/.gitmodules index 9f6eb4a..e8df7df 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "tengine"] - path = tengine - url = https://github.com/luckybots/tengine.git [submodule "helpy_files"] path = helpy_files url = https://github.com/luckybots/helpy_files diff --git a/liker/command/handler_set_reactions.py b/liker/command/handler_set_reactions.py index fb23841..c193706 100644 --- a/liker/command/handler_set_reactions.py +++ b/liker/command/handler_set_reactions.py @@ -1,7 +1,7 @@ import inject import logging -from tengine.command.command_handler import * -from tengine import telegram_bot_utils +from tengi.command.command_handler import * +from tengi import telegram_bot_utils from liker.state.enabled_channels import EnabledChannels from liker.enabling_manager import EnablingManager diff --git a/liker/command/handler_take_message.py b/liker/command/handler_take_message.py index 975a019..3a77c93 100644 --- a/liker/command/handler_take_message.py +++ b/liker/command/handler_take_message.py @@ -2,8 +2,8 @@ import logging import time from telebot.apihelper import ApiTelegramException -from tengine.command.command_handler import * -from tengine import TelegramBot, TelegramApi, telegram_api_utils, telegram_error +from tengi.command.command_handler import * +from tengi import TelegramBot, TelegramApi, telegram_api_utils, telegram_error from liker.setup import constants from liker.custom_markup import markup_utils diff --git a/liker/command/handler_update_markup.py b/liker/command/handler_update_markup.py index c006193..e1f4432 100644 --- a/liker/command/handler_update_markup.py +++ b/liker/command/handler_update_markup.py @@ -1,9 +1,9 @@ import inject import logging -from tengine.command.command_handler import * +from tengi.command.command_handler import * from telebot.types import InlineKeyboardMarkup, Message from typing import Tuple -from tengine import CommandMissingArgError +from tengi import CommandMissingArgError from liker.state.enabled_channels import EnabledChannels from liker.state.space_state import SpaceState diff --git a/liker/command/params.py b/liker/command/params.py index 1acb888..b902428 100644 --- a/liker/command/params.py +++ b/liker/command/params.py @@ -1,6 +1,6 @@ -from tengine import CommandParam, tengine_command_params +from tengi import CommandParam, tengi_command_params -command_params = tengine_command_params.params + [ +command_params = tengi_command_params.params + [ CommandParam(name='--channel_id', help_str='Channel id', param_type=str), diff --git a/liker/custom_markup/channel_post_handler.py b/liker/custom_markup/channel_post_handler.py index c2a51ea..2e64f55 100644 --- a/liker/custom_markup/channel_post_handler.py +++ b/liker/custom_markup/channel_post_handler.py @@ -2,8 +2,8 @@ import inject from telebot.apihelper import ApiTelegramException from telebot.types import InlineKeyboardMarkup -from tengine import Config, TelegramBot, telegram_bot_utils, Hasher, AbuseDetector, ReplyContextSuppress -from tengine.telegram.inbox_handler import * +from tengi import Config, TelegramBot, telegram_bot_utils, Hasher, AbuseDetector, ReplyContextSuppress +from tengi.telegram.inbox_handler import * from liker.state.space_state import SpaceState from liker.state.enabled_channels import EnabledChannels diff --git a/liker/custom_markup/comment_handler.py b/liker/custom_markup/comment_handler.py index 4a8e0e8..c9e5ca5 100644 --- a/liker/custom_markup/comment_handler.py +++ b/liker/custom_markup/comment_handler.py @@ -1,9 +1,9 @@ import logging import inject from telebot.types import InlineKeyboardMarkup -from tengine import telegram_bot_utils -from tengine.telegram.inbox_handler import * -from tengine.telegram.constants import TELEGRAM_USER_ID +from tengi import telegram_bot_utils +from tengi.telegram.inbox_handler import * +from tengi.telegram.constants import TELEGRAM_USER_ID from liker.state.enabled_channels import EnabledChannels from liker.state.space_state import SpaceState diff --git a/liker/custom_markup/markup_synchronizer.py b/liker/custom_markup/markup_synchronizer.py index 1cc646f..6dc3f46 100644 --- a/liker/custom_markup/markup_synchronizer.py +++ b/liker/custom_markup/markup_synchronizer.py @@ -4,7 +4,7 @@ from telebot.apihelper import ApiTelegramException from typing import Optional from telebot.types import InlineKeyboardMarkup -from tengine import Config, TelegramBot, telegram_error +from tengi import Config, TelegramBot, telegram_error from liker.state.enabled_channels import EnabledChannels from liker.state.space_state import SpaceState diff --git a/liker/custom_markup/markup_utils.py b/liker/custom_markup/markup_utils.py index 77c37ca..9933126 100644 --- a/liker/custom_markup/markup_utils.py +++ b/liker/custom_markup/markup_utils.py @@ -1,7 +1,7 @@ import logging from telebot import types from typing import Iterable, List, Optional -from tengine import telegram_bot_utils +from tengi import telegram_bot_utils from liker.setup import constants diff --git a/liker/enabling_manager.py b/liker/enabling_manager.py index 87015b0..a694fc6 100644 --- a/liker/enabling_manager.py +++ b/liker/enabling_manager.py @@ -1,7 +1,7 @@ import logging import inject from telebot.apihelper import ApiTelegramException -from tengine import Config, telegram_bot_utils, TelegramBot, ReplyContext +from tengi import Config, telegram_bot_utils, TelegramBot, ReplyContext from liker.state.enabled_channels import EnabledChannels diff --git a/liker/run.py b/liker/run.py index 0bfcf9b..41cfb1a 100644 --- a/liker/run.py +++ b/liker/run.py @@ -1,7 +1,7 @@ # noinspection PyUnresolvedReferences from liker.setup import logs # has import side effect import inject -from tengine import App +from tengi import App from liker.setup.dependencies import bind_app_dependencies from liker.setup.daemons import create_daemon_instances diff --git a/liker/setup/daemons.py b/liker/setup/daemons.py index 6842522..3df989b 100644 --- a/liker/setup/daemons.py +++ b/liker/setup/daemons.py @@ -1,5 +1,5 @@ import inject -from tengine import MessagesLogger, AbuseJanitor, TelegramApi +from tengi import MessagesLogger, AbuseJanitor, TelegramApi def create_daemon_instances(): diff --git a/liker/setup/dependencies.py b/liker/setup/dependencies.py index 9d1f4af..5e55609 100644 --- a/liker/setup/dependencies.py +++ b/liker/setup/dependencies.py @@ -1,6 +1,6 @@ from inject import Binder import inject -from tengine import * +from tengi import * from liker.setup import constants from liker.command.params import command_params diff --git a/liker/setup/logs.py b/liker/setup/logs.py index 7f04d88..91ccb40 100644 --- a/liker/setup/logs.py +++ b/liker/setup/logs.py @@ -49,7 +49,7 @@ def setup_logs(): 'level': 'DEBUG', 'propagate': True, }, - 'tengine': { + 'tengi': { 'handlers': ['console', 'file', 'error'], 'level': 'DEBUG', 'propagate': True, diff --git a/liker/state/channel_state.py b/liker/state/channel_state.py index 9bc9e3b..5ebf7b5 100644 --- a/liker/state/channel_state.py +++ b/liker/state/channel_state.py @@ -1,7 +1,7 @@ from pathlib import Path import inject -from tengine.state.timed_preserver import TimedPreserver -from tengine import Config +from tengi.state.timed_preserver import TimedPreserver +from tengi import Config from liker.state.reaction_hashes import ReactionHashes from liker.state.markup_queue import MarkupQueue diff --git a/liker/state/comment_trail.py b/liker/state/comment_trail.py index c515277..a04f379 100644 --- a/liker/state/comment_trail.py +++ b/liker/state/comment_trail.py @@ -3,7 +3,7 @@ from jsonstore import JsonStore from typing import Optional from typeguard import typechecked -from tengine import Config +from tengi import Config logger = logging.getLogger(__file__) diff --git a/liker/state/enabled_channels.py b/liker/state/enabled_channels.py index 77e5203..655b2b7 100644 --- a/liker/state/enabled_channels.py +++ b/liker/state/enabled_channels.py @@ -1,7 +1,7 @@ from typeguard import typechecked from typing import List, Optional -from tengine.state.preserver import * -from tengine import telegram_bot_utils +from tengi.state.preserver import * +from tengi import telegram_bot_utils class EnabledChannels(Preserver): diff --git a/liker/state/markup_trail.py b/liker/state/markup_trail.py index 3c24d1b..e7f3331 100644 --- a/liker/state/markup_trail.py +++ b/liker/state/markup_trail.py @@ -3,7 +3,7 @@ from jsonstore import JsonStore from typing import Optional from typeguard import typechecked -from tengine import Config +from tengi import Config logger = logging.getLogger(__file__) diff --git a/liker/state/reaction_hashes.py b/liker/state/reaction_hashes.py index 8e5b02e..bb65f5e 100644 --- a/liker/state/reaction_hashes.py +++ b/liker/state/reaction_hashes.py @@ -1,6 +1,6 @@ import inject -from tengine import Config -from tengine.state.timed_preserver import * +from tengi import Config +from tengi.state.timed_preserver import * class ReactionHashes(TimedPreserver): diff --git a/requirements.txt b/requirements.txt index 2c3d334..70d0379 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ rsa==4.7.2 Telethon==1.21.1 typeguard==2.12.0 urllib3==1.26.4 +tengi diff --git a/requirements_test.txt b/requirements_test.txt index 66f7f16..3a164d3 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -17,3 +17,4 @@ requests==2.25.1 six==1.15.0 toml==0.10.2 urllib3==1.26.3 +tengi diff --git a/tengine b/tengine deleted file mode 160000 index 120835b..0000000 --- a/tengine +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 120835b501441e975bbe517d38dc72ce302ea7a9 diff --git a/tests/test_integrated_ping.py b/tests/test_integrated_ping.py index 7419c5c..6b70ab6 100644 --- a/tests/test_integrated_ping.py +++ b/tests/test_integrated_ping.py @@ -2,8 +2,8 @@ import pytest from pathlib import Path from telebot import TeleBot -from tengine.app import App -from tengine.tests.test_utils import get_telegram_message_update +from tengi.app import App +from tengi.tests.test_utils import get_telegram_message_update @pytest.fixture()