Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (109 loc) · 3.42 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (109 loc) · 3.42 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "hqbacktest"
version = "0.1.4"
description = "A股量化策略回测与交易模拟引擎"
readme = "README.md"
authors = [
{ name="HowieMen", email="howiemen@honestquant.com" },
]
requires-python = ">=3.10"
license = { text = "MIT" }
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Topic :: Office/Business :: Financial",
"Topic :: Office/Business :: Financial :: Investment",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
]
keywords = [
"hqbacktest",
"quant",
"quantitative",
"backtest",
"investment",
"algotrading",
"A股",
"trading-simulation",
]
dependencies = [
"pandas>=2.0.0",
"tomli>=2.0",
# hqbacktest reads CSV snapshots exclusively via the hqdata API.
# `pip install -e "../hqdata"` before installing hqbacktest, or rely
# on an editable install of hqdata that satisfies the dependency.
"hqdata>=0.1.22",
]
[project.scripts]
hqbacktest = "hqbacktest.cli.__main__:main"
[project.urls]
Homepage = "https://honestquant.com/hqbacktest"
Source = "https://github.com/HonestQuantTech/hqbacktest"
[project.optional-dependencies]
# hqbacktest must NOT import Tushare / RiceQuant / AkShare SDKs directly.
# These extras are reserved placeholders so users have a consistent way to
# declare source-related optional deps; hqdata remains the only integration layer.
tushare = []
ricequant = []
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"black>=25.1.0",
"build>=1.0",
]
[tool.setuptools.packages.find]
where = ["src"]
include = ["hqbacktest*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
# Integration tests live under tests/integration/ and are skipped by
# default (no snapshot on the test machine). Run with
# `pytest tests/integration/ -v` on machines that have `~/.hqdata/tushare`.
addopts = "--ignore=tests/integration"
markers = [
"integration: marks tests as integration tests against real hqdata sources (skipped by default)",
]
[tool.black]
line-length = 88
# Black target-version mirrors the package's runtime floor
# (`requires-python = ">=3.10"`); newer versions are unaffected because
# black auto-applies its PEP-level rules across supported Pythons.
target-version = ["py310"]
# pyproject.toml and README.md are not Python sources; black tries to
# parse them and fails on the TOML author table / HTML badges. Skip them.
extend-exclude = '''
/(
\.toml
| README\.md
)/
'''
[tool.coverage.run]
branch = true
source = ["src/hqbacktest"]
# Only the `python -m hqbacktest` shim is omitted; it is a 4-line entry
# point whose only body runs under `if __name__ == "__main__"` and is
# exercised via subprocess (not measured by in-process coverage).
# `cli/__main__.py` is real, tested business code and stays measured.
omit = [
"src/hqbacktest/__main__.py",
]
[tool.coverage.report]
show_missing = true
skip_covered = false
fail_under = 80
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]