-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
158 lines (145 loc) · 5.18 KB
/
pyproject.toml
File metadata and controls
158 lines (145 loc) · 5.18 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[project]
name = "kensho-kfinance"
dynamic = ["version"]
authors = [
{ name="Luke Brown", email="luke.brown@kensho.com" },
{ name="Michelle Keoy", email="michelle.keoy@kensho.com" },
{ name="Keith Page", email="keith.page@kensho.com" },
{ name="Matthew Rosen", email="matthew.rosen@kensho.com" },
{ name="Nick Roshdieh", email="nick.roshdieh@kensho.com" },
]
description = "Python CLI for kFinance"
readme = "README.md"
requires-python = ">=3.10,<4"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"asyncer==0.0.14",
"cachetools>=6,<7",
"click>=8.2.1,<=9",
"fastmcp>=3.2.0,<4",
"langchain-core>=1.2.22,<2",
"langchain-google-genai>=4.2.1,<5",
"numpy>=1.22.4",
"pandas>=2.0.0",
"pillow>=10",
"pydantic>=2.10.0,<3",
"pyjwt>=2.8.0",
"python-dateutil>=2.8.2,<2.9",
"strenum>=0.4.15",
"tabulate>=0.9.0", # required for turning dataframes into markdown
"types-requests>=2.22.0,<3",
"requests>=2.22.0,<3",
"urllib3>=2.5",
]
[project.optional-dependencies]
dev = [
"coverage>=7.6.10,<8",
"ipykernel>=6.29,<7",
"langchain-anthropic>=1.4.0,<2",
"mypy>=1.16.0,<2",
"nbconvert>=7.16,<8",
"nbformat>5.10,<6",
"nbqa>1.9,<2",
"pytest>=9.0.0,<10",
"pytest-asyncio>=1.3.0,<2.0.0",
"pytest-cov>=6.0.0,<7",
"pytest-httpx>=0.36.0,<0.37.0",
"requests_mock>=1.12,<2",
"ruff>=0.9.4,<1",
"time_machine>=2.1,<3",
"types-cachetools>=5.5,<6"
]
[project.urls]
source = "https://github.com/kensho-technologies/kfinance"
changelog = "https://github.com/kensho-technologies/kfinance/blob/main/kfinance/CHANGELOG.md"
documentation = "https://docs.kensho.com/llmreadyapi/python-library"
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
version_file = "kfinance/version.py"
[tool.setuptools]
packages = ["kfinance"]
[tool.ruff]
line-length = 100
extend-exclude = ["alembic_schema", "migrations", ".venv", "venv", "*_pb2*", "version.py"]
output-format = "grouped"
unsafe-fixes = true # Default in ruff < 0.1.1
[tool.ruff.lint]
select = [
"E", # Flake8 errors
"F", # Pyflakes errors
"W", # Codestyle warnings
"I", # isort
"D102", # docstrings for public methods
"D103", # docstrings for public functions
"D107", # docstrings for __init__
"D2", # docstring formatting (autofixable)
"D3", # docstring formatting quotes
"A001", # redefined builtin
"B002", # nonexistent operator
"B006", # mutable default argument
"B014", # duplicate except handler (autofixable)
"B018", # expression not assigned
"C402", # consider using dict comprehension (autofixable)
"BLE", # Blind except
"G", # logger string formatting
"G004", # no f-strings in log messages
"N805", # no self argument
"PLE", # pylint errors
"PLR1722", # consider using sys exit (autofixable)
"PLW", # pylint warnings
"Q", # flake8-quotes
"S102", # no exec
"S307", # no eval
"SLF", # flake8 private member access (_foo)
"T20", # flake8-print
"UP004", # useless object inheritance
"UP032", # use f-string instead of format
]
ignore = [
"E501", # Line too long (handled by black)
"E713", # membership test should be not in (autofixable, ignored for parity)
"E741", # ambigious variable name (parity with kensho-lint)
"F541", # f-string without any placeholders (autofixable, parity with kensho-lint)
"D202", # docstyle no-blank-lines-allowed (autofixable, ignored for parity with kensho-lint < 4.2)
"D203", # docstyle one-blank-line-before-class (incompatible with D211)
"D213", # docstyle multi-line-summary-second-line (incompatible with D212)
"G010", # use logging.warning instead of .warn (autofixable, ignored for parity)
"G201", # use logging.exception instead of .error(..., exc_info=True)
"PLE1205", # too many arguments to logger (ignored for parity with kensho-lint < 4.2)
"PLW0602", # global variable not assigned (ignored for parity)
"PLW1508", # invalid envvar type (ignored for parity)
"PLW2901", # redefine loop variable (ignored for parity)
]
[tool.ruff.lint.per-file-ignores]
"**/test*/**" = ["D"] # Ignore pydocstyle checks on tests
# When fast lint runs ruff from ci dirctory, the rule "**/test*/**" is not working
# Issue link: https://github.com/astral-sh/ruff/issues/6480
"/**/test*/**" = ["D"]
[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2
force-sort-within-sections = true
known-third-party = ["wandb"]
[tool.mypy]
plugins = ["pydantic.mypy"]
ignore_missing_imports = true
# `normal` would emit errors for type issues in imported modules, which is unnecessary
# since we pass files by name when linting.
follow_imports = "silent"
# Since we have `disallow_untyped_defs` set, errors from this rule are from external packages
# outside of the maintainer's control.
disallow_untyped_calls = false
disallow_incomplete_defs = true
disallow_untyped_defs = true
strict_optional = true
strict_equality = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
exclude = "tests"