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

⬆️ 🤖 - Among the lucky you are the chosen one #1372

Merged
merged 6 commits into from
Mar 26, 2024
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
24 changes: 14 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down Expand Up @@ -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 = [
Expand Down
24 changes: 12 additions & 12 deletions tt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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`

"""
Expand All @@ -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:
Expand All @@ -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.

Expand Down Expand Up @@ -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`

"""
Expand Down Expand Up @@ -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.
"""
Expand Down
4 changes: 2 additions & 2 deletions tt/plugins/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -296,4 +296,4 @@ def should_handle_timeframe(self):
and start_time <= current_time <= end_time
)

return True
return True
4 changes: 2 additions & 2 deletions tt/talky_settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ myllm_enabled = true

# [default.platform.template]
# platform = ""
# enabled = false
# bot_token = ""
# bot_channel_id = ""
# bot_api_id = ""
Expand All @@ -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 = ""
Expand Down Expand Up @@ -602,7 +604,6 @@ myllm_enabled = true
# CEFI template
# [default.cex.template]
# protocol = ""
# name = ""
# api_key= ""
# secret= ""
# password = ""
Expand All @@ -623,7 +624,6 @@ myllm_enabled = true

# # CEFI example using ccxt binance
# protocol = "ccxt"
# name = "binance"
# api_key= ""
# secret= ""
# password = ""
Expand Down
Loading