diff --git a/pyproject.toml b/pyproject.toml index c93b41a94..bac9fd4e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,10 +53,10 @@ asyncz = "^0.5.0" nicegui = "^1.3.15" ping3 = "^4.0.4" talkytrend = "2.0.5" -iamlistening = "4.2.46" -findmyorder = "1.9.15" -dxsp = "7.0.14" -cefi = "3.4.2" +iamlistening = "5.0.0" +findmyorder = "1.9.17" +dxsp = "8.0.0" +cefi = "4.0.0" myllm = "4.7.0" @@ -117,19 +117,23 @@ testpaths = "tests" [tool.ruff] exclude = [ ".github/*", - "docs/*" + "docs/*", ] -fixable = ["ALL"] + +[tool.ruff.lint] select = [ "E", # pycodestyle "F", # pyflakes - "I" # isort + "I", # isort + "W" ] +#ignore = ["E401","F401","F811"] +fixable = ["ALL"] -[tool.black] -line-length = 88 -target-version = ['py310', 'py311'] +[tool.ruff.format] +# Like Black, use double quotes for strings. +quote-style = "double" [tool.coverage.run] omit = [ diff --git a/tt/config.py b/tt/config.py index 7be2705b6..c88963aae 100644 --- a/tt/config.py +++ b/tt/config.py @@ -21,7 +21,7 @@ """ If you use 1Password to store your settings, - you can use :file:`.secrets.toml` to retrieve and + you can use :file:`.secrets.toml` to retrieve and store your settings from a notesPlain item. more info: https://support.1password.com/command-line-getting-started/ @@ -31,7 +31,7 @@ - OP_ITEM: your 1Password item - OP_PATH: your one 1Password path (optional and default value `/usr/bin/op`) - The :file:`.secrets.toml` will be located in :file:`/tt/.secrets.toml` and + The :file:`.secrets.toml` will be located in :file:`/tt/.secrets.toml` and be created by the OP client via `op read op://vault/item/notesPlain > .secrets.toml` """ @@ -56,13 +56,13 @@ """ Settings are loaded via dynaconf - Dynaconf is a powerful and easy-to-use + Dynaconf is a powerful and easy-to-use management library for Python. It supports TOML settings file, .env file or environment variable, and other types. Refer to https://github.com/dynaconf/dynaconf for more information. More than 100 settings customizable via settings.toml or .env. - Most of them are predefined and you only need to + Most of them are predefined and you only need to update the credentials related to your exchange and chat platform Config will load: @@ -71,12 +71,12 @@ - user settings: settings.toml - user secrets: .secrets.toml - Your settings should be setup in - settings.toml, - .secrets.toml, - .env or + Your settings should be setup in + settings.toml, + .secrets.toml, + .env or environment variable. - Settings.toml or .env can be located in :file:`/app/settings.toml` + Settings.toml or .env can be located in :file:`/app/settings.toml` or :file:`/app/.env` for docker. If deployed locally, place your file in :file:`/tt/` folder. @@ -115,7 +115,7 @@ More info: https://github.com/tarsil/asyncz It allows you to schedule tasks at plugin level. -Refer to the plugin documentation +Refer to the plugin documentation :file:`tt.plugins.plugin_manager` """ @@ -193,8 +193,8 @@ def loguru_setup(): if settings.loglevel == "DEBUG": loguru_logger.warning( """ - DEBUG ENABLED, - You can disable it + DEBUG ENABLED, + You can disable it loglevel='INFO' in settings.toml TT_LOGLEVEL=INFO in your .env or vars. """ diff --git a/tt/plugins/plugin_manager.py b/tt/plugins/plugin_manager.py index 5f34b0406..891744e1f 100644 --- a/tt/plugins/plugin_manager.py +++ b/tt/plugins/plugin_manager.py @@ -277,7 +277,7 @@ async def handle_message(self, msg): def should_handle_timeframe(self): """ - Returns True if the current day and time + Returns True if the current day and time are within the configured trading window. Use to control trading hours for plugins @@ -296,4 +296,4 @@ def should_handle_timeframe(self): and start_time <= current_time <= end_time ) - return True \ No newline at end of file + return True diff --git a/tt/talky_settings.toml b/tt/talky_settings.toml index faf5fb9af..77b4cac72 100644 --- a/tt/talky_settings.toml +++ b/tt/talky_settings.toml @@ -402,6 +402,7 @@ myllm_enabled = true # [default.platform.template] # platform = "" +# enabled = false # bot_token = "" # bot_channel_id = "" # bot_api_id = "" @@ -416,6 +417,7 @@ myllm_enabled = true # # discord example # [default.platform.discord] # platform="discord" +# enabled = true # bot_token = "mytoken" # bot_channel_id = "mychannelid" # bot_api_id = "" @@ -602,7 +604,6 @@ myllm_enabled = true # CEFI template # [default.cex.template] # protocol = "" -# name = "" # api_key= "" # secret= "" # password = "" @@ -623,7 +624,6 @@ myllm_enabled = true # # CEFI example using ccxt binance # protocol = "ccxt" -# name = "binance" # api_key= "" # secret= "" # password = ""