-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
198 lines (181 loc) · 5 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "qLDPC"
version = "0.0.18"
description = "Tools for constructing and analyzing quantum low density parity check (qLDPC) codes."
license = "Apache-2.0"
authors = ["Michael A. Perlin <mika.perlin@gmail.com>"]
readme = "README.md"
repository = "https://github.com/Infleqtion/qLDPC"
keywords = [
"quantum computing",
"quantum error correction",
"low density partiy check codes",
"LDPC",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
]
include = ["qldpc/py.typed"]
[tool.poetry.dependencies]
python = "^3.10"
cvxpy = ">=1.3.2"
diskcache = ">=5.0.0"
galois = ">=0.4.2"
gurobipy = { version = ">=10.0.0", optional = true }
ldpc = "==0.1.60"
networkx = ">=2.6.2"
numpy = ">=2.0.0"
platformdirs = ">=4.0.0"
pymatching = ">=2.1.0"
stim = ">=1.14.0"
sympy = ">=1.12"
checks-superstaq = { version = ">=0.5.31", optional = true }
[tool.poetry.extras]
dev = ["checks-superstaq"]
# Check script configuration:
[tool.pytest.ini_options]
addopts = "--disable-socket"
filterwarnings = [
"ignore::UserWarning:qtrl.*",
"ignore::PendingDeprecationWarning:qtrl.utils.config",
"ignore::PendingDeprecationWarning:ruamel.yaml.main",
]
[tool.ruff]
line-length = 100
lint.extend-select = ["I"]
[tool.black]
color = true
line_length = 100
[tool.isort]
profile = "black"
line_length = 100
color_output = true
known_first_party = "qldpc" # REPO-SPECIFIC CONFIG
[tool.flake8]
max-line-length = 100
max-complexity = 10
show_source = true
statistics = true
count = true
enable-extensions = ["TC", "TC1"]
extend-ignore = [
"E203",
"I100",
"I101",
"I201",
"I202",
] # these errors conflict with black and/or isort
type_checking_exempt_modules = ["collections.abc"]
# Configuration for flake8-modern-annotations
modern-annotations-postponed = "always"
modern-annotations-deprecated = "always"
modern-annotations-union = "always"
modern-annotations-optional = "always"
[tool.mypy]
pretty = true
ignore_missing_imports = true
show_error_codes = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = true
install_types = true
non_interactive = true
no_implicit_optional = true
plugins = ["numpy.typing.mypy_plugin", "pydantic.mypy"]
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:", "@overload"]
[tool.coverage.run]
include = ["./*"]
[tool.pylint.main]
max-line-length = 100
disable = "all"
load-plugins = [
"pylint.extensions.docparams",
"pylint.extensions.docstyle",
"checks_superstaq.pylint_init_return",
"checks_superstaq.pylint_import_annotations",
]
output-format = "colorized"
score = false
reports = false
enable = [
"anomalous-backslash-in-string",
"assert-on-tuple",
"bad-indentation",
"bad-option-value",
"bad-reversed-sequence",
"bad-super-call",
"consider-merging-isinstance",
"continue-in-finally",
"dangerous-default-value",
"docstyle",
"duplicate-argument-name",
"expression-not-assigned",
"function-redefined",
"import-future-annotations",
"inconsistent-mro",
"init-return-check",
"init-is-generator",
"line-too-long",
"lost-exception",
"missing-class-docstring",
"missing-function-docstring",
"missing-kwoa",
"mixed-line-endings",
"not-callable",
"no-value-for-parameter",
"nonexistent-operator",
"not-in-loop",
"parameter_documentation",
"pointless-statement",
"redefined-builtin",
"relative-beyond-top-level",
"return-arg-in-generator",
"return-in-init",
"return-outside-function",
"simplifiable-if-statement",
"syntax-error",
"too-many-function-args",
"trailing-whitespace",
"undefined-variable",
"unexpected-keyword-arg",
"unhashable-dict-key",
"unnecessary-pass",
"unreachable",
"unrecognized-inline-option",
"unused-argument",
"unused-import",
"unnecessary-semicolon",
"unused-variable",
"unused-wildcard-import",
"wildcard-import",
"wrong-import-order",
"wrong-import-position",
"yield-outside-function",
]
# Enable the optional checks by parameter_documentation
[tool.pylint.parameter_documentation]
accept-no-param-doc=false # Do not accept totally missing parameter documentation.
accept-no-raise-doc=false # Do not accept totally missing raises documentation.
accept-no-return-doc=false # Do not accept totally missing return documentation.
accept-no-yields-doc=false # Do not accept missing yields annotations.
default-docstring-type = "google"
# Ignore long lines containing urls or pylint directives.
[tool.pylint.format]
ignore-long-lines = '^(.*#\w*pylint: disable.*|\s*(# )?<?https?://\S+>?)$'
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
[tool.pylint.typecheck]
generated-members = "numpy.*"