From 2f4e4343c2b56f23158ead6757958f27880df058 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 03:07:44 +0000 Subject: [PATCH 01/30] chore(deps): bump torch from 2.2.2 to 2.4.0 Bumps [torch](https://github.com/pytorch/pytorch) from 2.2.2 to 2.4.0. - [Release notes](https://github.com/pytorch/pytorch/releases) - [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md) - [Commits](https://github.com/pytorch/pytorch/compare/v2.2.2...v2.4.0) --- updated-dependencies: - dependency-name: torch dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-freqai-rl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-freqai-rl.txt b/requirements-freqai-rl.txt index c278716fbdb..740de2559cc 100644 --- a/requirements-freqai-rl.txt +++ b/requirements-freqai-rl.txt @@ -3,7 +3,7 @@ # Required for freqai-rl torch==2.3.1; sys_platform != 'darwin' or platform_machine != 'x86_64' -torch==2.2.2; sys_platform == 'darwin' and platform_machine == 'x86_64' +torch==2.4.0; sys_platform == 'darwin' and platform_machine == 'x86_64' gymnasium==0.29.1 stable_baselines3==2.3.2 sb3_contrib>=2.2.1 From 5e1038dc673910dcb7c33d32fa99e023921c57ce Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 29 Jul 2024 07:00:17 +0200 Subject: [PATCH 02/30] chore: Fix torch version bump --- requirements-freqai-rl.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-freqai-rl.txt b/requirements-freqai-rl.txt index 740de2559cc..aa4ae569976 100644 --- a/requirements-freqai-rl.txt +++ b/requirements-freqai-rl.txt @@ -2,8 +2,8 @@ -r requirements-freqai.txt # Required for freqai-rl -torch==2.3.1; sys_platform != 'darwin' or platform_machine != 'x86_64' -torch==2.4.0; sys_platform == 'darwin' and platform_machine == 'x86_64' +torch==2.2.2; sys_platform == 'darwin' and platform_machine == 'x86_64' +torch==2.4.0; sys_platform != 'darwin' or platform_machine != 'x86_64' gymnasium==0.29.1 stable_baselines3==2.3.2 sb3_contrib>=2.2.1 From 67fdfdf584b081b56dcd8d80b0de738a324fd51f Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 1 Aug 2024 19:39:06 +0200 Subject: [PATCH 03/30] chore: Update schema file --- build_helpers/schema.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index c2b930558dd..3c37896b153 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -9,11 +9,6 @@ ], "minimum": -1 }, - "new_pairs_days": { - "description": "Download data of new pairs for given number of days", - "type": "integer", - "default": 30 - }, "timeframe": { "description": "The timeframe to use (e.g `1m`, `5m`, `15m`, `30m`, `1h` ...). \nUsually specified in the strategy and missing in the configuration.", "type": "string" @@ -1065,7 +1060,7 @@ "default": {}, "properties": { "process_throttle_secs": { - "description": "Throttle time in seconds for processing.", + "description": "Minimum loop duration for one bot iteration in seconds.", "type": "integer" }, "interval": { @@ -1106,6 +1101,15 @@ "description": "Enable position adjustment. \nUsually specified in the strategy and missing in the configuration.", "type": "boolean" }, + "new_pairs_days": { + "description": "Download data of new pairs for given number of days", + "type": "integer", + "default": 30 + }, + "download_trades": { + "description": "Download trades data by default (instead of ohlcv data).", + "type": "boolean" + }, "max_entry_position_adjustment": { "description": "Maximum entry position adjustment allowed. \nUsually specified in the strategy and missing in the configuration.", "type": [ From 9e47172d692f18249005644f1b1681cd8af197db Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 1 Aug 2024 20:37:26 +0200 Subject: [PATCH 04/30] chore: Reduce test flakyness of ws test --- tests/exchange_online/test_ccxt_ws_compat.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/exchange_online/test_ccxt_ws_compat.py b/tests/exchange_online/test_ccxt_ws_compat.py index ed449bb58f7..78e6e317b3c 100644 --- a/tests/exchange_online/test_ccxt_ws_compat.py +++ b/tests/exchange_online/test_ccxt_ws_compat.py @@ -30,6 +30,12 @@ def test_ccxt_watch_ohlcv(self, exchange_ws: EXCHANGE_WS_FIXTURE_TYPE, caplog, m m_hist = mocker.spy(exch, "_async_get_historic_ohlcv") m_cand = mocker.spy(exch, "_async_get_candle_history") + while True: + # Don't start the test if we are too close to the end of the minute. + if dt_now().second < 50 and dt_now().second != 0: + break + sleep(1) + res = exch.refresh_latest_ohlcv([pair_tf]) assert m_cand.call_count == 1 From dd55baf148901d6d108075c40d5d7bbf29379730 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 2 Aug 2024 07:05:45 +0200 Subject: [PATCH 05/30] chore: support snake_case for api keys --- freqtrade/configuration/config_secrets.py | 4 ++++ freqtrade/exchange/exchange.py | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/freqtrade/configuration/config_secrets.py b/freqtrade/configuration/config_secrets.py index 427e09088a2..e17a7925e92 100644 --- a/freqtrade/configuration/config_secrets.py +++ b/freqtrade/configuration/config_secrets.py @@ -14,12 +14,16 @@ def sanitize_config(config: Config, *, show_sensitive: bool = False) -> Config: return config keys_to_remove = [ "exchange.key", + "exchange.api_key", "exchange.apiKey", "exchange.secret", "exchange.password", "exchange.uid", + "exchange.account_id", "exchange.accountId", + "exchange.wallet_address", "exchange.walletAddress", + "exchange.private_key", "exchange.privateKey", "telegram.token", "telegram.chat_id", diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 3ed35b03d39..b80b3147ec1 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -353,14 +353,18 @@ def _init_ccxt( raise OperationalException(f"Exchange {name} is not supported by ccxt") ex_config = { - "apiKey": exchange_config.get("apiKey", exchange_config.get("key")), + "apiKey": exchange_config.get( + "api_key", exchange_config.get("apiKey", exchange_config.get("key")) + ), "secret": exchange_config.get("secret"), "password": exchange_config.get("password"), "uid": exchange_config.get("uid", ""), - "accountId": exchange_config.get("accountId", ""), + "accountId": exchange_config.get("account_id", exchange_config.get("accountId", "")), # DEX attributes: - "walletAddress": exchange_config.get("walletAddress"), - "privateKey": exchange_config.get("privateKey"), + "walletAddress": exchange_config.get( + "wallet_address", exchange_config.get("walletAddress") + ), + "privateKey": exchange_config.get("private_key", exchange_config.get("privateKey")), } if ccxt_kwargs: logger.info("Applying additional ccxt config: %s", ccxt_kwargs) From 2b0b1e23eb8e5f113693fd4c9d763d4daab3e304 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 2 Aug 2024 07:25:53 +0200 Subject: [PATCH 06/30] chore: enhance error message on ohlcv error --- freqtrade/exchange/exchange.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index b80b3147ec1..c1608e3c112 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2612,12 +2612,13 @@ async def _async_get_candle_history( except (ccxt.OperationFailed, ccxt.ExchangeError) as e: raise TemporaryError( f"Could not fetch historical candle (OHLCV) data " - f"for pair {pair} due to {e.__class__.__name__}. " + f"for {pair}, {timeframe}, {candle_type} due to {e.__class__.__name__}. " f"Message: {e}" ) from e except ccxt.BaseError as e: raise OperationalException( - f"Could not fetch historical candle (OHLCV) data for pair {pair}. Message: {e}" + f"Could not fetch historical candle (OHLCV) data for " + f"{pair}, {timeframe}, {candle_type}. Message: {e}" ) from e async def _fetch_funding_rate_history( From 9429657a2b526a9cb11d52f87fc79e4e299e9179 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 2 Aug 2024 07:28:09 +0200 Subject: [PATCH 07/30] chore: make Hyperliquid class actually usable --- freqtrade/exchange/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index fc92ed5a9cb..d52f9429361 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -39,6 +39,7 @@ from freqtrade.exchange.gate import Gate from freqtrade.exchange.hitbtc import Hitbtc from freqtrade.exchange.htx import Htx +from freqtrade.exchange.hyperliquid import Hyperliquid from freqtrade.exchange.idex import Idex from freqtrade.exchange.kraken import Kraken from freqtrade.exchange.kucoin import Kucoin From a6689b1035cc850a2f254c5335ff4f7488d6dc79 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 09:57:31 +0200 Subject: [PATCH 08/30] chore: Remove unnecessary, duplicate mkdocs install --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb3ea2221d4..db11ba83358 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -384,7 +384,6 @@ jobs: - name: Documentation build run: | pip install -r docs/requirements-docs.txt - pip install mkdocs mkdocs build - name: Discord notification From 8bc19494664bfd5ae0d3883c88c0eb43c1a61a1e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 16:41:22 +0200 Subject: [PATCH 09/30] docs: update link to technical documentation --- docs/strategy-customization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/strategy-customization.md b/docs/strategy-customization.md index 48f629df5c6..98d7ae9d232 100644 --- a/docs/strategy-customization.md +++ b/docs/strategy-customization.md @@ -158,7 +158,7 @@ Out of the box, freqtrade installs the following technical libraries: - [ta-lib](https://ta-lib.github.io/ta-lib-python/) - [pandas-ta](https://twopirllc.github.io/pandas-ta/) -- [technical](https://github.com/freqtrade/technical/) +- [technical](https://technical.freqtrade.io) Additional technical libraries can be installed as necessary, or custom indicators may be written / invented by the strategy author. From 805c946b33d5d9830043266cb513047f39f17dc9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 18:24:52 +0200 Subject: [PATCH 10/30] feat: improve structure of list_exchange endpoints --- freqtrade/exchange/exchange_utils.py | 17 +++++++++-------- freqtrade/types/valid_exchanges_type.py | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/freqtrade/exchange/exchange_utils.py b/freqtrade/exchange/exchange_utils.py index 9c2514f92b6..19b33d86cc2 100644 --- a/freqtrade/exchange/exchange_utils.py +++ b/freqtrade/exchange/exchange_utils.py @@ -53,9 +53,9 @@ def available_exchanges(ccxt_module: Optional[CcxtModuleType] = None) -> List[st return [x for x in exchanges if validate_exchange(x)[0]] -def validate_exchange(exchange: str) -> Tuple[bool, str, bool]: +def validate_exchange(exchange: str) -> Tuple[bool, str, Optional[ccxt.Exchange]]: """ - returns: can_use, reason + returns: can_use, reason, exchange_object with Reason including both missing and missing_opt """ try: @@ -64,11 +64,10 @@ def validate_exchange(exchange: str) -> Tuple[bool, str, bool]: ex_mod = getattr(ccxt.async_support, exchange.lower())() if not ex_mod or not ex_mod.has: - return False, "", False + return False, "", None result = True reason = "" - is_dex = getattr(ex_mod, "dex", False) missing = [ k for k, v in EXCHANGE_HAS_REQUIRED.items() @@ -87,19 +86,21 @@ def validate_exchange(exchange: str) -> Tuple[bool, str, bool]: if missing_opt: reason += f"{'. ' if reason else ''}missing opt: {', '.join(missing_opt)}. " - return result, reason, is_dex + return result, reason, ex_mod def _build_exchange_list_entry( exchange_name: str, exchangeClasses: Dict[str, Any] ) -> ValidExchangesType: - valid, comment, is_dex = validate_exchange(exchange_name) + valid, comment, ex_mod = validate_exchange(exchange_name) result: ValidExchangesType = { - "name": exchange_name, + "name": getattr(ex_mod, "name", exchange_name), + "classname": exchange_name, "valid": valid, "supported": exchange_name.lower() in SUPPORTED_EXCHANGES, "comment": comment, - "dex": is_dex, + "dex": getattr(ex_mod, "dex", False), + "is_alias": getattr(ex_mod, "alias", False), "trade_modes": [{"trading_mode": "spot", "margin_mode": ""}], } if resolved := exchangeClasses.get(exchange_name.lower()): diff --git a/freqtrade/types/valid_exchanges_type.py b/freqtrade/types/valid_exchanges_type.py index 9de05b964d7..079b2dc59d0 100644 --- a/freqtrade/types/valid_exchanges_type.py +++ b/freqtrade/types/valid_exchanges_type.py @@ -11,8 +11,10 @@ class TradeModeType(TypedDict): class ValidExchangesType(TypedDict): name: str + classname: str valid: bool supported: bool comment: str dex: bool + is_alias: bool trade_modes: List[TradeModeType] From b3915ff8fdf4366c93218234d196d3a054606470 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 18:25:31 +0200 Subject: [PATCH 11/30] chore: use classname to show exchanges --- freqtrade/commands/list_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/commands/list_commands.py b/freqtrade/commands/list_commands.py index 1696fc8f0aa..f22deee87d4 100644 --- a/freqtrade/commands/list_commands.py +++ b/freqtrade/commands/list_commands.py @@ -50,7 +50,7 @@ def start_list_exchanges(args: Dict[str, Any]) -> None: table.add_column("Reason") for exchange in available_exchanges: - name = Text(exchange["name"]) + name = Text(exchange["classname"]) if exchange["supported"]: name.append(" (Official)", style="italic") name.stylize("green bold") From 9eebe82b34cb7ab13bb365f131ff79bb204c4e35 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 18:29:16 +0200 Subject: [PATCH 12/30] chore: fix api-server tests --- tests/rpc/test_rpc_apiserver.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 22264ae5417..98513f29054 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -2148,35 +2148,41 @@ def test_api_exchanges(botclient): response = rc.json() assert isinstance(response["exchanges"], list) assert len(response["exchanges"]) > 20 - okx = [x for x in response["exchanges"] if x["name"] == "okx"][0] + okx = [x for x in response["exchanges"] if x["classname"] == "okx"][0] assert okx == { - "name": "okx", + "classname": "okx", + "name": "OKX", "valid": True, "supported": True, "comment": "", "dex": False, + "is_alias": False, "trade_modes": [ {"trading_mode": "spot", "margin_mode": ""}, {"trading_mode": "futures", "margin_mode": "isolated"}, ], } - mexc = [x for x in response["exchanges"] if x["name"] == "mexc"][0] + mexc = [x for x in response["exchanges"] if x["classname"] == "mexc"][0] assert mexc == { - "name": "mexc", + "classname": "mexc", + "name": "MEXC Global", "valid": True, "supported": False, "dex": False, "comment": "", + "is_alias": False, "trade_modes": [{"trading_mode": "spot", "margin_mode": ""}], } - waves = [x for x in response["exchanges"] if x["name"] == "wavesexchange"][0] + waves = [x for x in response["exchanges"] if x["classname"] == "wavesexchange"][0] assert waves == { - "name": "wavesexchange", + "classname": "wavesexchange", + "name": "Waves.Exchange", "valid": True, "supported": False, "dex": True, "comment": ANY, + "is_alias": False, "trade_modes": [{"trading_mode": "spot", "margin_mode": ""}], } From c8d30ae801933162b95ff03e968f3cb1ce416de6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 18:30:21 +0200 Subject: [PATCH 13/30] chore: fix oneline exchange-list output --- freqtrade/commands/list_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/commands/list_commands.py b/freqtrade/commands/list_commands.py index f22deee87d4..baa2c8c00fb 100644 --- a/freqtrade/commands/list_commands.py +++ b/freqtrade/commands/list_commands.py @@ -32,7 +32,7 @@ def start_list_exchanges(args: Dict[str, Any]) -> None: ) if args["print_one_column"]: - print("\n".join([e["name"] for e in available_exchanges])) + print("\n".join([e["classname"] for e in available_exchanges])) else: if args["list_exchanges_all"]: title = ( From d7ecdc9b07d74def71471dee0fc204b0fd098b00 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Aug 2024 18:31:39 +0200 Subject: [PATCH 14/30] chore: Downgrade cryptography for RPI https://github.com/piwheels/packages/issues/464 --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fc2272fdf56..b32df00589a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,8 @@ numexpr==2.10.1 pandas-ta==0.3.14b ccxt==4.3.68 -cryptography==43.0.0 +cryptography==42.0.8; platform_machine == 'armv7l' +cryptography==43.0.0; platform_machine != 'armv7l' aiohttp==3.9.5 SQLAlchemy==2.0.31 python-telegram-bot==21.4 From 4854bdd02fb96757823ed6f342d3d7c23ff0d29d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Aug 2024 08:29:15 +0200 Subject: [PATCH 15/30] chore: Add log_responses to config schema --- build_helpers/schema.json | 5 +++++ freqtrade/configuration/config_schema.py | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index 3c37896b153..6951d2cdec8 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -1213,6 +1213,11 @@ }, "uniqueItems": true }, + "log_responses": { + "description": "Log responses from the exchange.Useful/required to debug issues with order processing.", + "type": "boolean", + "default": false + }, "unknown_fee_rate": { "description": "Fee rate for unknown markets.", "type": "number" diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index 89e7f8b3b79..9832bbbc759 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -861,6 +861,14 @@ "items": {"type": "string"}, "uniqueItems": True, }, + "log_responses": { + "description": ( + "Log responses from the exchange." + "Useful/required to debug issues with order processing." + ), + "type": "boolean", + "default": False, + }, "unknown_fee_rate": { "description": "Fee rate for unknown markets.", "type": "number", From 6c5fb5e22b7ca2867e7a3c36649c12eed51793ab Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Aug 2024 09:03:32 +0200 Subject: [PATCH 16/30] chore: add_config_files to config_schema --- build_helpers/schema.json | 7 +++++++ freqtrade/configuration/config_schema.py | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index 6951d2cdec8..89a7f1efbf9 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -1118,6 +1118,13 @@ ], "minimum": -1 }, + "add_config_files": { + "description": "Additional configuration files to load.", + "type": "array", + "items": { + "type": "string" + } + }, "orderflow": { "description": "Settings related to order flow.", "type": "object", diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index 9832bbbc759..86b08157067 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -776,6 +776,11 @@ "type": ["integer", "number"], "minimum": -1, }, + "add_config_files": { + "description": "Additional configuration files to load.", + "type": "array", + "items": {"type": "string"}, + }, "orderflow": { "description": "Settings related to order flow.", "type": "object", From 366c7e2b9162902d09420026694252816bda6318 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Aug 2024 19:54:51 +0200 Subject: [PATCH 17/30] fix: pin matplotlib to 3.9.0 to fix windows wheels caused by the partial yank of 3.9.1 (only the windows wheels have been deleted). Ref: https://github.com/matplotlib/matplotlib/issues/28551 --- requirements-freqai.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements-freqai.txt b/requirements-freqai.txt index f2d6bd5f59c..e0cd095824b 100644 --- a/requirements-freqai.txt +++ b/requirements-freqai.txt @@ -6,6 +6,8 @@ scikit-learn==1.5.1 joblib==1.4.2 catboost==1.2.5; 'arm' not in platform_machine +# Temporary downgrade of matplotlib due to https://github.com/matplotlib/matplotlib/issues/28551 +matplotlib==3.9.0 lightgbm==4.5.0 xgboost==2.0.3 tensorboard==2.17.0 From ce8d03ddcea3edd351e533a031e6868e39b0b41e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Aug 2024 19:55:40 +0200 Subject: [PATCH 18/30] chore: improve comment as to why matplotlib is pinned in the first place --- requirements-freqai.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-freqai.txt b/requirements-freqai.txt index e0cd095824b..1f920d2c7e2 100644 --- a/requirements-freqai.txt +++ b/requirements-freqai.txt @@ -6,6 +6,7 @@ scikit-learn==1.5.1 joblib==1.4.2 catboost==1.2.5; 'arm' not in platform_machine +# Pin Matplotlib - it's depended on by catboost # Temporary downgrade of matplotlib due to https://github.com/matplotlib/matplotlib/issues/28551 matplotlib==3.9.0 lightgbm==4.5.0 From cb4747aed24d168e34e3a2bd0fd707003c2fd8bf Mon Sep 17 00:00:00 2001 From: froggleston Date: Sun, 4 Aug 2024 21:43:00 +0100 Subject: [PATCH 19/30] Add rich table width if jupyter in modules --- freqtrade/util/rich_tables.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/freqtrade/util/rich_tables.py b/freqtrade/util/rich_tables.py index d36bf9004c0..7ae315025f8 100644 --- a/freqtrade/util/rich_tables.py +++ b/freqtrade/util/rich_tables.py @@ -37,8 +37,12 @@ def print_rich_table( row_to_add: List[Union[str, Text]] = [r if isinstance(r, Text) else str(r) for r in row] table.add_row(*row_to_add) + width = None + if any(module in ["pytest", "ipykernel"] for module in sys.modules): + width = 200 + console = Console( - width=200 if "pytest" in sys.modules else None, + width=width ) console.print(table) @@ -71,7 +75,11 @@ def print_df_rich_table( row = [_format_value(x, floatfmt=".3f") for x in value_list] table.add_row(*row) + width = None + if any(module in ["pytest", "ipykernel"] for module in sys.modules): + width = 200 + console = Console( - width=200 if "pytest" in sys.modules else None, + width=width ) console.print(table) From 17dc41279cf45f2890c457221356b3c7a3fa3da0 Mon Sep 17 00:00:00 2001 From: froggleston Date: Sun, 4 Aug 2024 21:59:07 +0100 Subject: [PATCH 20/30] Ruff formatting --- freqtrade/util/rich_tables.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/freqtrade/util/rich_tables.py b/freqtrade/util/rich_tables.py index 7ae315025f8..cfab5cd7407 100644 --- a/freqtrade/util/rich_tables.py +++ b/freqtrade/util/rich_tables.py @@ -41,9 +41,7 @@ def print_rich_table( if any(module in ["pytest", "ipykernel"] for module in sys.modules): width = 200 - console = Console( - width=width - ) + console = Console(width=width) console.print(table) @@ -79,7 +77,5 @@ def print_df_rich_table( if any(module in ["pytest", "ipykernel"] for module in sys.modules): width = 200 - console = Console( - width=width - ) + console = Console(width=width) console.print(table) From 1e5154c901bc5dd38d822c7a44f92cf8072a9944 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:26:37 +0000 Subject: [PATCH 21/30] chore(deps): bump mkdocs-material in the mkdocs group Bumps the mkdocs group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `mkdocs-material` from 9.5.30 to 9.5.31 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.30...9.5.31) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mkdocs ... Signed-off-by: dependabot[bot] --- docs/requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 47fcdaa32ed..b5ce1db1479 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ markdown==3.6 mkdocs==1.6.0 -mkdocs-material==9.5.30 +mkdocs-material==9.5.31 mdx_truly_sane_lists==1.3 pymdown-extensions==10.9 jinja2==3.1.4 From c9f4db2a4f5677dcd608d2d295b2616ac07809b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:26:45 +0000 Subject: [PATCH 22/30] chore(deps): bump fastapi from 0.111.1 to 0.112.0 Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.111.1 to 0.112.0. - [Release notes](https://github.com/fastapi/fastapi/releases) - [Commits](https://github.com/fastapi/fastapi/compare/0.111.1...0.112.0) --- updated-dependencies: - dependency-name: fastapi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b32df00589a..92ee88a39fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,7 +39,7 @@ orjson==3.10.6 sdnotify==0.3.2 # API Server -fastapi==0.111.1 +fastapi==0.112.0 pydantic==2.8.2 uvicorn==0.30.3 pyjwt==2.8.0 From ea2b12a548e08f6b13458d6112cecb0d13d4b51d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:27:05 +0000 Subject: [PATCH 23/30] chore(deps-dev): bump ruff from 0.5.5 to 0.5.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.5...0.5.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 554cf777817..446d1e2f402 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,7 +7,7 @@ -r docs/requirements-docs.txt coveralls==4.0.1 -ruff==0.5.5 +ruff==0.5.6 mypy==1.11.0 pre-commit==3.8.0 pytest==8.3.2 From 1f9c2cd181d585d8e103988a5722dac3b253a790 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:27:08 +0000 Subject: [PATCH 24/30] chore(deps): bump technical from 1.4.3 to 1.4.4 Bumps [technical](https://github.com/freqtrade/technical) from 1.4.3 to 1.4.4. - [Release notes](https://github.com/freqtrade/technical/releases) - [Commits](https://github.com/freqtrade/technical/compare/1.4.3...1.4.4) --- updated-dependencies: - dependency-name: technical dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b32df00589a..30d898a766f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ requests==2.32.3 urllib3==2.2.2 jsonschema==4.23.0 TA-Lib==0.4.32 -technical==1.4.3 +technical==1.4.4 tabulate==0.9.0 pycoingecko==3.1.0 jinja2==3.1.4 From e3ba28d767c31d2b207016ec32245cf150904fef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:27:23 +0000 Subject: [PATCH 25/30] chore(deps): bump ccxt from 4.3.68 to 4.3.73 Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.3.68 to 4.3.73. - [Release notes](https://github.com/ccxt/ccxt/releases) - [Changelog](https://github.com/ccxt/ccxt/blob/master/CHANGELOG.md) - [Commits](https://github.com/ccxt/ccxt/compare/4.3.68...4.3.73) --- updated-dependencies: - dependency-name: ccxt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b32df00589a..630e5ea1015 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ bottleneck==1.4.0 numexpr==2.10.1 pandas-ta==0.3.14b -ccxt==4.3.68 +ccxt==4.3.73 cryptography==42.0.8; platform_machine == 'armv7l' cryptography==43.0.0; platform_machine != 'armv7l' aiohttp==3.9.5 From 0bee3c9db0ae91e47d228a6f29729b6668be0bbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:27:30 +0000 Subject: [PATCH 26/30] chore(deps): bump tqdm from 4.66.4 to 4.66.5 Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.4 to 4.66.5. - [Release notes](https://github.com/tqdm/tqdm/releases) - [Commits](https://github.com/tqdm/tqdm/compare/v4.66.4...v4.66.5) --- updated-dependencies: - dependency-name: tqdm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-freqai-rl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-freqai-rl.txt b/requirements-freqai-rl.txt index aa4ae569976..9b808f66f3a 100644 --- a/requirements-freqai-rl.txt +++ b/requirements-freqai-rl.txt @@ -8,4 +8,4 @@ gymnasium==0.29.1 stable_baselines3==2.3.2 sb3_contrib>=2.2.1 # Progress bar for stable-baselines3 and sb3-contrib -tqdm==4.66.4 +tqdm==4.66.5 From 91da1c3f8bde736bbc6400a2dd352d3603bae51c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 06:33:26 +0000 Subject: [PATCH 27/30] chore(deps): bump uvicorn from 0.30.3 to 0.30.5 Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.30.3 to 0.30.5. - [Release notes](https://github.com/encode/uvicorn/releases) - [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/uvicorn/compare/0.30.3...0.30.5) --- updated-dependencies: - dependency-name: uvicorn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 92ee88a39fb..9dffbeae8f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,7 +41,7 @@ sdnotify==0.3.2 # API Server fastapi==0.112.0 pydantic==2.8.2 -uvicorn==0.30.3 +uvicorn==0.30.5 pyjwt==2.8.0 aiofiles==24.1.0 psutil==6.0.0 From 477448114a25ff1b143e2cd69a295bcd32d21162 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 06:34:01 +0000 Subject: [PATCH 28/30] chore(deps-dev): bump mypy from 1.11.0 to 1.11.1 Bumps [mypy](https://github.com/python/mypy) from 1.11.0 to 1.11.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11...v1.11.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 446d1e2f402..be3c6f53348 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,7 +8,7 @@ coveralls==4.0.1 ruff==0.5.6 -mypy==1.11.0 +mypy==1.11.1 pre-commit==3.8.0 pytest==8.3.2 pytest-asyncio==0.23.8 From 3d439c8c01e0b316ed104b99ec27f7efe3ab2861 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 08:58:46 +0000 Subject: [PATCH 29/30] chore(deps): bump pyjwt from 2.8.0 to 2.9.0 Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](https://github.com/jpadilla/pyjwt/compare/2.8.0...2.9.0) --- updated-dependencies: - dependency-name: pyjwt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 547f15efca8..1078b6d84f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -42,7 +42,7 @@ sdnotify==0.3.2 fastapi==0.112.0 pydantic==2.8.2 uvicorn==0.30.5 -pyjwt==2.8.0 +pyjwt==2.9.0 aiofiles==24.1.0 psutil==6.0.0 From 95546e0a7bee1a4a2905f03d6a72785e4b4e4439 Mon Sep 17 00:00:00 2001 From: xmatthias <5024695+xmatthias@users.noreply.github.com> Date: Tue, 6 Aug 2024 03:02:53 +0000 Subject: [PATCH 30/30] chore: update pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58c43d4543b..4ccc48526cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,14 +2,14 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pycqa/flake8 - rev: "7.1.0" + rev: "7.1.1" hooks: - id: flake8 additional_dependencies: [Flake8-pyproject] # stages: [push] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.11.0" + rev: "v1.11.1" hooks: - id: mypy exclude: build_helpers @@ -31,7 +31,7 @@ repos: - repo: https://github.com/charliermarsh/ruff-pre-commit # Ruff version. - rev: 'v0.5.5' + rev: 'v0.5.6' hooks: - id: ruff