mirror of
https://ghfast.top/https://github.com/aeroxw/easy_tdx_max.git
synced 2026-09-12 15:44:18 +08:00
合并 company-info(列目录)与 company-info-content(读正文)为一个命令,
板块名改为可选位置参数:无参数列目录,有参数读正文。消除两个相似命令名
导致的混淆(用户曾误用 company-info SH 601088 "公司概况" 报错)。
- company-info:name_or_filename 可选,无则列 F10 板块目录,有则读正文
- company-info-content:保留为隐藏别名(hidden=True),向后兼容 v1.15.1
- 提取 _run_category/_run_content 模块级函数复用逻辑
- 新增 examples/06_finance/{README.md,company_cli.sh,company_web_api.py}
覆盖 CLI / Python API / Web API 三种调用方式,含 16 个 F10 板块完整列表
- 更新 company_info.py 板块名为实测的 16 板块
- bump 版本号至 1.15.2
66 lines
1.7 KiB
TOML
66 lines
1.7 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "easy-tdx"
|
|
version = "1.15.2"
|
|
description = "通达信 TCP 协议行情数据客户端,支持在线行情、离线数据读取与写入同步"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
dependencies = ["pandas>=2.0", "tzdata>=2024.1", "click>=8.0"]
|
|
|
|
[project.scripts]
|
|
easy-tdx = "easy_tdx.cli:cli" # cli/__init__.py exposes the click group
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8.0", "pytest-asyncio>=0.23", "pytest-cov", "mypy>=1.9", "ruff>=0.4", "scipy>=1.10"]
|
|
science = ["scipy>=1.10"]
|
|
web = ["fastapi>=0.110", "uvicorn[standard]>=0.29"]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/easy_tdx"]
|
|
|
|
[tool.mypy]
|
|
strict = true
|
|
python_version = "3.12"
|
|
# 跳过未跟踪的本地脚本(依赖外部 unified_config/sqlalchemy/requests,不属于库)
|
|
exclude = ["src/easy_tdx/exchange_margin\\.py"]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["pandas", "tabulate", "matplotlib", "matplotlib.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "easy_tdx.MyTT"
|
|
# Type stubs provided via MyTT.pyi — keep strict checks enabled
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["fastapi.*", "uvicorn.*", "pydantic.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["scipy", "scipy.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.ruff]
|
|
target-version = "py310"
|
|
line-length = 100
|
|
extend-exclude = ["*.pyi", "src/easy_tdx/exchange_margin.py"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "--tb=short"
|
|
asyncio_mode = "auto"
|
|
|
|
[tool.coverage.run]
|
|
source = ["easy_tdx"]
|
|
omit = ["tests/*"]
|
|
|
|
[tool.coverage.report]
|
|
fail_under = 50
|
|
show_missing = true
|