Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (163 loc) · 5.19 KB
/
Copy pathpyproject.toml
File metadata and controls
178 lines (163 loc) · 5.19 KB
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
177
178
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "quant-ai"
version = "10.8.3"
description = "Institutional-grade systematic equity pipeline for a EUR-native family office."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "Quant-AI contributors" }]
keywords = [
"quantitative-finance",
"systematic-trading",
"polars",
"duckdb",
"portfolio-optimization",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business :: Financial :: Investment",
]
dependencies = [
"yfinance>=0.2.40",
"pandas>=2.0",
"numpy>=1.26",
"openpyxl>=3.1",
# v10.8.2: account.yaml is read/written with PyYAML. It used to arrive
# transitively via transformers; now that the news stack is optional it must
# be a direct dependency.
"pyyaml>=6.0",
"python-dotenv>=1.0",
"aiohttp>=3.9",
"tenacity>=8.2",
"duckdb>=1.0.0",
"platformdirs>=4.0",
"feedparser>=6.0",
"beautifulsoup4>=4.12",
"lxml>=5.0",
# v10.8.0 (1.3): bound the fragile parser. selectolax 1.0 removed the Modest
# backend; the lexbor backend is used, but a major bump is not assumed safe.
"selectolax>=0.3.16,<1.0",
"polars>=1.0",
"pyarrow>=15.0",
"cvxpy>=1.4",
"hmmlearn>=0.3",
"scikit-learn>=1.4",
"arch>=6.0",
"sec-edgar-downloader>=5.0",
"markdown>=3.5",
"jinja2>=3.1",
]
[project.optional-dependencies]
# v10.8.0 (1.3): the real minimum. The UI uses st.segmented_control (1.40) and
# the width="stretch" argument on charts/tables/buttons (1.49).
dashboard = ["streamlit>=1.49", "plotly>=5.18", "requests>=2.31"]
# v10.8.2: the news-sentiment stack is optional. Without it the Market tab says
# so in one line and the rest of the app is unaffected.
news = ["torch>=2.2", "transformers>=4.40"]
test = ["pytest>=8.0.0", "pytest-cov>=5.0.0", "pytest-xdist>=3.5.0", "hypothesis>=6.100"]
dev = [
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.5.0",
"ruff>=0.5.0",
"pre-commit>=3.7.0",
"bump-my-version>=0.24.0",
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.25.0",
"pyright>=1.1.370",
"build>=1.2.0",
"mutmut>=3.0",
]
[project.scripts]
quant = "quant.cli:main"
[project.urls]
Homepage = "https://github.com/akmal523/quant"
Documentation = "https://akmal523.github.io/quant"
Repository = "https://github.com/akmal523/quant"
Changelog = "https://github.com/akmal523/quant/blob/main/CHANGELOG.md"
[tool.hatch.build.targets.wheel]
packages = ["quant"]
[tool.hatch.build.targets.sdist]
include = [
"quant",
"tests",
"scripts",
"data",
"README.md",
"CONTEXT.md",
"CHANGELOG.md",
"pyproject.toml",
]
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
addopts = "-ra --strict-markers --strict-config"
markers = [
"slow: marks tests as slow",
"network: marks tests that require network access",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
# The project uses the short aliases C (quant.ui.copy) and P (quant.ui.palette)
# consistently across the UI, CLI, and tests; N812 is accepted project-wide.
ignore = ["N812"]
[tool.ruff.lint.isort]
known-first-party = ["quant"]
[tool.ruff.lint.per-file-ignores]
# Matrix notation (X, R, N, T) is the standard in the quant modules; renaming
# these to lowercase would hurt readability of the linear-algebra code.
"quant/analytics/metrics.py" = ["N806"]
"quant/analytics/scoring.py" = ["N806"]
"quant/portfolio/optimizer.py" = ["N806"]
"scripts/backtest.py" = ["N806"]
"tests/test_institutional.py" = ["N806"]
[tool.bumpversion]
current_version = "10.8.3"
commit = true
tag = true
tag_name = "v{new_version}"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "quant/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""
# v10.7.5 (Part 4): mutate ONLY the math core. The kill threshold is 90 percent;
# survivors are listed in tests/mutation_survivors_allowlist.txt.
# source_paths copies the whole package (so the mutants tree is importable);
# only_mutate restricts mutation to the math core.
[tool.mutmut]
source_paths = ["quant", "scripts"]
only_mutate = [
"quant/analytics/scoring.py",
"quant/engine/flows.py",
"quant/engine/allocator.py",
"quant/engine/sizing.py",
"quant/engine/advice.py",
"quant/portfolio/optimizer.py",
"quant/portfolio/risk.py",
]
# Only the tests that cover the math core run per mutant: fast, and free of the
# data/ dependency the full suite has.
pytest_add_cli_args_test_selection = [
"tests/test_stub_grid.py",
"tests/test_advice_grid.py",
"tests/test_classification_grid.py",
"tests/test_properties.py",
"tests/test_regression_grid.py",
"tests/test_fallback_registry.py",
]
runner = "python -m pytest -x -q -p no:cacheprovider"