-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (173 loc) · 5.15 KB
/
pyproject.toml
File metadata and controls
190 lines (173 loc) · 5.15 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
[build-system]
requires = [
"setuptools>=77",
"setuptools_scm[toml]>=8.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "esslivedata"
description = "Live data reduction visualisation framework for ESS."
authors = [{ name = "Scipp contributors" }]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
readme = "README.md"
classifiers = [
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
requires-python = ">=3.11"
# IMPORTANT:
# Run 'tox -e deps' after making changes here. This will update requirement files.
# Make sure to list one dependency per line.
dependencies = [
"PyYAML",
"confluent_kafka",
"ess-streaming-data-types",
"essreduce>=26.4.0",
"jinja2",
"pydantic>=2",
"scipp>=25.02.0", # Improved performance of scipp.group
"scippneutron>=25.11.1", # For DREAM unit conversion fixes
"pooch",
"structlog>=24.0.0",
]
dynamic = ["version"]
[project.optional-dependencies]
test = [
"essdiffraction>=26.4.0",
"essreflectometry>=26.4.0",
"esssans",
"essspectroscopy>=26.3.0",
"holoviews",
"panel",
"param",
"pytest",
"pytest-benchmark",
"scippneutron>=25.07.0",
]
bifrost = [
"essspectroscopy>=26.3.0",
]
dream = [
"essdiffraction>=26.4.0",
]
loki = [
"esssans>=26.4.0",
]
odin = [
"essimaging>=26.4.0",
]
estia = [
"essreflectometry>=26.4.0",
]
nmx = [
"essnmx>=26.4.0",
]
dashboard = [
"bokeh",
"holoviews",
"panel",
"param",
]
[project.scripts]
ess-livedata-make-geometry-nexus = "ess.livedata.scripts.make_geometry_nexus:main"
[project.urls]
"Bug Tracker" = "https://github.com/scipp/esslivedata/issues"
"Documentation" = "https://scipp.github.io/esslivedata"
"Source" = "https://github.com/scipp/esslivedata"
[tool.setuptools_scm]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = """
--strict-config
--strict-markers
--import-mode=importlib
--benchmark-skip
-m "not integration and not slow"
-ra
-v
"""
testpaths = "tests"
markers = [
"integration: Integration tests requiring Kafka and running services",
"instrument: Specify instrument name for parameterized tests",
"services: Specify which services to use in integration_env fixture (monitor, detector, or reduction)",
"slow: Slow tests (>2s) excluded by default, run in CI via tox",
]
filterwarnings = [
"error",
]
pythonpath = "tests"
[tool.ruff]
line-length = 88
extend-include = ["*.ipynb"]
extend-exclude = [
".*", "__pycache__", "build", "dist", "install",
]
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules/
select = ["B", "C4", "DTZ", "E", "F", "G", "I", "PERF", "PGH", "PT", "PYI", "RUF", "S", "T20", "TID251", "UP", "W"]
ignore = [
# Conflict with ruff format, see
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"COM812", "COM819", "D206", "D300", "E111", "E114", "E117", "ISC001", "ISC002", "Q000", "Q001", "Q002", "Q003", "W191",
"UP017", # datetime.UTC is not available in Python 3.11, use timezone.utc instead
]
fixable = ["B010", "I001", "PT001", "RUF022"]
isort.known-first-party = ["ess.livedata"]
pydocstyle.convention = "numpy"
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"logging.getLogger".msg = "Use structlog.get_logger() instead of logging.getLogger()"
[tool.ruff.lint.per-file-ignores]
# logging_config.py legitimately needs stdlib logging to configure structlog's backend
"src/ess/livedata/logging_config.py" = ["TID251"]
# those files have an increased risk of relying on import order
"tests/*" = [
"S101", # asserts are fine in tests
"S311", # deterministic seeded RNG is fine for test simulations
"B018", # 'useless expressions' are ok because some tests just check for exceptions
"TID251", # tests can use stdlib logging
]
"scripts/*" = [
"TID251", # scripts can use stdlib logging
]
"*.ipynb" = [
"E501", # longer lines are sometimes more readable
"F403", # *-imports used with domain types
"F405", # linter may fail to find names because of *-imports
"I", # we don't collect imports at the top
"S101", # asserts are used for demonstration and are safe in notebooks
"T201", # printing is ok for demonstration purposes
]
[tool.ruff.format]
quote-style = "preserve"
[tool.mypy]
strict = true
ignore_missing_imports = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
warn_unreachable = true
[tool.setuptools.package-data]
"ess.livedata.config.defaults" = ["*.yaml", "*.yaml.jinja"]
"ess.livedata.config.instruments" = ["*/grid_templates/*.yaml"]
"ess.livedata.dashboard.templates" = ["*.html"]
[tool.codespell]
ignore-words-list = [
# Codespell wants "socioeconomic" which seems to be the standard spelling.
# But we use the word in our code of conduct which is the contributor covenant.
# Let's not modify it if we don't have to.
"socio-economic",
]
[tool.pylint.main]
load-plugins = ["pylint_pydantic"]