-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
176 lines (161 loc) · 3.83 KB
/
pyproject.toml
File metadata and controls
176 lines (161 loc) · 3.83 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
[build-system]
requires = ["hatchling>=1.18.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["ocpi"]
include = ["README.md", "LICENSE"]
[tool.hatch.build.targets.sdist]
exclude = [
"/docs/",
"/.github/",
"/tests/",
"/.gitignore",
"/.pre-commit",
"/Pipfile",
"/Pipfile.lock",
"/readthedocs.yaml",
]
[tool.black]
line-length = 88
target-version = ["py311", "py312"]
include = '\.pyi?$'
exclude = '''
(
/(
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
|^temp|
|ignore
)/
| pyproject.toml
)
'''
[project]
name = "ocpi-python"
description = "A modern Python implementation of the Open Charge Point Interface (OCPI) protocol with FastAPI. Supports OCPI 2.3.0, 2.2.1, and 2.1.1 with Pydantic v2 and production-ready features."
requires-python = ">=3.11"
readme = "README.md"
license = {text = "MIT OR EUPL-1.2"}
dynamic = ["version"]
keywords = [
"ocpi",
"ev-charging",
"electric-vehicle",
"charging-station",
"cpo",
"emsp",
"fastapi",
"pydantic",
"async",
"api",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: FastAPI",
"Framework :: Pydantic :: 2",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"pydantic>=2.0.0,<3.0.0",
"pydantic-settings>=2.0.0",
"fastapi>=0.115.0,<1.0.0",
"httpx>=0.27.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"ruff>=0.1.0",
"mypy>=1.5.0",
"black>=23.9.0",
"pre-commit>=3.4.0",
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.24.0",
"mkdocs-mermaid2-plugin>=1.1.0",
"ruff>=0.1.0",
]
[[project.authors]]
name = "ELU Mobility"
email = "dev@elu-energy.it"
[project.urls]
Homepage = "https://github.com/elumobility/ocpi-python"
Repository = "https://github.com/elumobility/ocpi-python"
Documentation = "https://elumobility.github.io/ocpi-python/"
Issues = "https://github.com/elumobility/ocpi-python/issues"
Changelog = "https://github.com/elumobility/ocpi-python/blob/main/CHANGELOG.md"
[tool.hatch.version]
path = "ocpi/__init__.py"
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/test_examples/*.py" = ["E402"] # Allow imports after sys.path modification
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
exclude = ["venv", "tests"]
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "DEBUG"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
testpaths = "tests"
addopts = [
"--import-mode=importlib",
"--cov=ocpi",
"--cov-report=term-missing",
"--cov-report=xml",
]
pythonpath = [
"." ,"ocpi"
]
[tool.coverage.run]
source = ["ocpi"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]