-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (134 loc) · 4.09 KB
/
Copy pathpyproject.toml
File metadata and controls
155 lines (134 loc) · 4.09 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
# =============================================================================
# PEP 621: Project Metadata
# https://peps.python.org/pep-0621/
# =============================================================================
[project]
name = "mlprod"
version = "1.0.0"
description = "Machine Learning in Production."
readme = "README.md"
authors = [
{ name = "Claudio Bonesana" },
{ name = "Stefano Toniolo" },
]
license = { text = "MIT" }
requires-python = ">=3.12"
keywords = ["machine learning", "production", "deployment", "MLOps"]
classifiers = [
]
# --- Core Dependencies ---
dependencies = [
"pandas~=2.3.3",
"python-dotenv~=1.2.1",
"pydantic~=2.12.5",
"pydantic_settings~=2.12.0",
"tqdm~=4.67.1",
"pyyaml~=6.0.3",
"rich~=14.2.0",
]
# --- Optional Dependencies ---
[project.optional-dependencies]
notebook = [
"jupyterlab~=4.5.0",
"matplotlib~=3.10.7",
"requests~=2.32.5",
"seaborn~=0.13.2",
]
node = [
"celery~=5.6.0",
"fastapi-sqlalchemy~=0.2.1",
"fastapi~=0.124.0",
"prometheus-client~=0.23.1",
"psycopg2-binary~=2.9.1",
"redis~=7.1.0",
"scikit-learn~=1.7.2",
"sqlalchemy~=2.0.44",
"torch~=2.9.0",
"uvicorn~=0.38.0",
]
docs = [
"sphinx~=9.0.4",
]
test = [
"pytest>=9.0.2",
"pytest-cov>=7.0",
]
dev = [
"mlprod[notebook,node,test,docs]",
"ruff>=0.14.0",
"pre-commit>=4.5.0",
"mypy>=1.19.0",
]
# --- Project URLs ---
[project.urls]
Homepage = "https://machine-learning-in-production.readthedocs.io/en/latest/index.html"
Repository = "https://github.com/IDSIA/MLprod"
"Bug Tracker" = "https://github.com/IDSIA/MLprod/issues"
# =============================================================================
# Build System Configuration
# =============================================================================
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
# =============================================================================
# Tool Configurations
# =============================================================================
# --- Setuptools Configuration ---
[tool.setuptools.packages.find]
where = ["src"]
# --- Ruff Linter & Formatter Configuration ---
# Your provided detailed configuration is integrated here.
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg",
".ipynb_checkpoints", ".mypy_cache", ".nox", ".pants.d", ".pyenv",
".pytest_cache", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv",
".vscode", "__pypackages__", "_build", "buck-out", "build", "dist",
"node_modules", "site-packages", "*env", "logs",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.12
target-version = "py312"
[tool.ruff.lint]
# Enable Pyflakes (`F`), specific pycodestyle (`E`) codes, and docstring checks (`D`).
select = ["D", "E4", "E7", "E9", "F"]
ignore = ["D100", "D104", "D415"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in docstrings.
docstring-code-line-length = "dynamic"
# --- Pytest Configuration ---
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
addopts = [
"-v",
"--cov=src/",
"--cov-report=term-missing",
]
# --- MyPy Static Type Checker Configuration ---
[tool.mypy]
python_version = "3.12" # Aligned with ruff's target-version
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
disallow_untyped_defs = true