This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Импорт изменений для версии 0.3.0 и для удаления ветви develop (#193)
* Updating Python to version 3.10 (#122) also updated uvicorn, fastapi, jinja2, websockets * Переход на python 3.10 (замена If-Else на Match-Case) и переделка системы генерации ошибок (#123) * feat(error): error dictionary is replaced by the function new function "check_error_pattern" checking the error status against the class HTTPStatus or ServerStatus * fix(controller): error codes are replaced by their text descriptions * feat(test_error): added new test for error.py * fix(error): "check_error_pattern" function has been fixed * fix(test_error): minor edits to the test code * refactor: minor changes * BREAKING CHANGE(controller): if-else is replaced by match-case - the "check_auth_token function" is converted into decorator - methods requiring user authentication wrapped in "check_auth_token" decorator * feat(controller): Added new classes Error and User - the __catch_error method functionality will be moved to the Error class - the __check_auth_token method functionality will be moved to the User class - minor changes * fix(test_controller) fixed tests "check_auth" class method * fix(test_controller): fixed all tests in class TestCheckAuthToken * feat(controller): the check_login method has been moved to the User class * refactor(test): small corrections in the code * fix(controller) Fixed bug in UUID generation for flow * refactor: minor changes * Изменения для выполнения тикетов #98 #50 (#124) * fix(test): added client_id in "api.json" * fix(api): validation is enabled a separate validation class for requests and responses is added * BREAKING CHANGE(controller): methods and "Errors" class have been changed - to all methods of the class, the passed parameter "request", and the returned object "response" are added. - the "catching_error" method now returns "api.Errors" object - the "get_response" method now returns a validated json object. * BREAKING CHANGE(api): separate validation for requests and responses * refactor(controller): renaming calls to instances of classes responsible for validating queries and responses * fix(test): fixed in test_api * fix(controller): small corrections * fix(api) small corrections in the declaration of "data" and "client_id" * fix(test): test fixes after modifying controller.py * Исправления в системе тестирования кода, закрытие тикетов #125 #126 #101 #100 (#127) * feat(test_api): added test for wrong json * feat(test): added test for wrong response and request and added new fixtures for tests * feat(test): New tests for validation have been added * fix(error): corrected the "check_error_pattern" function - added exception catching related to wrong type of "status" parameter and a non-existent error name * fix(test): Fixed tests for the "check_error_pattern" function * refactor(test): remove unused import * refactor(lib): minor changes * fix(test): added cleint_id in fixtures * fix(test): code readability improved * fix(lib): added decorator property * feat(test): added new test - checking false status in password_check - checking get_key and get_salt * fix(test): Move the test JSON objects from the test_controller.py file to the directory with the fixtures. * fix(controller): the class method call is replaced by the attribute * refactor(test): delete unused object * feat(config): added setup.cfg to configure flake8 and coverage * fix(test): minor changes * feat(setup.cfg): the skip test setting has been added for coverage * fix(api): delete print scheme * fix(controller): small improvements to increase code coverage by tests * fix(pipfile): update dependencies * fix(pipfile) added coverage to pipfile.lock * Добавлена панель администратора (#129) * init admin * add logging uvicorn setting * add bootstrap in admin * add fastapi-login libary in pipfile * add login.py * fix * fix * fix cookies * add logout and exception handler * fix bug login exception * add login form * fix bug * fix * fix bug * add status.html * add logs view * add delete user * fix * refactoring manage.py and change password to hashPassword * Squashed commit of the following: commit 33d192f Author: Stepan Skriabin <stepan.skrjabin@gmail.com> Date: Tue Oct 26 20:40:42 2021 +0300 Исправления в системе тестирования кода, закрытие тикетов #125 #126 #101 #100 (#127) * feat(test_api): added test for wrong json * feat(test): added test for wrong response and request and added new fixtures for tests * feat(test): New tests for validation have been added * fix(error): corrected the "check_error_pattern" function - added exception catching related to wrong type of "status" parameter and a non-existent error name * fix(test): Fixed tests for the "check_error_pattern" function * refactor(test): remove unused import * refactor(lib): minor changes * fix(test): added cleint_id in fixtures * fix(test): code readability improved * fix(lib): added decorator property * feat(test): added new test - checking false status in password_check - checking get_key and get_salt * fix(test): Move the test JSON objects from the test_controller.py file to the directory with the fixtures. * fix(controller): the class method call is replaced by the attribute * refactor(test): delete unused object * feat(config): added setup.cfg to configure flake8 and coverage * fix(test): minor changes * feat(setup.cfg): the skip test setting has been added for coverage * fix(api): delete print scheme * fix(controller): small improvements to increase code coverage by tests * fix(pipfile): update dependencies * fix(pipfile) added coverage to pipfile.lock * merge develop into this banch * fix * add license notification in new file * fix * Update Pipfile.lock * fix * fix * fix typehintings * fix * fix test_admin.py * fix config example * fix * fix naming log_list to log_string * change name manage.py to control.py * Добавление дополнительной абстракции для работы с бд #128 (#136) * feat(dbhandlers): add new class DbHelpers for work with database * fix(dbhandler): Added an indication of type of returned data * feat(dbhandler): added new error exceptions and new attribute * feat(dbhandler): additional methods to the class - added __repr__ and __str__ - added methods with date filtering (more, less or equal) - small changes in code readability * feat(dbhandler): added new property "debug" - added new attribute - debug, logger, loglevel * Реализация единой точки обработки конфигурационного файла (#137) * feat: added config.py as a single point to read settings from config.ini * fix(dbhandler): Fixed an error in writing table fields from parameters passed to the method * Разделение кода протокола и контроллера #139 (#141) * feat(controller): Creating the MainHandler method in which the protocol selection is implemented -- main code from controller moved to worker.py of the mtp module -- api.py is now part of the mtp module -- added the matrix module as a stub * BREAKING CHANGE(error): result of check_error_pattern function is now replaced by namedtuple * feat(server): fixed name ProtocolMethod to MainHandler * fix(tests): fixed file name * feat(tests): new test fo controller.py * fix(server): fixed type of response object * fix(controller): added get_response method fixed types returned in mtp_handler and matrix_handler * fix(mtp.worker): fixed catch_error object in MTPErrorResponse * fix(fixtures): fixed name in type * fix(fixtures): fixed test - rename ProtocolMethods to MTProtocol - rename ErrorResponse to MTPErrorResponse * fix(dbhandler): removed the default parameter with the database address * fix(dbhandler): fixed default parameter to 'sqlite:/:memory:' * fix(controller): Copyright's year is corrected * Небольшие правки кода перед переносов в мастер и релизом версии 0.1.0 (#143) * feat(contoller): added class Clients for collect clients session * fix(server): the ability to account for connected clients has been completely removed * fix: added ebala * fix: minor changes and error fixed * fix(controller): added docstring for MainHandler * fix(dbhandler): added docstring for DBHandler and minor changes in methods * fix(server): fixed bugs in static directory * fix(mtp): fixed errors * feat(tests): added one test for MatrixProtocol * fix(setup.cfg): fixed name * BREAKING CHANGE:(pipfile): bump'ed dependencies (fastapi, uvicorn, jinja2, websockets, pydantic, requests) * refactor:(readme): update readme.md * fix: fixed some errors * fix(server): fixed type of response * fix(client): added auth_id * fix(readme): delete link to Trello * delete "t.py" in .gitignore * update Pipfile.lock and add bpython package * delete header in example_config.ini * fix bug #149 * fix bug #148 * fix bug #147 * Create python-app.yml * Update and rename python-app.yml to test_and_linting.yml * Update test_and_linting.yml * Update test_and_linting.yml * fix tests bugs * Update test_and_linting.yml * Update test_and_linting.yml * Update test_and_linting.yml * Update test_and_linting.yml * add Dockerfile * fix Dockerfile * Create docker-image.yml * Delete docker-image.yml * fix bug config load * add tests for server.py * Update README.md * Update test_and_linting.yml * Update README.md * Create docker-publish-image.yaml * Delete docker-publish-image.yaml * Create coveralls.yml * Update coveralls.yml * Delete coveralls.yml * Update test_and_linting.yml * Update test_and_linting.yml * Update test_and_linting.yml * Update README.md * Update test_and_linting.yml * Create docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Update docker-publish-image.yml * Rename docker-publish-image.yml to docker-publish-image-unstable.yml * Create docker-publish-image-stable.yml * Update docker-publish-image-unstable.yml * Update docker-publish-image-stable.yml * Update docker-publish-image-stable.yml * Update docker-publish-image-unstable.yml * Update docker-publish-image-unstable.yml * Update docker-publish-image-stable.yml * Update docker-publish-image-unstable.yml * Update docker-publish-image-unstable.yml * feat(doc): initial commit for added documentation in project * fixed(config): move config.py to the root of the project * refactor(controller): delete unused imports * feat(Pipfile): added "furo" theme and fixing package version * fixed(Pipfile): update Pipfile.lock * refactor(matrix): delete unused imports * feat(sphinx): added extension module - duration, autodoc, autosummary * feat(sphinx): added new pages development, doc, install * feat(sphinx): added extension "napoleon" to use Google style docstring * refactor: refactoring docstrings and fixed errors * feat(doc): update index.rst and doc.rst which added new documentation about project * feat(gitignore): add "log" in "docs" directory * docs(models): correcting and expanding existing documentation * docs(logging): correcting and expanding existing documentation * docs(matrix): correcting and expanding existing documentation * docs(error): correcting and expanding existing documentation * docs(lib): correcting and expanding existing documentation * docs(controller): correcting and expanding existing documentation * docs(server): correcting and expanding existing documentation * docs(mtp): correcting and expanding existing documentation * docs(mtp): correcting and expanding existing documentation * docs(dbhandler): correcting and expanding existing documentation * docs(sphinx): added new documents description * feat(sphinx): added extension which generated ".nojekyll" for GitHub Pages * docs(readme): fixed minor errors * docs(licence): added new licence.rst file * docs(development): added full info about project development * docs(install): added full info about project install and run * docs(index): added new section "Contacts" and other minor changes * docs(sphinx) corrected text in doc.rst * docs(doc): minor changes * fixed(tests): fixed minor errors * fixed: added two modules ("db", "protocol") in init file in "mod" * updated version of loguru to 0.6.0, fixing vulnerability CVE-2022-0329 * feat: added "revision" in MTP api and worker * feat: added "token_ttl" in database models and dbhandler class * feat(error): added new status code 505 "VERSION_NOT_SUPPORTED" * fixed(tests): added new test for jsonapi and minor changes * feat(tests): added checking new fields: "token_ttl", "client_id", "key", "salt", "revision" * fixed(tests): added new test for jsonapi and minor changes * feat(tests): added checking new fields: "token_ttl", "client_id", "key", "salt", "revision" * add test main page for server.py * fix * fix * fix * Create docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * Update test_and_linting.yml * Update test_and_linting.yml * Update test_and_linting.yml * Update and rename test_and_linting.yml to tests.yml * add python-coveralls in dev-dependencies and update Pipfile.lock * Update tests.yml * fix * fix * add test * fix test * fix test * fix test * Update README_ENG.md * fix test * fix test * fix test * fix docs * fix docs * fix docs * fix docs * fix docs * fix test_server.py * fix test_server.py * fix test_server.py * fix test_server.py * fix test_server.py * fix docs * fix docs * feat(validator): added validator.py to validate config file * feat(test): added tests for validator.py * feat(config): added new module config * fix(validator): many classes convert to one main class ConfigModel with pydantic validation and fixed tests in test_validator.py * feat(config): add new ConfigHandler method - read, write and fixed other hidden methods * feat(tests): add new test for ConfigHandler * feat(mod_config): add new class for exceptions, methods which added: _set_configparser(), _backup_file(). also added str and repr dunder-methods, added property to set root directory and config name, finalized write method, * feat(gitignore): add backup file * fixed(tests): fixed some errors in test validator * fixed(config): delete autoimport validator.py * feat(lib): added function to rebuild config.ini on example_config.ini * feat(tests): added test for rebuild_config() * fixed(config): fixed some errors and minor changes for good work * feat(tests): added new test for config.py * fixed: fixed importing config options from config.ini * refactor: added copyright and blank line * refactor: moving rebuild_config to ConfigHandler * fixed: update gitignore * feat(tests): added new fixtures and new tests for config module * feat(config): added _copy_string() and rebuild_config() added new errors: RebuildConfigError, CopyConfigError and other minor changes * feat(config): added _copy_string() and rebuild_config() added new errors: RebuildConfigError, CopyConfigError and other minor changes * fixed(tests): rename exeption * fixed(tests): delete non_write_config.ini * doc(config): added documentation for config module * fixed(config): delete unused import, delete if...else in property methods, delete unused exceptions in write() * fixed(tests): fixed bug #157 - SQL flood * fixed(workflow): fixed moved file to copy file * fixed(validator): fixed some bugs * fixed(validator): fixed some bugs * fixed(validator): fixed some bugs * fixed: fixed bug #171 - rename "password" to "size_password" and "auth_id" to "size_auth_id" in config file * feat: added rules fo code documentation and template to pull request (PR) (#175) * Добавление линтера в actions и реализация функции проверки версии API протокола используемого клиентом (#179) * refactor(controller): rename mtp_handler and matrix_hamdler to private type methods * feat(worker): added function for server to control client version API - added new methods _check_protocol_version() - added new parameters MAX_VERSION and MIN_VERSION to config.ini and example_config.ini - added validation for new parameters - fixed test - also add docstring to _check_auth() * fix: fixed parameters name contains on example_config.ini * feat: added auto linting all commits * fixed: fixed all flake8 warning and errors, information about running flake8 added in project documentation * Объединён код manage.py, debug_server.py и client.py (#181) * add run * add * finish client * Update README.md * add register_user method * add get_update and send_message methods * add all_messages method * refactor all client))) * mini fix * add scripts binding for manage.py * #93 * Update docker-publish-image-stable.yml * Update docker-publish-image-unstable.yml * fix * fix * fix for linting successful * Update README.md * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * Добавлена проверка типов (#184) * add mypy * fix code * new batch of type conflict fixes * new batch of type conflict fixes * fix imports in admin module * fix types in api.py * new batch of type conflict fixes * new batch of type conflict fixes * fix * new batch of type conflict fixes * new batch of type conflict fixes * fix for flake8 * fix * Update tests.yml * fix * fix imports * fix imports * fix docstrings * fix imports * Закрыты ошибки #170 #96 (#186) * fixed(error): Closed #170 - optimized code in the try...except structure - CatchError class was moved outside the function check_error_pattern() - change check_error_pattern() returns to CatchError | Exception - fixed docstrings and tests. * fixed(db): fix text message return in DatabaseWriteError * fixed(error): change CatchError to NamedTuple class * fixed(error): fixed docstrings * fixed(error): delete Exception in function type returns * fix(manage): add option "--login" in flow-create cli command user search by UUID is replaced by login search * fixed(db): fix text message return in DatabaseReadError and DatabaseAccessError * fixed(manage): fixed uuid type in create_flow() and admin_create_user() * feat(tests): add test for manage.py - create_user() - create_flow() - admin_create_user() - db_create() - db_delete() * fixed: rename logging.py to log_handler.py because asyncio imports a logging module with the same name as the project's logging module * fixed: fixed several errors, test_send_normal_message skip * fixed(manage): added cli option "--uri" for db_create() and db_delete() fixed several errors in tests_manage.py * fixed(server): fixed logger module name * fixed(manage): fixed raise to click.echo in try...except from function db_create() and db_delete() add typing in test_manage.py * Исправлена проблема при создании образа Docker (#190) * fix * update * update * update * update * update * update * update * update * update * update * update * fix format code * change runner to self-hosted * Revert "change runner to self-hosted" This reverts commit a2832cd. * fix branch * fix * fix * some changes * some changes * some changes * some changes * final fix docker and frezee * fix * fix * fix * Update docker-publish-image.yml * Update docker-publish-image.yml * fix * fix * Update docker-publish-image.yml * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * Update CHANGES.md * fix Co-authored-by: Stepan Skriabin <stepan.skrjabin@gmail.com>
- Loading branch information