-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (109 loc) · 3.49 KB
/
pyproject.toml
File metadata and controls
119 lines (109 loc) · 3.49 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "trading-crab-lib"
version = "0.1.0"
description = "Market regime classification and prediction pipeline"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
# Data
"pandas>=2.0",
"numpy>=1.25",
"pyarrow>=14.0", # parquet I/O
# Data ingestion
"fredapi>=0.5",
"requests>=2.31",
"beautifulsoup4>=4.12",
"lxml>=4.9", # fast HTML parser for BS4
# Feature engineering / ML
"scikit-learn>=1.4",
"scipy>=1.11",
# Config
"pyyaml>=6.0",
# Visualization
"matplotlib>=3.8",
"seaborn>=0.13",
# Reporting (optional — add API key later)
"python-dotenv>=1.0",
"yfinance>=0.2", # ETF price history for step 06
"certifi>=2024.0", # SSL CA bundle used by curl_cffi / yfinance
]
[project.urls]
Homepage = "https://github.com/strycker/gsd-scratch-work"
Repository = "https://github.com/strycker/gsd-scratch-work"
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov",
"ruff>=0.9",
"hdbscan>=0.8", # optional clustering backend; unit tests in test_density.py
"ipykernel",
"jupyterlab",
"build>=1.0",
"twine>=5.0",
]
# Alternative / fallback ETF price data sources (used when yfinance fails).
# Phase 3 — stooq via pandas-datareader: free, no API key, daily data back to ~1993.
# Phase 4 — OpenBB: wraps multiple providers (cboe free; fmp/tiingo need API keys).
data-extras = [
"pandas-datareader>=0.10",
"openbb>=4.1",
]
# Optional clustering backends and elbow detection utilities.
# hdbscan — hierarchical DBSCAN; more robust than DBSCAN for varying densities.
# kneed — KneeLocator for automated elbow/knee detection on inertia curves.
clustering-extras = [
"hdbscan>=0.8",
"kneed>=0.8",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
trading_crab_lib = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "."]
markers = [
"smoke: slow integration (e.g. venv + wheel)",
"network: test may download packages via pip",
"wheel_smoke: pip wheel + venv install smoke (opt-in: RUN_WHEEL_SMOKE=1)",
"pipeline_ingest_smoke: slow mocked pipelines/01_ingest smoke (opt-in: RUN_PIPELINE_INGEST_SMOKE=1 or --pipeline-ingest-smoke)",
]
filterwarnings = [
# pandas_datareader still uses distutils LooseVersion (upstream; data-extras dep)
"ignore:distutils Version classes are deprecated:DeprecationWarning:pandas_datareader",
]
[tool.ruff]
target-version = "py310"
line-length = 100
extend-exclude = ["legacy"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
]
ignore = [
"E501", # line length — use formatter / line-length instead
]
[tool.ruff.lint.per-file-ignores]
# Imports after sys.path / lazy matplotlib backend (must stay ordered)
"run_pipeline.py" = ["E402"]
"pipelines/*.py" = ["E402"]
"src/trading_crab_lib/plotting.py" = ["E402"]
[tool.ruff.lint.isort]
known-first-party = ["trading_crab_lib"]