-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
176 lines (156 loc) · 3.83 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "tradepruf"
dynamic = ["version"]
description = "A flexible framework for backtesting trading strategies"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
{ name = "Your Name", email = "[email protected]" }
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dependencies = [
"yfinance>=0.2.35",
"pandas>=2.2.0",
"numpy>=1.26.3",
"click>=8.1.7",
"rich>=13.7.0",
"plotly>=5.18.0",
"matplotlib>=3.8.2",
"seaborn>=0.13.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.23.5",
"black>=24.1.0",
"ruff>=0.2.0",
"mypy>=1.8.0",
"pre-commit>=3.6.0",
"yfinance>=0.2.35",
"rich>=13.7.0",
]
viz = [
"plotly>=5.18.0",
"matplotlib>=3.8.2",
"kaleido>=0.2.1",
"seaborn>=0.13.0"
]
[project.urls]
Homepage = "https://github.com/yourusername/tradepruf"
Documentation = "https://tradepruf.readthedocs.io/"
Repository = "https://github.com/yourusername/tradepruf.git"
"Bug Tracker" = "https://github.com/yourusername/tradepruf/issues"
[project.scripts]
tradepruf = "src.cli.commands:cli"
[tool.hatch.version]
path = "src/__init__.py"
pattern = '__version__ = "(?P<version>[^"]+)"'
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.hatch.envs.default]
dependencies = [
"pytest",
"pytest-cov",
]
[tool.hatch.envs.lint]
dependencies = [
"black>=24.1.0",
"ruff>=0.2.0",
"mypy>=1.8.0",
]
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12"]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --cov=src --cov-report=term-missing"
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning",
]
[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
^/tests/
'''
[tool.ruff]
target-version = "py310"
line-length = 88
fix = true
output-format = "grouped"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"D", # pydocstyle
"T20", # flake8-print
"PT", # pytest
"RET", # flake8-return
]
ignore = [
"E501", # line length handled by black
"D100", # missing docstring in public module
"D104", # missing docstring in public package
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D", "PT"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["backtest", "core", "data", "strategies", "utils", "cli"]
[tool.mypy]
python_version = "3.10"
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
strict_optional = true
strict_equality = true
show_error_codes = true
[[tool.mypy.overrides]]
module = ["yfinance.*", "pandas.*", "numpy.*"]
ignore_missing_imports = true
[tool.coverage.run]
branch = true
source = ["src"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"\\.\\.\\.",
]
show_missing = true