File size: 6,071 Bytes
3b7138e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
[project]
name = "dartlab"
version = "0.9.6"
description = "DART μ „μžκ³΅μ‹œ + EDGAR κ³΅μ‹œλ₯Ό ν•˜λ‚˜μ˜ νšŒμ‚¬ 맡으둜 β€” Python 재무 뢄석 라이브러리"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.12"
authors = [
    {name = "eddmpython"}
]
keywords = [
    "dart",
    "edgar",
    "sec",
    "financial-statements",
    "korea",
    "disclosure",
    "accounting",
    "polars",
    "sections",
    "mcp",
    "ai-analysis",
    "annual-report",
    "10-k",
    "xbrl",
    "μ „μžκ³΅μ‹œ",
    "μž¬λ¬΄μ œν‘œ",
    "μ‚¬μ—…λ³΄κ³ μ„œ",
    "κ³΅μ‹œλΆ„μ„",
    "λ‹€νŠΈ",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Intended Audience :: Financial and Insurance Industry",
    "Intended Audience :: End Users/Desktop",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Office/Business :: Financial",
    "Topic :: Office/Business :: Financial :: Accounting",
    "Topic :: Office/Business :: Financial :: Investment",
    "Topic :: Scientific/Engineering :: Information Analysis",
    "Natural Language :: Korean",
    "Natural Language :: English",
    "Typing :: Typed",
]
dependencies = [
    # core
    "beautifulsoup4>=4.14.3,<5",
    "lxml>=6.0.2,<7",
    "httpx>=0.28.1,<1",
    "polars>=1.0.0,<2",
    "rich>=14.3.3,<15",
    "huggingface-hub>=0.20.0,<1",
    "openpyxl>=3.1.5,<4",
    "diff-match-patch>=20230430",
    "numpy>=1.26.0,<3",
    "marimo>=0.22.0",
    # ai providers
    "openai>=1.0.0,<3",
    "google-genai>=1.0.0,<2",
    "anthropic>=0.30.0,<2",
    # server (dartlab ai)
    "fastapi>=0.135.1,<1",
    "uvicorn[standard]>=0.30.0,<1",
    "sse-starlette>=2.0.0,<3",
    "mcp[cli]>=1.0",
    "qrcode>=7.0,<9",
    # viz
    "plotly>=5.0.0,<6",
]

[project.scripts]
dartlab = "dartlab.cli.main:main"

[project.entry-points."dartlab.plugins"]

[project.urls]
Homepage = "https://eddmpython.github.io/dartlab/"
Repository = "https://github.com/eddmpython/dartlab"
Documentation = "https://eddmpython.github.io/dartlab/docs/"
Issues = "https://github.com/eddmpython/dartlab/issues"
Changelog = "https://eddmpython.github.io/dartlab/docs/changelog"
Demo = "https://huggingface.co/spaces/eddmpython/dartlab"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/dartlab"]
artifacts = [
    "src/dartlab/ui/build/**",
]
exclude = [
    "**/_reference/**",
    "src/dartlab/engines/edinet/**",
    "src/dartlab/engines/esg/**",
    "src/dartlab/engines/event/**",
    "src/dartlab/engines/supply/**",
    "src/dartlab/engines/watch/**",
]

[tool.hatch.build.targets.sdist]
include = [
    "src/dartlab/**/*.py",
    "src/dartlab/**/*.json",
    "src/dartlab/**/*.parquet",
    "src/dartlab/ui/build/**",
    "README.md",
    "LICENSE",
]
exclude = [
    "**/_reference/**",
    "src/dartlab/engines/edinet/**",
    "src/dartlab/engines/esg/**",
    "src/dartlab/engines/event/**",
    "src/dartlab/engines/supply/**",
    "src/dartlab/engines/watch/**",
]

[tool.ruff]
target-version = "py312"
line-length = 120
exclude = ["experiments", "*/_reference"]

[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = ["E402", "E501", "E741", "F841"]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "bench_*.py"]
addopts = "-v --tb=short"
asyncio_mode = "auto"
markers = [
    "requires_data: 둜컬 parquet 데이터 ν•„μš” (CIμ—μ„œ skip)",
    "unit: 순수 둜직/mock만 β€” 데이터 λ‘œλ“œ μ—†μŒ, 병렬 μ•ˆμ „",
    "integration: Company 1개 λ‘œλ”© ν•„μš” β€” 쀑간 무게",
    "heavy: λŒ€λŸ‰ 데이터 λ‘œλ“œ β€” 단독 μ‹€ν–‰ ν•„μˆ˜",
]

[tool.coverage.run]
source = ["dartlab"]
omit = [
    "src/dartlab/engines/ai/providers/*",
    "src/dartlab/review/*",
]

[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
    "pragma: no cover",
    "if __name__",
    "raise NotImplementedError",
]
fail_under = 30

[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "basic"
include = ["src/dartlab"]
exclude = [
    "src/dartlab/engines/ai/providers/**",
    "ui/**",
    "experiments/**",
]
reportMissingTypeStubs = false
reportUnknownParameterType = false
reportUnknownMemberType = false
reportUnknownVariableType = false

[tool.bandit]
exclude_dirs = ["experiments", "tests"]
skips = ["B101"]

[tool.deptry]
# μ˜΅μ…”λ„ 톡합 μ˜μ‘΄μ„± β€” μ‚¬μš©μžκ°€ 별도 μ„€μΉ˜ν•  λ•Œλ§Œ λ™μž‘ (λŸ°νƒ€μž„ ImportError κ°€λ“œ 있음)
extend_exclude = [
    "src/dartlab/.*/_reference/.*",  # ν•™μŠ΅/μ‹€ν—˜ μ½”λ“œ, λŸ°νƒ€μž„ λ―Έμ‚¬μš©
]
[tool.deptry.per_rule_ignores]
DEP001 = [
    # ── channel μ–΄λŒ‘ν„° (μ™ΈλΆ€ λ©”μ‹ μ € μ˜΅μ…”λ„) ──
    "discord", "slack_bolt", "telegram",
    # ── CLI μΈν„°λž™ν‹°λΈŒ μ˜΅μ…”λ„ ──
    "prompt_toolkit",
    # ── display μ˜΅μ…”λ„ ──
    "great_tables", "itables", "IPython",
    # ── gather μ˜΅μ…”λ„ ──
    "FinanceDataReader", "tavily",
    # ── _reference ν•™μŠ΅/μ‹€ν—˜ ──
    "agents", "owlready2", "rapidfuzz", "edgar",
    # ── transitive deps (λ‹€λ₯Έ νŒ¨ν‚€μ§€κ°€ λŒμ–΄μ˜΄) ──
    "dotenv",      # python-dotenv
    "google",      # google-genai
    "yaml",        # pyyaml
    "bs4",         # beautifulsoup4
    "starlette",   # fastapiκ°€ λŒμ–΄μ˜΄
    "pydantic",    # fastapiκ°€ λŒμ–΄μ˜΄
]
DEP002 = [
    "beautifulsoup4",  # bs4 직접 import
    "google-genai",    # google.genai μ‚¬μš© (gemini provider)
    "marimo",          # λ…ΈνŠΈλΆ 컴파일/배포 도ꡬ
]

[dependency-groups]
dev = [
    "build>=1.4.0",
    "dartlab[all]",
    "hatchling>=1.29.0",
    "hypothesis>=6.100.0",
    "pillow>=12.1.1",
    "pre-commit>=4.0.0",
    "pyright>=1.1.0",
    "pytest>=9.0.2",
    "pytest-asyncio>=0.24.0",
    "pytest-benchmark>=5.0.0",
    "pytest-cov>=6.0.0",
    "radon>=6.0.0",
    "vulture>=2.0",
]