-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
228 lines (199 loc) · 4.93 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
[build-system]
requires = ["setuptools>=64.0", "setuptools_scm[toml]>=8.0"]
build-backend = "setuptools.build_meta"
[tool.copyright]
copyright = "2014-2024, APS"
[project]
name = "instrument"
dynamic = ["version"]
description = "Model of a Bluesky Data Acquisition Instrument in console, notebook, & queueserver."
authors = [
{ name = "Eric Codrea", email = "ecodrea@anl.gov" },
{ name = "Pete Jemian", email = "prjemian+instrument@gmail.com" },
{ name = "Rafael Vescovi", email = "rvescovi@anl.gov" },
]
maintainers = [
{ name = "Eric Codrea", email = "ecodrea@anl.gov" },
{ name = "Pete Jemian", email = "prjemian+instrument@gmail.com" },
{ name = "Rafael Vescovi", email = "rvescovi@anl.gov" },
]
readme = "README.md"
requires-python = ">=3.11"
keywords = ['bluesky', 'queueserver']
license = { file = "src/instrument/LICENSE" }
classifiers = [
"Development Status :: 6 - Mature",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
"License :: Freely Distributable",
"License :: Public Domain",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Utilities",
]
dependencies = [
"apstools",
"bluesky-queueserver",
"bluesky-queueserver-api",
"bluesky",
"bluesky-widgets",
"databroker ==1.2.5",
"ipython",
"jupyterlab",
"ophyd-registry",
"ophyd",
"pyRestTable",
"pysumreg",
"qtpy",
"PyQt5>5.15",
]
[project.optional-dependencies]
dev = ["build", "isort", "mypy", "pre-commit", "pytest", "ruff"]
# doc: conda install conda-forge::pandoc
doc = [
"babel",
"ipykernel",
"jinja2",
"markupsafe",
"myst_parser",
"nbsphinx",
"pygments-ipython-console",
"pygments",
"sphinx-design",
"sphinx-tabs",
"sphinx",
]
all = ["instrument[dev,doc]"]
[project.urls]
"Homepage" = "https://BCDA-APS.github.io/bs_model_instrument/"
"Bug Tracker" = "https://github.com/BCDA-APS/bs_model_instrument/issues"
# [project.scripts]
# instrument = "instrument.app:main"
[tool.black]
line-length = 115
target-version = ['py311']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| \.pytest_cache
| _build
| build
| dist
| docs
)/
)
'''
[tool.flake8]
max-line-length = 115
extend-ignore = [
"E203", # See https://github.com/PyCQA/pycodestyle/issues/373
"E402", # module level import not at top of file (for cansas.py)
"E501",
"F401", # imported but unused
"F405", # symbol may be undefined, or defined from star imports
"F722", # allow Annotated[typ, some_func("some string")]
"F811", # support typing.overload decorator
"W503",
"W504",
]
[tool.isort]
force_single_line = true
# multi_line_output = 1
line_length = 88
include_trailing_comma = true
[tool.pytest.ini_options]
# https://docs.pytest.org/en/stable/customize.html
addopts = ["--import-mode=importlib", "-x"]
junit_family = "xunit1"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
# Exclude a variety of commonly ignored directories.
exclude = [
".eggs",
".git",
".git-rewrite",
".mypy_cache",
".pytype",
".ruff_cache",
".tox",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
".venv",
"docs",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.11
target-version = "py311"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
# "UP",
# flake8-bugbear
"B",
# flake8-simplify
# "SIM",
# isort
"I",
# Warning
"W",
# pydocstyle
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
# ruff
# "RUF"
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = [
"F405", # symbol may be undefined, or defined from star imports
]
[tool.ruff.lint.isort]
force-single-line = true # Enforces single-line imports
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.setuptools]
package-dir = {"instrument" = "src/instrument"}
[tool.setuptools.package-data]
"*" = ["*.yml"]
[tool.setuptools_scm]
write_to = "src/instrument/_version.py"