-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
169 lines (153 loc) · 4.77 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
[tool.poetry]
name = "ampel-core"
version = "0.10.2"
description = "Alice in Modular Provenance-Enabled Land"
authors = ["Valery Brinnel"]
maintainers = ["Jakob van Santen <[email protected]>"]
license = "BSD-3-Clause"
readme = "README.md"
homepage = "https://ampelproject.github.io"
repository = "https://github.com/AmpelProject/Ampel-core"
documentation = "https://ampelproject.github.io/Ampel-core"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Information Analysis",
"Typing :: Typed",
]
packages = [{include = "ampel"}]
include = [
'conf/*/*.json',
'conf/*/*/*.json',
'conf/*/*.yaml',
'conf/*/*/*.yaml',
'conf/*/*.yml',
'conf/*/*/*.yml',
]
[tool.poetry.scripts]
ampel-controller = 'ampel.core.AmpelController:AmpelController.main'
ampel = 'ampel.cli.main:main'
[tool.poetry.plugins.cli]
'job_Run_schema_file(s)' = 'ampel.cli.JobCommand'
'process_Run_single_task' = 'ampel.cli.ProcessCommand'
'run_Run_selected_process(es)_from_config' = 'ampel.cli.RunCommand'
'log_Select,_format_and_either_view_(tail_mode_available)_or_save_logs' = 'ampel.cli.LogCommand'
'view_Select,_load_and_save_fresh_"ampel_views"' = 'ampel.cli.ViewCommand'
'db_Initialize,_dump,_delete_specific_databases_or_collections' = 'ampel.cli.DBCommand'
'config_Build_or_update_config._Fetch_or_append_config_elements' = 'ampel.cli.ConfigCommand'
#'start_Run_ampel_continuously._Processes_are_scheduled_according_to_config' = 'ampel.cli.StartCommand'
't2_Match_and_either_reset_or_view_raw_t2_documents' = 'ampel.cli.T2Command'
'buffer_Match_and_view_or_save_ampel_buffers' = 'ampel.cli.BufferCommand'
'event_Show_events_information' = 'ampel.cli.EventCommand'
[tool.poetry.dependencies]
ampel-interface = {version = ">=0.10.3,<0.11"}
python = "^3.10"
pymongo = "^4.0"
sjcl = "^0.2.1"
schedule = "^1.0.0"
yq = "^3.0.0"
prometheus-client = ">=0.16"
xxhash = "^3.0.0"
psutil = "^6.0.0"
requests = "^2.0"
fastapi = {version = ">=0.95", optional = true}
uvicorn = {version = ">=0.21.1", optional = true, extras = ["standard"]}
slack-sdk = {version = "^3.18.1", optional = true}
setproctitle = {version = "^1.3.3", optional = true}
[tool.poetry.dev-dependencies]
pytest = "^8.3.3"
pytest-cov = "^6.0.0"
mypy = "^1.13.0"
pytest-asyncio = "^0.24.0"
pytest-mock = "^3.14.0"
mongomock = "^4.1.2"
# mongomock uses pkg_resources
setuptools = {version = "*", python = ">=3.12"}
httpx = "^0.28.0"
types-setuptools = "^65.1.0"
types-PyYAML = "^6.0.12"
[tool.poetry.extras]
server = ["fastapi", "uvicorn", "setproctitle"]
slack = ["slack_sdk"]
[tool.poetry.group.dev.dependencies]
types-requests = "^2.28.11.15"
types-ujson = "^5.10.0.20240515"
matplotlib = "^3.9.0"
ipython = "^8.25.0"
types-psutil = "^5.9.5.20240516"
[build-system]
requires = ["poetry-core>=1.0.0", "setuptools>=40.8.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--showlocals -r a"
filterwarnings = [
"error",
"default:Pydantic serializer warnings:UserWarning",
"default:There is no current event loop:DeprecationWarning",
"default:unclosed:ResourceWarning",
# warning deep in fastapi
"ignore:.*general_plain_validator_function.*:DeprecationWarning",
"ignore:pkg_resources is deprecated:DeprecationWarning",
"ignore:Deprecated call to `pkg_resources:DeprecationWarning",
]
[tool.mypy]
namespace_packages = true
show_error_codes = true
warn_unused_ignores = true
enable_error_code = "ignore-without-code"
plugins = [
"pydantic.mypy"
]
[tool.pydantic-mypy]
init_typed = true
[[tool.mypy.overrides]]
module = "ampel.abstract.*"
disable_error_code = "empty-body"
[[tool.mypy.overrides]]
module = [
"sjcl",
]
ignore_missing_imports = true
[tool.ruff]
target-version = "py310"
exclude = [
"docs",
]
[tool.ruff.lint]
select = [
"E4",
"E7",
"E9",
"F",
"I",
"UP",
"B",
"DTZ",
"T20",
"PT",
"RET",
"SLF",
"SIM",
# # "ARG", # sometimes your arguments have to conform to an interface
# # "ERA", # seems to prohibit all comments, that's bad
"PL",
"PERF",
"RUF",
]
ignore = [
"E741", # ambiguous variable name
"UP009", # UTF-8 encoding declaration is unnecessary
"PLR09", # too many (arguments|branches)
"PLR2004", # Magic value used in comparison
"RUF012", # mutable class properties (are harmless everywhere BaseModel is used)
"RUF018", # assignment expressions in asserts are fine
"RUF023", # unsorted __slots__ are fine
]
[tool.ruff.lint.per-file-ignores]
"ampel/test/*" = ["T20", "E731"]
"ampel/cli/*" = ["T20"]
"ampel/config/collector/*" = ["T20"]
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]