-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
145 lines (123 loc) · 3.6 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
[tool.poetry]
name = "qm-qua"
version = "0.0.0"
description = "QUA language SDK to control a Quantum Computer"
readme = "README.md"
authors = ["Quantum Machines <[email protected]>"]
license = "BSD-3-Clause"
packages = [
{ include = "qm" },
{ include = "qm/py.typed" }
]
include = [
"CHANGELOG.md",
"LICENSE",
"qm/io/**/*",
"qm/grpc/**/*.py",
]
[tool.poetry.dependencies]
python = ">=3.8, <3.13"
grpcio = [
{version = "^1.39.0", python = ">=3.8,<3.11"},
{version = "^1.57", python = ">=3.11"}
]
protobuf = ">=3.17.3, <5"
betterproto = "2.0.0b7"
marshmallow = "^3.20.1"
marshmallow-polyfield = "^5.7"
numpy = [
{version = ">=1.17.0, <2", python = ">=3.8,<3.12"},
{version = ">=1.26.0, <2", python = ">=3.12"}
]
tinydb = "^4.6.1"
certifi = { version = "*", optional = true }
datadog-api-client = "^2.6.0"
deprecation = "^2.1.0"
dependency_injector = "^4.41.0"
qm-octave = "2.1.3"
typing-extensions = "^4.5"
grpclib = { version = "^0.4.5", python = ">=3.10", allow-prereleases = true }
plotly = "^5.13.0"
httpx = { version = ">=0.23.3,<1", extras = ["http2"] }
[tool.poetry.dev-dependencies]
grpcio-tools = [
{version = "^1.39.0", python = ">=3.8,<3.11"},
{version = "^1.57", python = ">=3.11"}
]
coverage = "^7.0.1"
pytest-asyncio = "^0.20.3"
pytest-benchmark = { extras = ["aspect"], version = "^4.0.0" }
black = "^22.6.0"
flake8 = "^3.9.2"
pytest = "^7.0.0"
pytest-cov = "^4.0.0"
flake8-bugbear = "^21.11.29"
poethepoet = "^0.16.0"
pytest-order = "^1.0.0"
apispec = "^5.1.1"
poetry-dynamic-versioning = { extras = ["plugin"], version = "^0.21.2" }
mypy = "^1.1.1"
isort = "^5.11.5"
tox = "^4.0.0"
[tool.poetry.extras]
simulation = ["certifi"]
[tool.black]
line-length = 120
target-version = ["py38"]
extend-exclude = '''
/(
| qm/grpc/.*
| qm/io/.*
)/
'''
[tool.isort]
profile = "black"
line_length = 120
length_sort = true
skip_gitignore = true
force_sort_within_sections = true
extra_standard_library = ["typing_extensions"]
[tool.poe.tasks]
clean-grpc.sequence = [
{ "script" = "shutil:rmtree('qm/grpc', ignore_errors=True)" },
{ "script" = "shutil:rmtree('qm/pb', ignore_errors=True)" },
{ "script" = "shutil:rmtree('qm/io', ignore_errors=True)" }
]
move-generated-grpc.sequence = [
{ "script" = "shutil:move('io', 'qm/io')" },
{ "script" = "os:remove('__init__.py')" }
]
create-grpc = "poetry run python -m grpc_tools.protoc -Iproto --python_betterproto_out=. proto/qm/pb/**/*.proto io/qualang/api/v1/info_service.proto proto/qm/grpc/v2/*.proto"
generate-grpc.sequence = [
"clean-grpc",
"create-grpc",
"move-generated-grpc",
]
check-grpc-breaking-changes = "buf breaking --against '.git#branch=main'"
format-black = "poetry run black qm"
format-isort = "poetry run isort qm"
format.sequence = ["format-black", "format-isort"]
format.ignore_fail = true
lint-black = "black qm --check"
lint-flake8 = "flake8 qm"
lint-mypy = "mypy qm"
lint.sequence = ["lint-black", "lint-flake8", "lint-mypy"]
lint.ignore_fail = true
test = "pytest tests"
check.sequence = ["lint", "test"]
check.ignore_fail = true
pre-commit-hook.sequence = ["format", "lint"]
pre-commit-hook.ignore_fail = true
[tool.coverage.report]
skip_empty = true
[tool.coverage.run]
branch = true
[tool.poetry-dynamic-versioning]
enable = true
format-jinja = "{{ env['BASE_VERSION'] | default(base) }}{{ env['VERSION_SUFFIX'] | default('') }}"
[tool.poetry-dynamic-versioning.substitution]
files = ["qm/version.py"]
patterns = ["(^__version__\\s*(?::.*?)?=\\s*['\"])[^'\"]*(['\"])"]
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"