-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
174 lines (158 loc) · 4.52 KB
/
pyproject.toml
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
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "entities_service"
[tool.flit.sdist]
exclude = [
".*",
"tests",
"docs",
"CHANGELOG.md",
"docker-compose.yml",
"Dockerfile",
]
include = [
"pyproject.toml",
"README.md",
"LICENSE",
"entities_service",
]
[project]
name = "entities-service"
authors = [
{name = "Casper Welzel Andersen", email = "[email protected]"},
]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Natural Language :: English",
"Operating System :: OS Independent",
]
requires-python = "~=3.10"
dynamic = ["version", "description"]
dependencies = [
"fastapi ~=0.115.4",
"httpx ~=0.27.2",
"pydantic-settings ~=2.6",
"pymongo ~=4.10",
"python-dotenv ~=1.0",
"uvicorn ~=0.32.0",
]
[project.optional-dependencies]
cli = [
"httpx-auth ~=0.22.0",
"pyyaml ~=6.0",
"typer[all] ~=0.12.5",
]
testing = [
"cryptography ~=43.0",
"dlite-python ~=0.5.23",
"mongomock ~=4.2",
"pytest ~=8.3",
"pytest-asyncio ~=0.24.0",
"pytest-cov ~=6.0",
"pytest-httpx ~=0.33.0",
"entities-service[cli]",
]
server = [
"gunicorn ~=23.0.0",
]
dev = [
"pre-commit ~=4.0",
"entities-service[cli,testing]",
]
[project.scripts]
entities-service = "entities_service.cli.main:APP"
[project.urls]
Home = "https://github.com/SINTEF/entities-service"
Documentation = "https://CasperWA.github.io/entities-service"
Source = "https://github.com/SINTEF/entities-service"
"Issue Tracker" = "https://github.com/SINTEF/entities-service/issues"
Changelog = "https://CasperWA.github.io/entities-service/latest/CHANGELOG"
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
scripts_are_modules = true
warn_unused_configs = true
hide_error_codes = false
allow_redefinition = true
check_untyped_defs = true
plugins = ["pydantic.mypy"]
[tool.ruff.lint]
extend-select = [
"E", # pycodestyle
"F", # pyflakes
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"YTT", # flake8-2020
"EXE", # flake8-executable
"PYI", # flake8-pyi
]
ignore = [
"PLR", # Design related pylint codes
"B008", # Performing function calls in argument defaults - done all the time in the CLI.
]
isort.required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
".github/**" = [
"BLE", # flake8-blind-except
"T20", # flake8-print
]
"docs/example/**" = [
"BLE", # flake8-blind-except
"I002", # missing-required-import
"T20", # flake8-print
]
"tests/**" = [
"BLE", # flake8-blind-except
"T20", # flake8-print
]
"entities_service/cli/commands/**" = [
# We must be able to set command input defaults
"B006", # Do not use mutable data structures for argument defaults
]
[tool.pytest.ini_options]
minversion = "7.4"
addopts = "-rs --cov=entities_service --cov-config=pyproject.toml --cov-report=term-missing:skip-covered --no-cov-on-fail"
filterwarnings = [
# Treat all warnings as errors
"error",
# mongomock uses pkg_resources
"ignore:.*pkg_resources is deprecated as an API.*:DeprecationWarning",
# httpx-auth uses datetime.datetime.utcfromtimestamp(), deprecated in Python 3.12
"ignore:.*Use timezone-aware objects to represent datetimes in UTC.*:DeprecationWarning",
# 'app' parameter is deprecated in httpx
# starlette's TestClient should be updated
"ignore:.*'app' shortcut is now deprecated.*:DeprecationWarning",
# Starlette's TestClient does not properly close all memory streams.
# For more information see the discussion on GitHub:
# https://github.com/encode/starlette/discussions/2603
"ignore:.*MemoryObjectReceiveStream.*:pytest.PytestUnraisableExceptionWarning",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
sigterm = true
relative_files = true
source = ["entities_service"]