From 4cd46603579b8cfc6464630658ae0d5720e4795a Mon Sep 17 00:00:00 2001 From: Meng Xiangzhuo Date: Sun, 13 Oct 2024 23:22:10 +0800 Subject: [PATCH 1/2] Remove setup.py --- pyproject.toml | 101 ++++++++++++++++++++++++++++++++++++++- setup.py | 127 ------------------------------------------------- 2 files changed, 100 insertions(+), 128 deletions(-) delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 00490ff19..5a9fea215 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "freqtrade" -dynamic = ["version", "dependencies", "optional-dependencies"] +dynamic = ["version"] authors = [ {name = "Freqtrade Team"}, @@ -27,6 +27,105 @@ classifiers = [ "Topic :: Office/Business :: Financial :: Investment", ] +dependencies = [ + # from requirements.txt + "ccxt>=4.3.24", + "SQLAlchemy>=2.0.6", + "python-telegram-bot>=20.1", + "humanize>=4.0.0", + "cachetools", + "requests", + "httpx>=0.24.1", + "urllib3", + "jsonschema", + "numpy<2.0", + "pandas>=2.2.0,<3.0", + "TA-Lib", + "pandas-ta", + "technical", + "tabulate", + "pycoingecko", + "py_find_1st", + "python-rapidjson", + "orjson", + "jinja2", + "questionary", + "prompt-toolkit", + "joblib>=1.2.0", + "rich", + 'pyarrow; platform_machine != "armv7l"', + "fastapi", + "pydantic>=2.2.0", + "pyjwt", + "websockets", + "uvicorn", + "psutil", + "schedule", + "janus", + "ast-comments", + "aiofiles", + "aiohttp", + "cryptography", + "sdnotify", + "python-dateutil", + "pytz", + "packaging", + "freqtrade-client", +] + +[project.optional-dependencies] +# Requirements used for submodules +plot = ["plotly>=4.0"] +hyperopt = [ + "scipy", + "scikit-learn", + "ft-scikit-optimize>=0.9.2", + "filelock", +] +freqai = [ + "scikit-learn", + "joblib", + 'catboost; platform_machine != "aarch64"', + "lightgbm", + "xgboost", + "tensorboard", + "datasieve>=0.1.5", +] +freqai_rl = [ + "torch", + "gymnasium", + "stable-baselines3", + "sb3-contrib", + "tqdm", +] +hdf5 = [ + "tables", + "blosc", +] +develop = [ + "coveralls", + "isort", + "mypy", + "pre-commit", + "pytest-asyncio", + "pytest-cov", + "pytest-mock", + "pytest-random-order", + "pytest", + "ruff", + "time-machine", + "types-cachetools", + "types-filelock", + "types-python-dateutil", + "types-requests", + "types-tabulate", +] +jupyter = [ + "jupyter", + "nbstripout", + "ipykernel", + "nbconvert", +] [project.urls] Homepage = "https://github.com/freqtrade/freqtrade" diff --git a/setup.py b/setup.py deleted file mode 100644 index e83877776..000000000 --- a/setup.py +++ /dev/null @@ -1,127 +0,0 @@ -from setuptools import setup - - -# Requirements used for submodules -plot = ["plotly>=4.0"] -hyperopt = [ - "scipy", - "scikit-learn", - "ft-scikit-optimize>=0.9.2", - "filelock", -] - -freqai = [ - "scikit-learn", - "joblib", - 'catboost; platform_machine != "aarch64"', - "lightgbm", - "xgboost", - "tensorboard", - "datasieve>=0.1.5", -] - -freqai_rl = [ - "torch", - "gymnasium", - "stable-baselines3", - "sb3-contrib", - "tqdm", -] - -hdf5 = [ - "tables", - "blosc", -] - -develop = [ - "coveralls", - "isort", - "mypy", - "pre-commit", - "pytest-asyncio", - "pytest-cov", - "pytest-mock", - "pytest-random-order", - "pytest", - "ruff", - "time-machine", - "types-cachetools", - "types-filelock", - "types-python-dateutil", - "types-requests", - "types-tabulate", -] - -jupyter = [ - "jupyter", - "nbstripout", - "ipykernel", - "nbconvert", -] - -all_extra = plot + develop + jupyter + hyperopt + hdf5 + freqai + freqai_rl - -setup( - tests_require=[ - "pytest", - "pytest-asyncio", - "pytest-cov", - "pytest-mock", - ], - install_requires=[ - # from requirements.txt - "ccxt>=4.3.24", - "SQLAlchemy>=2.0.6", - "python-telegram-bot>=20.1", - "humanize>=4.0.0", - "cachetools", - "requests", - "httpx>=0.24.1", - "urllib3", - "jsonschema", - "numpy<2.0", - "pandas>=2.2.0,<3.0", - "TA-Lib", - "pandas-ta", - "technical", - "tabulate", - "pycoingecko", - "py_find_1st", - "python-rapidjson", - "orjson", - "jinja2", - "questionary", - "prompt-toolkit", - "joblib>=1.2.0", - "rich", - 'pyarrow; platform_machine != "armv7l"', - "fastapi", - "pydantic>=2.2.0", - "pyjwt", - "websockets", - "uvicorn", - "psutil", - "schedule", - "janus", - "ast-comments", - "aiofiles", - "aiohttp", - "cryptography", - "sdnotify", - "python-dateutil", - "pytz", - "packaging", - "freqtrade-client", - ], - extras_require={ - "dev": all_extra, - "plot": plot, - "jupyter": jupyter, - "hyperopt": hyperopt, - "hdf5": hdf5, - "freqai": freqai, - "freqai_rl": freqai_rl, - "all": all_extra, - }, - url="https://github.com/freqtrade/freqtrade", -) From 0c1c7500053414fbdef767d02ae7ec16c050ab51 Mon Sep 17 00:00:00 2001 From: Meng Xiangzhuo Date: Mon, 14 Oct 2024 19:51:04 +0800 Subject: [PATCH 2/2] Add and dependency groups --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5a9fea215..76eac4d03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,6 +126,12 @@ jupyter = [ "ipykernel", "nbconvert", ] +all = [ + "freqtrade[plot,hyperopt,freqai,freqai_rl,hdf5,jupyter]", +] +dev = [ + "freqtrade[all,develop]", +] [project.urls] Homepage = "https://github.com/freqtrade/freqtrade"