forked from tqec/tqec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
192 lines (161 loc) · 6.62 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "tqec"
version = "0.0.1"
authors = [
{ name = "TQEC community", email = "[email protected]" },
]
description = "A design automation framework for Topological Quantum Error Correction."
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["topological quantum error correction", "qec"]
requires-python = ">= 3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: JavaScript",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: User Interfaces",
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic = ["dependencies"]
[project.urls]
Website = "https://tqec.app"
Documentation = "https://tqec.github.io/tqec/"
Repository = "https://github.com/tqec/tqec"
Issues = "https://github.com/tqec/tqec/issues"
[project.optional-dependencies]
test = ["pytest", "mypy", "pytest-cov", "types-networkx", "scipy-stubs"]
dev = [
"pymatching",
"jupyterlab",
"tqec[test, doc, bench]",
"pre-commit",
]
doc = ["sphinx", "myst-parser", "pydata-sphinx-theme", "nbsphinx", "pandoc", "sphinxcontrib-mermaid", "docformatter", "sphinx-autobuild", "sphinx-copybutton"]
bench = ["pyinstrument"]
all = ["tqec[test, dev, doc, bench]"]
[project.scripts]
tqec = "tqec._cli.tqec:main"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["*test.py"]
[tool.setuptools.package-data]
tqec = ["py.typed"]
[tool.setuptools.dynamic]
dependencies = { file = "requirements.txt" }
[tool.mypy]
# See https://numpy.org/devdocs/reference/typing.html
plugins = "numpy.typing.mypy_plugin"
# Start off with these
warn_unused_configs = true
warn_redundant_casts = true
# Explicitly disable that for the moment, will eventually be turned on again.
warn_unused_ignores = false
warn_unreachable = true
# Getting these passing should be easy
strict_equality = true
extra_checks = true
# Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
# These shouldn't be too much additional work, but may be tricky to
# get passing if you use a lot of untyped libraries
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
# These next few are various gradations of forcing use of type annotations
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
# This one isn't too hard to get passing, but return on investment is lower
# Disabled due to issues with cirq not reexporting explicitly.
no_implicit_reexport = true
# This one can be tricky to get passing if you use a lot of untyped libraries
warn_return_any = true
# See https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml
[[tool.mypy.overrides]]
module = [
"stim",
"sinter",
"pysat",
"pysat.solvers",
"collada",
"collada.source",
"mpl_toolkits.mplot3d.axes3d",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "pyzx"
no_implicit_reexport = false
[[tool.mypy.overrides]]
module = "tqec.interop.pyzx.*"
disallow_untyped_calls = false
[tool.coverage.run]
omit = ["*/*_test.py"]
[tool.coverage.report]
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
[tool.pyright]
# Paths of directories or files that should be considered part of the project.
# If no paths are specified, pyright defaults to the directory that contains the
# config file. Paths may contain wildcard characters ** (a directory or multiple
# levels of directories), * (a sequence of zero or more characters), or ? (a
# single character). If no include paths are specified, the root path for the
# workspace is assumed.
include = ["src"]
# Paths of directories or files that should not be considered part of the project.
# These override the directories and files that include matched, allowing specific
# subdirectories to be excluded. Note that files in the exclude paths may still be
# included in the analysis if they are referenced (imported) by source files that
# are not excluded. Paths may contain wildcard characters ** (a directory or
# multiple levels of directories), * (a sequence of zero or more characters), or ?
# (a single character). If no exclude paths are specified, Pyright automatically
# excludes the following: **/node_modules, **/__pycache__, **/.*. Pylance also
# excludes any virtual environment directories regardless of the exclude paths
# specified. For more detail on Python environment specification and discovery,
# refer to the import resolution documentation.
exclude = ["/usr/**/*.py", "**/stdlib/**/*.py"]
# Specifies the version of Python that will be used to execute the source code.
# The version should be specified as a string in the format "M.m" where M is the
# major version and m is the minor (e.g. "3.0" or "3.6"). If a version is provided,
# pyright will generate errors if the source code makes use of language features
# that are not supported in that version. It will also tailor its use of type stub
# files, which conditionalizes type definitions based on the version. If no version
# is specified, pyright will use the version of the current python interpreter, if
# one is present.
pythonVersion = "3.10"
# Specifies the default rule set to use. Some rules can be overridden using
# additional configuration flags documented below. The default value for this
# setting is "standard". If set to "off", all type-checking rules are disabled, but
# Python syntax and semantic errors are still reported.
typeCheckingMode = "standard"
# Generate or suppress diagnostics for use of a symbol from a "py.typed" module
# that is not meant to be exported from that module. The default value for this
# setting is "error".
reportPrivateImportUsage = false