-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpyproject.toml
144 lines (132 loc) · 3.39 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
[tool.poetry]
name = "oqpy"
version = "0.3.7"
description = "Generating OpenQASM 3 + OpenPulse in Python"
authors = ["OQpy Contributors <[email protected]>"]
license = "Apache-2.0"
include = ["CITATION.cff", "NOTICE"]
readme = "README.md"
repository = "https://github.com/openqasm/oqpy"
keywords = ["openqasm", "quantum"]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering"
]
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
# 0.4 loosens the antlr4-python3-runtime constraints
openpulse = ">=0.5.0"
numpy = [
{version = ">=1.17.3", python = ">=3.8,<3.9"},
{version = ">=1.19.3", python = ">=3.9,<3.10"},
{version = ">=1.21.6", python = ">=3.10,<3.11"},
{version = ">=1.22.0", python = ">=3.11"}
]
# 0.2 contains VarArg
mypy-extensions = ">=0.2.0"
[tool.poetry.group.dev.dependencies]
pytest = "^7.2"
# 22.8.0 adds py311 support
black = "^24.3.0"
pylint = [
{version = ">=2.14", python = ">=3.8,<3.11"},
{version = ">=2.15", python = ">=3.11"}
]
mypy = "^1.0.0"
twine = "^4.0.1"
pytest-benchmark = "^4.0.0"
pytest-cov = "^4.0.0"
isort = "^5.10.1"
pydocstyle = "^6.1.1"
toml = "^0.10.2"
sphinx = "^5.3.0"
sphinx-rtd-theme = "^1.0.0"
myst-parser = "^0.18.1"
openqasm-pygments = "^0.1.1"
cffconvert = "^2.0.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
target-version = ["py311"]
[tool.pylint.reports]
score = ["no"]
reports = ["no"]
[tool.pylint.format]
max-line-length = 100
[tool.pylint.messages_control]
output-format = "colorized"
# something inspired by VSCode's defaults but with a few more thrown in
disable = ["all"]
enable = [
"E", # all errors
"F", # all fatal
"anomalous-backslash-in-string",
"assert-on-tuple",
"bad-format-string",
"bad-indentation",
"bad-open-mode",
"binary-op-exception",
"consider-merging-isinstance",
"dangerous-default-value",
"duplicate-key",
"expression-not-assigned",
"global-variable-not-assigned",
"lost-exception",
"mixed-line-endings",
"pointless-statement",
"redefined-builtin",
"simplifiable-if-statement",
"trailing-whitespace",
"unnecessary-pass",
"unreachable",
"unused-import",
"unnecessary-semicolon",
"unused-variable",
"wrong-import-order",
"wrong-import-position",
]
[tool.mypy]
exclude = ["tests"]
ignore_missing_imports = true
show_error_codes = true
warn_unreachable = true
# --strict flags
warn_unused_configs = true
# disable because of Model subclassing
# disallow_subclassing_any = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
# disable because overly pedantic
# warn_return_any = true
# disable because of API exporting
# no_implicit_reexport = true
strict_equality = true
[tool.coverage.run]
source = ["oqpy"]
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
"# pragma: no cover",
"@abstractmethod",
]
show_missing = true
[tool.isort]
profile = "black"
skip = ["__init__.py"]
[tool.pydocstyle]
convention = "google"
add_ignore = [
"D104", # package docstrings
"D107", # __init__() docstrings
"D105", # magic method docstrings
]