freqtrade_origin/pyproject.toml

336 lines
7.6 KiB
TOML
Raw Permalink Normal View History

[build-system]
requires = ["setuptools >= 64.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "freqtrade"
2024-10-13 15:22:10 +00:00
dynamic = ["version"]
authors = [
{name = "Freqtrade Team"},
{name = "Freqtrade Team", email = "freqtrade@protonmail.com"},
]
description = "Freqtrade - Crypto Trading Bot"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "GPLv3"}
classifiers = [
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
2024-03-29 06:37:21 +00:00
"Programming Language :: Python :: 3.12",
"Operating System :: MacOS",
"Operating System :: Unix",
"Topic :: Office/Business :: Financial :: Investment",
]
2024-10-13 15:22:10 +00:00
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",
]
2024-10-14 11:51:04 +00:00
all = [
"freqtrade[plot,hyperopt,freqai,freqai_rl,hdf5,jupyter]",
]
dev = [
"freqtrade[all,develop]",
]
[project.urls]
Homepage = "https://github.com/freqtrade/freqtrade"
Documentation = "https://freqtrade.io"
"Bug Tracker" = "https://github.com/freqtrade/freqtrade/issues"
[project.scripts]
freqtrade = "freqtrade.main:main"
[tool.setuptools]
include-package-data = true
zip-safe = false
2023-12-17 07:31:17 +00:00
[tool.setuptools.packages.find]
where = ["."]
include = ["freqtrade*"]
2024-03-29 06:47:27 +00:00
exclude = ["tests", "tests.*", "user_data", "user_data*"]
2023-12-17 07:31:17 +00:00
namespaces = true
[tool.setuptools.dynamic]
version = {attr = "freqtrade.__version__"}
2021-05-27 12:00:13 +00:00
[tool.black]
line-length = 100
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
# Exclude vendor directory
| vendor
)
'''
[tool.isort]
line_length = 100
2024-05-12 13:01:17 +00:00
profile = "black"
# multi_line_output=3
2024-05-12 13:07:00 +00:00
lines_after_imports=2
2022-04-29 09:54:54 +00:00
skip_glob = ["**/.env*", "**/env/*", "**/.venv/*", "**/docs/*", "**/user_data/*"]
2024-05-12 13:20:36 +00:00
known_first_party = ["freqtrade_client"]
2021-05-27 12:00:13 +00:00
2022-01-17 19:02:59 +00:00
[tool.pytest.ini_options]
2024-06-03 19:00:22 +00:00
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
2022-01-17 19:02:59 +00:00
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
addopts = "--dist loadscope"
2022-01-17 19:02:59 +00:00
[tool.mypy]
ignore_missing_imports = true
namespace_packages = false
warn_unused_ignores = true
exclude = [
2024-03-31 07:35:17 +00:00
'^build_helpers\.py$',
'^ft_client/build/.*$',
]
2023-02-14 10:05:04 +00:00
plugins = [
"sqlalchemy.ext.mypy.plugin"
]
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
2022-05-25 10:13:37 +00:00
[tool.pyright]
include = ["freqtrade", "ft_client"]
2022-05-25 10:13:37 +00:00
exclude = [
"**/__pycache__",
"build_helpers/*.py",
"ft_client/build/*",
"build/*",
"tests/*",
2022-05-25 10:13:37 +00:00
]
ignore = ["freqtrade/vendor/**"]
pythonPlatform = "All"
pythonVersion = "3.9"
typeCheckingMode = "off"
# analyzeUnannotatedFunctions = false
reportArgumentType = false # 155
reportAssignmentType = false # 12
reportAttributeAccessIssue = false # 255
reportCallIssue = false # 23
reportGeneralTypeIssues = false # 48
reportIncompatibleMethodOverride = false # 15
reportIncompatibleVariableOverride = false # 5
reportIndexIssue = false # 22
reportMissingImports = false # 5
reportOperatorIssue = false # 7
reportOptionalMemberAccess = false # 35
reportOptionalOperand = false # 7
reportPossiblyUnboundVariable = false # 36
reportPrivateImportUsage = false # 5
reportRedeclaration = false # 1
reportReturnType = false # 28
reportTypedDictNotRequiredAccess = false # 27
[tool.ruff]
line-length = 100
2023-08-16 11:16:23 +00:00
extend-exclude = [".env", ".venv"]
target-version = "py39"
[tool.ruff.lint]
extend-select = [
2023-02-25 19:50:26 +00:00
"C90", # mccabe
2024-09-01 06:32:42 +00:00
"B", # bugbear
2023-02-25 19:50:26 +00:00
# "N", # pep8-naming
2023-04-17 18:32:07 +00:00
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
2023-03-19 17:05:08 +00:00
"UP", # pyupgrade
2024-05-12 13:07:00 +00:00
"I", # isort
2024-07-05 06:51:11 +00:00
"A", # flake8-builtins
2023-02-23 06:12:54 +00:00
"TID", # flake8-tidy-imports
# "EXE", # flake8-executable
2024-04-20 08:25:23 +00:00
# "C4", # flake8-comprehensions
2023-02-23 06:12:54 +00:00
"YTT", # flake8-2020
2024-07-05 06:39:35 +00:00
"S", # flake8-bandit
2023-02-23 06:12:54 +00:00
# "DTZ", # flake8-datetimez
# "RSE", # flake8-raise
# "TCH", # flake8-type-checking
2023-03-19 16:57:56 +00:00
"PTH", # flake8-use-pathlib
2024-05-12 16:08:47 +00:00
# "RUF", # ruff
2024-07-02 18:53:18 +00:00
"ASYNC", # flake8-async
2024-07-05 06:39:35 +00:00
"NPY", # numpy
]
2023-10-23 16:06:31 +00:00
extend-ignore = [
"E241", # Multiple spaces after comma
"E272", # Multiple spaces before keyword
"E221", # Multiple spaces before operator
2024-04-20 08:13:14 +00:00
"B007", # Loop control variable not used
2024-09-01 06:32:42 +00:00
"B904", # BugBear - except raise from
2024-06-08 07:33:15 +00:00
"S603", # `subprocess` call: check for execution of untrusted input
"S607", # Starting a process with a partial executable path
"S608", # Possible SQL injection vector through string-based query construction
2024-09-01 06:32:42 +00:00
"NPY002", # Numpy legacy random generator
2023-10-23 16:06:31 +00:00
]
2023-02-25 19:50:26 +00:00
[tool.ruff.lint.mccabe]
2023-02-25 19:50:26 +00:00
max-complexity = 12
2023-03-19 16:57:56 +00:00
[tool.ruff.lint.per-file-ignores]
2024-06-08 07:33:15 +00:00
"freqtrade/freqai/**/*.py" = [
2024-09-01 06:32:42 +00:00
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"B006", # Bugbear - mutable default argument
"B008", # bugbear - Do not perform function calls in argument defaults
2024-06-08 07:33:15 +00:00
]
"tests/**/*.py" = [
"S101", # allow assert in tests
"S104", # Possible binding to all interfaces
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"S105", # Possible hardcoded password assigned to: "secret"
"S106", # Possible hardcoded password assigned to argument: "token_type"
"S110", # `try`-`except`-`pass` detected, consider logging the exception
]
"ft_client/test_client/**/*.py" = [
"S101", # allow assert in tests
]
2024-04-20 08:13:14 +00:00
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]
2024-05-12 13:07:00 +00:00
[tool.ruff.lint.isort]
lines-after-imports = 2
2024-05-12 13:20:36 +00:00
known-first-party = ["freqtrade_client"]
2024-05-12 13:07:00 +00:00
[tool.flake8]
# Default from https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore
# minus E226
ignore = ["E121","E123","E126","E24", "E203","E704","W503","W504"]
max-line-length = 100
max-complexity = 12
exclude = [
".git",
"__pycache__",
".eggs",
"user_data",
".venv",
".env",
]
2024-04-19 05:02:39 +00:00
[tool.codespell]
ignore-words-list = "coo,fo,strat,zar,selectin"
skip="*.svg,./user_data,freqtrade/rpc/api_server/ui/installed,freqtrade/exchange/*.json"