-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
183 lines (164 loc) · 4 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "qiskit-addon-utils"
version = "0.1.0"
readme = "README.md"
description = "Utilities to support workflows leveraging Qiskit addons"
license = {file = "LICENSE.txt"}
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.9"
dependencies = [
"numpy>=1.23",
"rustworkx>=0.15",
"qiskit>=1.2, <2",
]
[project.optional-dependencies]
dev = [
"qiskit-addon-utils[test,doctest,nbtest,lint,docs]",
"tox>=4.4.3",
]
basetest = [
"pytest>=8.0",
"pytest-cov>=5.0",
]
test = [
"qiskit-addon-utils[basetest]",
"qiskit-qasm3-import>=0.5.0",
]
doctest = [
"qiskit-addon-utils[basetest,notebook-dependencies]",
"pytest-doctestplus>=1.2.1",
]
nbtest = [
"qiskit-addon-utils[basetest]",
"nbmake>=1.5.0",
]
style = [
"ruff==0.8.1",
"nbqa>=1.8.5",
"typos>=1.20.0",
]
lint = [
"qiskit-addon-utils[style]",
"mypy==1.13.0",
"pylint==3.3.1",
"reno>=4.1",
]
notebook-dependencies = [
"qiskit-addon-utils",
"qiskit-ibm-runtime",
"rustworkx[graphviz]>=0.15",
"matplotlib",
"ipywidgets",
"pylatexenc",
]
docs = [
"qiskit-addon-utils[doctest]",
"qiskit-sphinx-theme~=2.0.0",
"jupyter-sphinx",
"sphinx-design",
"sphinx-autodoc-typehints",
"sphinx-copybutton",
"sphinx_reredirects",
"nbsphinx>=0.9.4",
"reno>=4.1",
]
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
fail_under = 100
show_missing = true
[tool.hatch.build.targets.wheel]
only-include = [
"qiskit_addon_utils",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.mypy]
python_version = 3.9
show_error_codes = true
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.pylint.main]
py-version = "3.9"
[tool.pylint."messages control"]
disable = ["all"]
enable = [
"reimported",
"no-self-use",
"no-else-raise",
"redefined-argument-from-local",
"redefined-builtin",
"raise-missing-from",
"cyclic-import",
"unused-argument",
"attribute-defined-outside-init",
"no-else-return",
]
[tool.pytest.ini_options]
testpaths = ["./qiskit_addon_utils/", "./test/"]
[tool.ruff]
line-length = 100
src = ["qiskit_addon_utils", "test"]
target-version = "py39"
[tool.ruff.lint]
select = [
"I", # isort
"E", # pycodestyle
"W", # pycodestyle
"D", # pydocstyle
"F", # pyflakes
"RUF", # ruff
"UP", # pyupgrade
"SIM", # flake8-simplify
"B", # flake8-bugbear
"A", # flake8-builtins
]
ignore = [
"E501", # line too long
]
[tool.ruff.lint.pylint]
max-args = 6
[tool.ruff.lint.extend-per-file-ignores]
"test/**.py" = [
"D", # pydocstyle
]
"docs/**" = [
"E402", # module level import not at top of file
"D100", # missing docstring in public module
]
[tool.ruff.lint.flake8-copyright]
notice-rgx = """
# This code is a Qiskit project.
#
# \\(C\\) Copyright IBM 2024\\.
#
# This code is licensed under the Apache License, Version 2\\.0\\. You may
# obtain a copy of this license in the LICENSE\\.txt file in the root directory
# of this source tree or at http\\:\\/\\/www\\.apache\\.org\\/licenses\\/LICENSE\\-2\\.0\\.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals\\.
"""
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.typos.default.extend-words]