Skip to content

Commit 7bc82e5

Browse files
committed
feat: add SQLAlchemy and Tenacity to all repos with output dispatching and retry logic
- Added `sqlalchemy>=2.0` to all repositories supporting paper trading or database output - Added `tenacity>=8.2.2,<9.0.0` to all repositories for retry logic in output dispatchers - Audited and updated `requirements.in` for all `stock-backtest-*` repositories - Ensured core ML/quant libraries (e.g., `scikit-learn`, `tensorflow`, `torch`) are included where appropriate - Standardized base requirements across all backtest repos - Implemented and ran a Python script to append missing dependencies and recompile `requirements.txt` via `pip-compile` - Verified `output_handler.py` across repositories is finalized and production-ready - Synced all shared utility modules across repositories and verified that all enhancements were correctly integrated This ensures consistent, production-grade dependency management across the entire stock-backtest ecosystem.
1 parent 30915aa commit 7bc82e5

35 files changed

+1358
-624
lines changed

.hooks/check-compiled-requirements.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def recompile(in_file: str, out_file: str) -> bool:
2929
3030
Returns:
3131
True if successful, False otherwise.
32+
3233
"""
3334
print(f"[Fix] Recompiling {in_file} -> {out_file}")
3435
try:
@@ -52,6 +53,7 @@ def check_file(in_file: str, out_file: str, autofix: bool = True) -> bool:
5253
5354
Returns:
5455
True if up to date or successfully fixed, False otherwise.
56+
5557
"""
5658
if not Path(in_file).exists():
5759
return True # Skip if input file does not exist

requirements.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ prometheus_client>=0.17.1
2020
# Security: Fix pip-audit vulnerabilities
2121
requests>=2.32.4
2222
urllib3>=2.5.0
23+
24+
# Retry logic
25+
tenacity>=8.2.2,<9.0.0

requirements.txt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile requirements.in
5+
# pip-compile 'D:\git\stock-tech-patterns\requirements.in'
66
#
77
boto3==1.38.36
8-
# via -r requirements.in
8+
# via -r D:\git\stock-tech-patterns\requirements.in
99
botocore==1.38.36
1010
# via
1111
# boto3
@@ -23,7 +23,7 @@ cycler==0.12.1
2323
fonttools==4.58.4
2424
# via matplotlib
2525
hvac==1.2.1
26-
# via -r requirements.in
26+
# via -r D:\git\stock-tech-patterns\requirements.in
2727
idna==3.10
2828
# via requests
2929
jmespath==1.0.1
@@ -33,26 +33,26 @@ jmespath==1.0.1
3333
kiwisolver==1.4.8
3434
# via matplotlib
3535
loguru==0.7.3
36-
# via -r requirements.in
36+
# via -r D:\git\stock-tech-patterns\requirements.in
3737
matplotlib==3.10.3
38-
# via -r requirements.in
38+
# via -r D:\git\stock-tech-patterns\requirements.in
3939
numpy==1.26.4
4040
# via
41-
# -r requirements.in
41+
# -r D:\git\stock-tech-patterns\requirements.in
4242
# contourpy
4343
# matplotlib
4444
# pandas
4545
# scipy
4646
packaging==25.0
4747
# via matplotlib
4848
pandas==2.3.0
49-
# via -r requirements.in
49+
# via -r D:\git\stock-tech-patterns\requirements.in
5050
pika==1.3.2
51-
# via -r requirements.in
51+
# via -r D:\git\stock-tech-patterns\requirements.in
5252
pillow==11.2.1
5353
# via matplotlib
5454
prometheus-client==0.22.1
55-
# via -r requirements.in
55+
# via -r D:\git\stock-tech-patterns\requirements.in
5656
pyhcl==0.4.5
5757
# via hvac
5858
pyparsing==3.2.3
@@ -63,24 +63,26 @@ python-dateutil==2.9.0.post0
6363
# matplotlib
6464
# pandas
6565
python-dotenv==1.1.0
66-
# via -r requirements.in
66+
# via -r D:\git\stock-tech-patterns\requirements.in
6767
pytz==2025.2
6868
# via pandas
6969
requests==2.32.4
7070
# via
71-
# -r requirements.in
71+
# -r D:\git\stock-tech-patterns\requirements.in
7272
# hvac
7373
s3transfer==0.13.0
7474
# via boto3
7575
scipy==1.15.3
76-
# via -r requirements.in
76+
# via -r D:\git\stock-tech-patterns\requirements.in
7777
six==1.17.0
7878
# via python-dateutil
79+
tenacity==8.5.0
80+
# via -r D:\git\stock-tech-patterns\requirements.in
7981
tzdata==2025.2
8082
# via pandas
8183
urllib3==2.5.0
8284
# via
83-
# -r requirements.in
85+
# -r D:\git\stock-tech-patterns\requirements.in
8486
# botocore
8587
# requests
8688
win32-setctime==1.2.0

0 commit comments

Comments
 (0)