-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
194 lines (177 loc) · 5.51 KB
/
Copy pathpyproject.toml
File metadata and controls
194 lines (177 loc) · 5.51 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mlango"
dynamic = ["version"]
description = "A batteries-included framework for machine learning, analytics and LLM agents, built on Django's philosophy."
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Denis Drobyshev", email = "drobishev.denis@icloud.com" }]
maintainers = [{ name = "Denis Drobyshev", email = "drobishev.denis@icloud.com" }]
keywords = [
"machine-learning",
"mlops",
"framework",
"agents",
"llm",
"experiment-tracking",
"model-registry",
"data-versioning",
"evaluation",
"django",
"analytics",
"deep-learning",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: Web Environment",
"Framework :: Pydantic",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Natural Language :: Russian",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Database :: Front-Ends",
"Typing :: Typed",
]
dependencies = [
"sqlalchemy>=2.0",
"fastapi>=0.110",
"uvicorn>=0.27",
"jinja2>=3.1",
"python-multipart>=0.0.9",
"pydantic>=2.6",
"numpy>=1.24",
]
[project.optional-dependencies]
sklearn = ["scikit-learn>=1.3", "joblib>=1.3"]
torch = ["torch>=2.0"]
transformers = ["transformers>=4.40", "torch>=2.0", "accelerate>=0.30"]
anthropic = ["anthropic>=0.40"]
parquet = ["pyarrow>=14.0"]
huggingface = ["datasets>=2.19"]
postgres = ["psycopg[binary]>=3.1"]
s3 = ["boto3>=1.34"]
otel = ["opentelemetry-api>=1.25", "opentelemetry-sdk>=1.25"]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"httpx>=0.27",
"ruff>=0.6",
"mypy>=1.11",
"pre-commit>=3.7",
# Only for tests/test_pipelines.py, which reads the two CI definitions and
# checks they still agree with each other.
"pyyaml>=6.0",
]
docs = [
"mkdocs-material>=9.5",
"mkdocs-static-i18n>=1.2",
]
all = [
"mlango[sklearn,torch,transformers,anthropic,parquet,huggingface,s3,otel,dev,docs]",
]
[project.urls]
Homepage = "https://github.com/DrobyshevDev/mlango"
Documentation = "https://drobyshevdev.github.io/mlango/"
Repository = "https://github.com/DrobyshevDev/mlango"
Changelog = "https://github.com/DrobyshevDev/mlango/blob/master/CHANGELOG.md"
Issues = "https://github.com/DrobyshevDev/mlango/issues"
[project.scripts]
mlango = "mlango.management.manager:main"
[tool.hatch.version]
path = "mlango/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["mlango"]
[tool.hatch.build.targets.sdist]
include = [
"/mlango",
"/tests",
"/docs",
"/examples",
"/README.md",
"/README.ru.md",
"/LICENSE",
"/CHANGELOG.md",
"/CONTRIBUTING.md",
"/SECURITY.md",
"/mkdocs.yml",
"/pyproject.toml",
]
exclude = [
"**/__pycache__",
"**/mlango.db",
"**/mlango.db-wal",
"**/mlango.db-shm",
"**/artifacts",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = ["ignore::DeprecationWarning"]
addopts = "--strict-markers"
markers = [
"slow: takes more than a second; deselect with -m 'not slow'",
]
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = ["examples"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "C4"]
ignore = ["B008", "E501"]
[tool.ruff.lint.per-file-ignores]
# Scaffold templates are strings containing example code, not code itself.
"mlango/template.py" = ["E501"]
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_ignores = false
no_implicit_optional = true
[[tool.mypy.overrides]]
# Declarative classes rely on a metaclass that mypy cannot follow.
module = ["mlango.core.base", "mlango.core.options"]
disable_error_code = ["attr-defined"]
[[tool.mypy.overrides]]
# python_version above is 3.10 on purpose — it is what catches syntax we cannot
# ship. But it also makes mypy parse third-party stubs as 3.10, and numpy's use
# `type` statements that only exist in 3.12. Their stubs are not ours to fix, and
# the error says nothing about this codebase, so skip following them.
module = ["numpy.*", "pandas.*", "sklearn.*", "torch.*", "transformers.*"]
follow_imports = "skip"
follow_imports_for_stubs = true
[tool.coverage.run]
source = ["mlango"]
omit = ["*/__main__.py"]
# The CLI is tested by running manage.py in a subprocess, which is the only way
# to cover settings discovery, argv parsing and exit codes as a user hits them.
# Without parallel mode those subprocesses are invisible to coverage, and the
# management commands look untested when they are not.
parallel = true
concurrency = ["thread", "multiprocessing"]
[tool.coverage.report]
# A gate, not a target. Set just under the current figure so an unrelated change
# cannot quietly delete coverage, while a one-line platform difference does not
# fail an honest build. Raise it when the number rises; never lower it to make a
# red build green.
fail_under = 84
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@overload",
]