-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
189 lines (173 loc) · 5.1 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
[tool.poetry]
name = "opensquirrel"
version = "0.0.5"
description = "A quantum circuit transformation and manipulation tool"
authors = [
"Quantum Inspire <[email protected]>"
]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/QuTech-Delft/OpenSquirrel"
repository = "https://github.com/QuTech-Delft/OpenSquirrel"
keywords = [
"quantum",
"circuits",
"compilation",
]
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'License :: OSI Approved :: Apache Software License'
]
packages = [
{ include = "opensquirrel" },
]
[tool.poetry.dependencies]
python = "^3.9"
numpy = [
{ version = "^1.26", python = "<3.10" },
{ version = "^2.0", python = "^3.10" },
]
libqasm = "0.6.9"
networkx = "^3.0.0"
[tool.poetry.group.dev.dependencies]
coverage = {extras = ["toml"], version = "^7.3.2"}
pytest = {extras = ["toml"], version = ">=7.4.3,<9.0.0"}
pytest-cov = ">=4.1,<7.0"
mypy = "^1.7.0"
ruff = ">=0.5,<0.7"
tox = "^4.16.0"
sympy = "^1.13.1"
IPython = ">=7.12,<9.0"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
mkdocs = {extras = ["python"], version = "^1.5.3"}
mkdocstrings = {extras = ["python"], version = ">=0.24,<0.28"}
mkdocs_gen_files = {extras = ["python"], version = "^0.5.0"}
mkdocs-material = "^9.4.12"
mkdocs-literate-nav = "^0.6.1"
pymdown-extensions = "^10.7.1"
[tool.poetry.group.examples]
optional = true
[tool.poetry.group.examples.dependencies]
jupyter = "^1.0.0"
sympy = "^1.13.1"
[tool.poetry.group.export]
optional = true
[tool.poetry.group.export.dependencies]
pyqt5-qt5=[
# This package is a transitive dependency of quantify-scheduler.
# The latest version is not portable, therefore it is necessary to pin an older version
# otherwise Poetry will try to install the latest version and fail on e.g. Windows.
{ version = "5.15.2", python = "<3.10" },
]
quantify-scheduler=[
# quantify-scheduler is not released for newer Python versions, i.e. > 3.9.
# Its is only required for exporting OpenSquirrel circuits to the
# Schedule format and testing this functionality.
{ version = "^0.18.0", python = "<3.10" },
]
[tool.pytest.ini_options]
addopts = "-v --cov --cov-report term-missing:skip-covered --cov-report xml"
[tool.coverage.run]
branch = true
omit = ["tests/*", "**/.tox/**"]
[tool.coverage.report]
show_missing = true
fail_under = 80
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:"
]
exclude_also = ["if TYPE_CHECKING:"]
[tool.ruff]
line-length = 120
target-version = "py39"
[tool.ruff.lint]
preview = true
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"COM", #flake8-commas
"C4", #flake8-comprehensions
"C90", # mccabe
#"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle (error)
"ERA", # eradicate
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"PERF", # Perflint
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"FURB", # refurb
"RET", # flake8-return
"RUF", # Ruff-specific rules
"RUF022",
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"TRY", # tryceratops
"T20", # flake8-print
"T100", # flake8-debugger
"UP", # pyupgrade
"W", # pycodestyle (warning)
"Q", # flake8-quotes
"YTT", # flake8-2020
]
ignore = [
"A005", # module shadowing a Python builtin module
"ANN101", # self should not be typed
"ANN102", # cls should not be typed
"ANN401", # typing.Any can be useful (for example in __eq__)
"COM812", # Conflicts with ruff format
"ISC001", # Possible conflicts with ruff format
"W605", # deprecated in Python 3.6
]
isort.combine-as-imports = true
pydocstyle.convention = "google"
flake8-type-checking.exempt-modules = ["typing", "typing_extensions", "numpy", "networkx", "collections"]
[tool.ruff.lint.extend-per-file-ignores]
"*.py" = [
"S101", # asserts allowed everywhere
]
"test/**/*.py" = [
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"D", # No doc requirements in tests
"SLF001", # Testing private functions is OK
]
"check_*.py" = [
"SLF001", # Checking private functions is OK
]
[tool.mypy]
ignore_missing_imports = true
strict = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"