-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (140 loc) · 4.09 KB
/
pyproject.toml
File metadata and controls
152 lines (140 loc) · 4.09 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
[project]
name = "options-strategy-lab"
version = "0.1.0"
description = "Options Strategy Lab — institutionally rigorous options analytics with explicit model-assumption labelling."
readme = "README.md"
requires-python = "==3.11.*"
license = { text = "MIT" }
authors = [{ name = "Options Strategy Lab" }]
# Core runtime dependencies. The library core (osl.*) must import cleanly
# with only these installed. Heavy/optional integrations live in extras.
dependencies = [
"pandas>=2.2,<3.0",
"numpy>=1.26,<2.0", # vollib's Let's-Be-Rational stack requires numpy<2
"scipy>=1.11",
"pyarrow>=15.0",
"pandera>=0.20",
"pydantic>=2.6,<3.0",
"pydantic-settings>=2.2,<3.0",
"structlog>=24.1",
"diskcache>=5.6",
"pandas-market-calendars>=4.3",
"requests>=2.31",
"zstandard>=0.22",
"vollib>=1.0.7",
"arch>=6.0",
"QuantLib>=1.30",
# Included in core (not just extras) so the Streamlit app deploys correctly
# regardless of installer (pip requirements vs uv/pyproject).
"plotly>=5.22",
"yfinance>=0.2.40",
]
[project.optional-dependencies]
# yfinance fallback provider.
data = [
"yfinance>=0.2.40",
]
# Streamlit UI + interactive charts.
ui = [
"streamlit>=1.36",
"plotly>=5.22",
]
# Snapshot worker daemon scheduler (the --once CLI needs no extra).
worker = [
"apscheduler>=3.10",
]
# PDF report rendering (HTML report needs no extra). weasyprint has system deps.
report = [
"weasyprint>=60",
]
# Developer tooling: lint, type-check, test.
dev = [
"pytest>=8.2",
"pytest-cov>=5.0",
"ruff>=0.5",
"mypy>=1.10",
"black>=24.4",
"hypothesis>=6.100",
"types-requests",
"pandas-stubs",
"scipy-stubs",
"pre-commit>=3.7",
"plotly>=5.22", # exercise viz chart builders in CI
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["osl"]
# ---------------------------------------------------------------------------
# Ruff
# ---------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["osl", "tests"]
[tool.ruff.lint]
select = [
"E", "F", "W", # pyflakes/pycodestyle
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"C4", # comprehensions
"SIM", # simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # line length handled by black
]
# Math notation (greek letters, operators) is intentional in docstrings/comments.
allowed-confusables = ["σ", "×", "−", "ρ", "ν", "φ", "√", "≤", "≥", "∂", "µ", "²", "Δ", "Γ", "Θ", "₁", "₂"]
[tool.ruff.lint.isort]
known-first-party = ["osl", "app_lib", "tests"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["B011", "RUF059"]
# ---------------------------------------------------------------------------
# Black
# ---------------------------------------------------------------------------
[tool.black]
line-length = 100
target-version = ["py311"]
# ---------------------------------------------------------------------------
# mypy (strict on the library core)
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
strict = true
warn_unused_ignores = true
warn_redundant_casts = true
show_error_codes = true
files = ["osl"]
[[tool.mypy.overrides]]
module = [
"yfinance.*",
"streamlit.*",
"plotly.*",
"diskcache.*",
"pandas_market_calendars.*",
"zstandard.*",
"vollib.*",
"py_vollib.*",
"QuantLib.*",
"arch.*",
"apscheduler.*",
"weasyprint.*",
]
ignore_missing_imports = true
# ---------------------------------------------------------------------------
# pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra -q --strict-markers"
testpaths = ["tests"]
markers = [
"integration: tests that require live network / provider credentials",
]
filterwarnings = [
"ignore::DeprecationWarning:pandera.*",
"ignore::DeprecationWarning:py_vollib.*",
]