-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
140 lines (124 loc) · 3.56 KB
/
Copy pathpyproject.toml
File metadata and controls
140 lines (124 loc) · 3.56 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
[project]
name = "opt-portfolio"
version = "3.1.0"
description = "US equity factor engine — walk-forward gated by Deflated Sharpe on point-in-time, survivorship-bias-free data. Plus a VAA tactical asset allocation backtester."
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.10"
authors = [
{name = "Portfolio Management Team"}
]
keywords = [
"factor-investing",
"point-in-time",
"deflated-sharpe",
"walk-forward",
"survivorship-bias",
"backtest",
"quant",
"portfolio",
"vaa",
"asset-allocation",
"finance"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Office/Business :: Financial :: Investment",
]
dependencies = [
"numpy>=1.24.0",
"pandas>=2.0.0",
"yfinance>=1.5.2",
"python-dateutil>=2.8.2",
"duckdb>=1.5.5",
"matplotlib>=3.10.9",
"scipy>=1.10.0",
"tenacity>=9.1.4",
"requests>=2.34.2",
]
[project.optional-dependencies]
dev = [
"pytest>=9.1.1",
"pytest-cov>=7.1.0",
"pytest-mock>=3.15.1",
"mypy>=1.20.0",
"ruff>=0.15.10",
"types-requests>=2.31.0",
# 비공개 전략 설정 차단 룰(.pre-commit-config.yaml)을 CI 가 돌리기 위해 필요하다.
# 각자 기계에 깔린 것에 의존하면, 안 깔린 기계에서 방어가 조용히 사라진다.
"pre-commit>=4.0.0",
]
[project.urls]
Homepage = "https://github.com/younghwan91/opt_portfolio"
Documentation = "https://github.com/younghwan91/opt_portfolio#readme"
Repository = "https://github.com/younghwan91/opt_portfolio.git"
[project.scripts]
opt-portfolio = "opt_portfolio.ui.cli:main"
opt-factor = "opt_portfolio.factor.cli:main"
opt-factor-tui = "opt_portfolio.factor.tui:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/opt_portfolio"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/docs",
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
]
ignore = [
"E203", # whitespace before ':'
"W291", # trailing whitespace (inside string literals)
"W293", # blank line contains whitespace (inside string literals)
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["E501"] # test method signatures can exceed line length
[tool.ruff.lint.isort]
known-first-party = ["opt_portfolio"]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
disallow_untyped_defs = true
no_implicit_optional = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --cov=src/opt_portfolio --cov-report=term-missing"
# 테스트가 공용 픽스처를 `from tests.factor.conftest import ...` 로 가져온다.
# tests/ 는 패키지가 아니므로 루트를 경로에 넣어줘야 수집이 성공한다.
pythonpath = ["."]
[tool.coverage.run]
source = ["src/opt_portfolio"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[dependency-groups]
dev = [
"ruff>=0.15.5",
]