-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (131 loc) · 3.95 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (131 loc) · 3.95 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
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "registry-pattern"
version = "0.5.1"
description = "A flexible registry pattern with DI container, Pydantic validation, and recursive config building"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{name = "Adnan Harun Dogan", email = "adnanharundogan@gmail.com"}
]
keywords = [
"registry",
"pattern",
"dependency-injection",
"di-container",
"ioc",
"pydantic",
"validation",
"factory-pattern",
"configuration",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
# POSIX-only: ``meters.py`` imports ``resource`` and reads
# ``/proc/self/{io,net/dev}`` (Linux-specific within POSIX);
# ``reporters.py`` imports ``syslog``. Windows is not supported.
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Object Brokering",
"Typing :: Typed",
]
# Core deps only. Optional features live under [project.optional-dependencies].
dependencies = [
"pydantic>=2.0",
"typing-extensions>=4.0",
]
[project.optional-dependencies]
# ConfigFileEngine.yaml loader
yaml = ["pyyaml>=6.0"]
# OpenTelemetryReporter (spans + Histogram metrics)
otel = ["opentelemetry-api>=1.20"]
# registry.experimental.torch_compat (markers, TorchProfilerMeter, TensorBoardReporter)
torch = ["torch>=2.0", "tensorboard>=2.0"]
docs = [
"sphinx>=7.0",
"sphinx-rtd-theme>=2.0",
"sphinx-autodoc-typehints>=1.25",
"sphinxcontrib-mermaid",
]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"black>=23.0",
"flake8>=6.0",
"pyright>=1.1",
"ruff>=0.1.0",
"pyyaml>=6.0",
]
all = [
"registry-pattern[yaml,otel,torch,docs,dev]",
]
[project.urls]
Homepage = "https://github.com/adnanhd/registry-pattern"
Repository = "https://github.com/adnanhd/registry-pattern"
Documentation = "https://registry-pattern.readthedocs.io/"
Issues = "https://github.com/adnanhd/registry-pattern/issues"
[tool.setuptools]
packages = ["registry", "registry.mixin", "registry.experimental"]
[tool.setuptools.package-data]
registry = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
[tool.black]
line-length = 88
target-version = ["py310", "py311", "py312"]
exclude = '''
/(
\.git
| \.venv
| build
| dist
| \.eggs
)/
'''
[tool.pyright]
include = ["registry", "tests"]
exclude = ["build", "dist", ".venv"]
pythonVersion = "3.10"
typeCheckingMode = "basic"
reportMissingImports = true
reportMissingTypeStubs = false
[tool.ruff]
line-length = 88
target-version = "py38"
select = ["E", "F", "I", "N", "W", "UP"]
# The package supports Python 3.8 and uses pydantic, which evaluates
# annotations at runtime. pyupgrade's annotation rewrites assume
# ``from __future__ import annotations`` makes the modern ``list[...]`` /
# ``X | None`` forms safe, but pydantic resolves the stringified annotations
# on import and those forms raise on 3.8. Keep the typing.* forms.
ignore = ["E501", "UP006", "UP007", "UP035", "UP037", "UP045"]
[tool.ruff.per-file-ignores]
# Tests build classes dynamically and bind them to PascalCase locals.
"tests/*" = ["N806"]
[tool.coverage.run]
source = ["registry"]
omit = ["tests/*", "examples/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]