forked from microsoft/Qcodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
366 lines (330 loc) · 11.6 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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
[build-system]
requires = [
"setuptools >= 68.1.0",
"versioningit >= 2.2.1",
]
build-backend = 'setuptools.build_meta'
[project]
name = "qcodes"
maintainers = [{name = "QCoDeS Core Developers", email = "[email protected]"}]
description = "Python-based data acquisition framework developed by the Copenhagen / Delft / Sydney / Microsoft quantum computing consortium"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
license = {text = "MIT"}
requires-python = ">=3.10"
dependencies = [
"broadbean>=0.11.0",
"h5netcdf>=0.14.1",
"h5py>=3.6.0",
"ipywidgets>=8.0.0,<9.0.0",
"ipykernel>=6.6.0", # implicitly required by ipywidgets >=8.0.5
"jsonschema>=4.9.0",
"matplotlib>=3.5.0",
"numpy>=1.22.4",
"packaging>=20.0",
"pandas>=1.4.0",
"pyarrow>=11.0.0", # will become a requirement of pandas. Installing explicitly silences a warning
"pyvisa>=1.11.0, <1.15.0",
"ruamel.yaml>=0.16.0,!=0.16.6",
"tabulate>=0.9.0",
"typing_extensions>=4.6.0",
"tqdm>=4.59.0",
"uncertainties>=3.1.4",
"versioningit>=2.2.1",
"websockets>=11.0",
"wrapt>=1.14.0; python_version < '3.12'",
"wrapt>=1.16.0; python_version >= '3.12'",
"xarray>=2022.06.0",
"cf_xarray>=0.8.4",
"opentelemetry-api>=1.15.0",
"dask>=2022.1.0", # we are making use of xarray features that requires dask implicitly
# transitive dependencies. We list these explicitly to",
# ensure that we always use versions that do not have",
# known security vulnerabilities",
"tornado>=6.3.3",
"ipython>=8.10.0",
"pillow>=9.0.0",
]
dynamic = ["version"]
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
[project.urls]
Homepage = "https://github.com/QCoDeS/Qcodes"
Documentation = "https://microsoft.github.io/Qcodes/"
Source = "https://github.com/qcodes/qcodes"
Tracker = "https://github.com/QCoDeS/Qcodes/issues"
Changelog = "https://microsoft.github.io/Qcodes/changes/index.html"
[project.optional-dependencies]
zurichinstruments = ["zhinst-qcodes>=0.3"]
loop = ["qcodes_loop>=0.1.2"]
test = [
"coverage[toml]>=6.0.0",
"deepdiff>=5.0.2",
"hypothesis>=6.85.0",
"lxml>=4.8.0",
"lxml-stubs>=0.4.0",
"mypy>=0.971",
"pandas-stubs>=1.2.0.1",
"pytest>=7.2.0",
"pytest-asyncio>=0.19.0",
"pytest-cov>=3.0.0",
"pytest-mock>=3.0.0",
"pytest-rerunfailures>=10.0",
"pytest-xdist>=2.5.0",
"PyVisa-sim>=0.6.0",
"sphinx>=4.5.0", # sphinx extension tests
"types-jsonschema>=4.16.0",
"types_requests>=0.1.8",
"types-setuptools>=57.0.0",
"types-tabulate>=0.1.0",
"types-tqdm>=4.64.6",
"types_pywin32>=305.0.0.7",
"qcodes_loop>=0.1.1",
"zhinst.qcodes>=0.5", # typecheck zhinst driver alias
"libcst>=1.2.0", # refactor tests
"jinja2>=3.1.3", # transitive dependency pin due to cve in earlier version
]
docs = [
"autodocsumm>=0.2.9",
"nbsphinx>=0.8.9",
"PyVisa-sim>=0.6.0",
"sphinx>=7.3.5",
"sphinx-favicon>=1.0",
"sphinx-issues>=3.0.1",
"sphinx-jsonschema>=1.19.1",
"sphinx-rtd-theme>=1.0.0",
"sphinxcontrib-towncrier>=0.3.0a0",
"towncrier>=22.8.0",
"scipy>=1.8.0", # examples using scipy
"qcodes_loop>=0.1.1", # legacy dataset import examples
"jinja2>=3.1.3", # transitive dependency pin due to cve in earlier version
]
opencensus = [
"opencensus>=0.7.10",
"opencensus-ext-azure>=1.0.4, <2.0.0",
]
refactor = [
"libcst>=1.2.0"
]
[project.scripts]
qcodes-monitor = "qcodes.monitor.monitor:main"
qcodes-refactor = "qcodes.extensions._refactor:main"
qcodes-dynacool-server = "qcodes.instrument_drivers.QuantumDesign.DynaCoolPPMS.private.server:run_server"
[project.entry-points."qcodes.dataset.on_export"]
log_exported_ds = "qcodes.extensions:log_dataset_export_info"
[tool.coverage.run]
omit = [
"src/qcodes/__init__.py",
"*/__init__.py",
"src/qcodes/tests/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]
[tool.darker]
# done via ruff
isort = false
[tool.mypy]
strict_optional = true
show_column_numbers = true
plugins = "numpy.typing.mypy_plugin"
show_error_codes = true
enable_error_code = "ignore-without-code"
# strict confic. Eventually we would like to
# turn all of these on. These are all setings
# turned on by strict as of mypy 0.971
warn_unused_configs = true
# waiting for variadic generics so we
# can type numpy array constructors
disallow_any_generics = false
# we subclass non typed classes (from ipython / wrapt)
disallow_subclassing_any = false
# we are calling into untyped code from 3th parties
disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
# triggers warnings in untyped code
check_untyped_defs = false
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
# this triggers failures due to returning
# values from untyped 3th party libs
warn_return_any = false
no_implicit_reexport = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"tests.*",
"qcodes.tests.*",
"qcodes.instrument.mockers.ami430",
"qcodes.instrument_drivers.Harvard.*",
"qcodes.instrument_drivers.Keysight.keysightb1500.message_builder.*",
]
disallow_untyped_defs = false
disallow_incomplete_defs = false
# these are packages that we import
# but don't have installed by default
# ruamel https://github.com/python/mypy/issues/12664
[[tool.mypy.overrides]]
module = [
"clr",
"gclib",
"mcl_RF_Switch_Controller64",
"mcl_RF_Switch_Controller_NET45",
"pywinusb.*",
"ruamel",
"spyder.utils.site",
"spyder_kernels.customize",
"System.IO",
]
ignore_missing_imports = true
[tool.pyright]
include = ["src","tests"]
ignore = [
"src/qcodes/instrument_drivers/Harvard/Decadac.py",
]
reportMissingTypeStubs = true
reportDeprecated = true
stubPath = "typings/stubs"
typeCheckingMode = "standard"
[tool.pytest.ini_options]
minversion = "7.2"
junit_family = "legacy"
testpaths = "tests"
addopts = "-n auto --dist=loadfile"
markers = "serial"
# we ignore warnings
# triggered by third party packages
# and error on all other warnings
filterwarnings = [
'error',
'ignore:Deprecated call to `pkg_resources\.declare_namespace:DeprecationWarning', # google, sphinxcontrib
'ignore:pkg_resources is deprecated as an API:DeprecationWarning', # pyvisa-sim
'ignore:open_binary is deprecated:DeprecationWarning', # pyvisa-sim
'ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version:DeprecationWarning', # tqdm dateutil
'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning' # jupyter
]
[tool.ruff]
extend-include = ["*.ipynb"]
extend-exclude = ["typings"]
[tool.ruff.lint]
# Enable Pyflakes `E` and `F` codes by default.
# UP pyupgrade
# PT025 invalid use of pytest fixtures in other fixtures
# RUF200 validate pyproject.toml
# I isort
# ISC flake8-implicit-str-concat
# TID253 banned-module-level-imports
# W pydocstyle
# PLx pylint
select = ["E", "F", "PT025", "UP", "RUF010", "RUF012", "RUF200", "I", "G", "ISC", "TID253", "NPY", "PLE", "PLR", "PLC", "PLW", "W", "D417", "D416", "D410", "D411", "D412", "D405", "D214", "TCH"]
# darker will fix this as code is
# reformatted when it is changed.
# G004 We have a lot of use of f strings in log messages
# so disable that lint for now
# NPY002 We have a lot of use of the legacy
# random number generator. Eventually we should port this
# code.
# PLxxxx are pylint lints that generate a fair amount of warnings
# it may be worth fixing some or these in the future
# UP038 this can result in slower code so we ignore it
ignore = ["E501", "G004", "NPY002", "PLR2004", "PLR0913", "PLR0911", "PLR0912", "PLR0915", "PLW0602", "PLW0603", "PLW2901", "UP038"]
[tool.ruff.lint.isort]
known-first-party = ["qcodes"]
[tool.ruff.lint.per-file-ignores]
# deprecated modules left
# for backwards compatibility
"src/qcodes/utils/validators.py" = ["F401"]
"src/qcodes/utils/threading.py" = ["F401"]
"src/qcodes/utils/plotting.py" = ["F401"]
"src/qcodes/utils/metadata.py" = ["F401"]
"src/qcodes/utils/helpers.py" = ["F401"]
"src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py" = ["F401"]
"src/qcodes/instrument_drivers/tektronix/Keithley_6500.py" = ["F401"]
"src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py" = ["F401"]
"src/qcodes/instrument_drivers/tektronix/Keithley_2450.py" = ["F401"]
"src/qcodes/instrument_drivers/tektronix/keithley_7510.py" = ["F401"]
"src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"]
"src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DS4000.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DG4000.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DP832.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DP831.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DP821.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DS1074Z.py" = ["F401"]
"src/qcodes/instrument_drivers/rigol/DG1062.py" = ["F401"]
"src/qcodes/instrument_drivers/devices.py" = ["F401"]
"src/qcodes/instrument_drivers/basel/sp983c_remote.py" = ["F401"]
"src/qcodes/instrument_drivers/Lakeshore/Model_325.py" = ["F401"]
"src/qcodes/instrument_drivers/Lakeshore/Model_336.py" = ["F401"]
"src/qcodes/instrument_drivers/Lakeshore/Model_372.py" = ["F401"]
"src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py" = ["F401"]
"src/qcodes/instrument_drivers/HP/HP8133A.py" = ["F401"]
"src/qcodes/instrument_drivers/HP/HP8753D.py" = ["F401"]
"src/qcodes/instrument_drivers/Keysight/N9030B.py" = ["F401"]
"src/qcodes/instrument_drivers/Keysight/KtM960x.py" = ["F405"]
"src/qcodes/instrument_drivers/Keysight/KtMAwg.py" = ["F405"]
# This triggeres in notebooks even with a md cell at the top
"*.ipynb" = ["E402"]
# TID253 these imports are fine at module level
# in tests and examples
# D417 no need to fix in deprecated module
"docs/*" = ["TID253"]
"src/qcodes/tests/*" = ["TID253", "D417"]
"tests/*" = ["TID253"]
[tool.ruff.lint.flake8-tidy-imports]
# There modules are relatively slow to import
# and only required in specific places so
# don't import them at module level
banned-module-level-imports = ["xarray", "pandas", "opencensus", "tqdm.dask", "dask", "matplotlib", "IPython"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-type-checking]
quote-annotations = true
[tool.setuptools.cmdclass]
sdist = "versioningit.cmdclass.sdist"
build_py = "versioningit.cmdclass.build_py"
[tool.towncrier]
package = "qcodes"
name = "QCoDeS"
directory = "docs/changes/newsfragments"
single_file = false
filename = "docs/changes/{version}.rst"
issue_format = ":pr:`{issue}`"
[tool.towncrier.fragment.breaking]
name = "Breaking Changes:"
[tool.towncrier.fragment.new]
name = "New:"
[tool.towncrier.fragment.improved]
name = "Improved:"
[tool.towncrier.fragment.new_driver]
name = "New Drivers:"
[tool.towncrier.fragment.improved_driver]
name = "Improved Drivers:"
[tool.towncrier.fragment.underthehood]
name = "Under the hood:"
[tool.versioningit]
default-version = "0.0"
[tool.versioningit.format]
distance = "{next_version}.dev{distance}+{branch}.{vcs}{rev}"
dirty = "{next_version}.dev{distance}+{branch}.{vcs}{rev}.dirty"
distance-dirty = "{next_version}.dev{distance}+{branch}.{vcs}{rev}.dirty"
[tool.versioningit.vcs]
method = "git"
match = ["v*"]
[tool.versioningit.onbuild]
source-file = "src/qcodes/_version.py"
build-file = "qcodes/_version.py"