/
pyproject.toml
159 lines (141 loc) · 3.08 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "povm_toolbox"
version = "0.0.0"
readme = "README.md"
license = {file = "LICENSE.txt"}
requires-python = ">=3.9"
dependencies = [
"numpy>=1.23",
"numba>=0.59",
"qiskit>=1.0",
"qiskit-ibm-runtime>=0.22",
"qiskit-aer>=0.13",
"matplotlib",
]
[project.optional-dependencies]
dev = [
"povm_toolbox[test,nbtest,lint,docs,notebook-dependencies]",
]
basetest = [
"tox>=4.0",
"pytest>=8.0",
"pytest-cov>=5.0",
]
test = [
"povm_toolbox[basetest]",
]
nbtest = [
"povm_toolbox[basetest]",
"nbmake>=1.5.0",
]
style = [
"ruff>=0.4.0",
"nbqa>=1.8.5",
"typos>=1.20.0",
]
lint = [
"povm_toolbox[style]",
"pydocstyle>=6.3.0",
"mypy>=1.10.0",
"pylint>=3.1.0",
"toml",
]
notebook-dependencies = [
"povm_toolbox",
"pylatexenc",
]
docs = [
"qiskit-sphinx-theme~=1.16",
"jupyter-sphinx",
"sphinx-design",
"sphinx-autodoc-typehints",
"sphinx-copybutton",
"nbsphinx",
]
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
fail_under = 70
show_missing = true
[tool.hatch.build.targets.wheel]
only-include = [
"povm_toolbox",
]
[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",
"signature-differs",
]
[tool.pytest.ini_options]
filterwarnings = ["ignore:::.*qiskit.opflow*"]
testpaths = ["./povm_toolbox/", "./test/"]
[tool.ruff]
line-length = 100
src = ["povm_toolbox", "test"]
extend-include = ["*.ipynb"]
target-version = "py39"
[tool.ruff.lint]
select = [
"I", # isort
"E", # pycodestyle
"W", # pycodestyle
"F", # pyflakes
"PL", # pylint
"RUF", # ruff
"UP", # pyupgrade
"SIM", # flake8-simplify
"B", # flake8-bugbear
"A", # flake8-builtins
]
ignore = [
"E501",
"PLR2004",
]
explicit-preview-rules = true
[tool.ruff.lint.pylint]
max-args = 7
[tool.ruff.lint.extend-per-file-ignores]
"docs/**/*" = [
"E402", # module level import not at top of file
]
[tool.ruff.lint.flake8-copyright]
notice-rgx = """
# \\(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.typos.default.extend-words]
arange = "arange"
aer = "aer"
IY = "IY"
ket = "ket"