forked from mindspore-ai/mindquantum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
151 lines (118 loc) · 3.9 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
[build-system]
requires = ['setuptools>=45', 'wheel', 'pybind11>=2.6.2', 'wheel-filename>1.2']
build-backend = 'backend'
backend-path = ['_build']
# ==============================================================================
[tool.black]
line-length = 120
target-version = ['py36','py37','py38', 'py39']
skip-string-normalization = true
[tool.coverage]
[tool.coverage.run]
omit = [
'*_test.py',
'*_fixtures.py'
]
[tool.pylint]
[tool.pylint.master]
ignore-patterns = [
'.*_test.py',
'.*_fixtures.py',
]
extension-pkg-whitelist = [
'mindquantum.mqbackend',
'mindquantum.experimental._mindquantum_cxx',
]
extension-pkg-allow-list = [
'mindquantum.mqbackend',
'mindquantum.experimental._mindquantum_cxx',
]
init-hook = '''from pylint.config import find_default_config_files;\
import os, sys; \
sys.path.append(os.path.dirname(list(find_default_config_files())[0]))'''
[tool.pylint.basic]
good-names = ['ax', 'fd', 'i', 'j', 'k', 'l', 'n', 'N', 'q0', 'q1', 'q2', 'u', 'u1', 'u2', 'u3', 'v',
'x', 'x1', 'x2', 'y', 'y1', 'y2', 'z', 'z1', 'z2',
'n_layers', 'n_qubits', 'pr']
[tool.pylint.typecheck]
ignored-modules = [
'mindquantum.experimental._mindquantum_cxx',
'mindquantum.experimental.circuit',
'mindquantum.experimental.simulator',
'mindquantum.mqbackend',
'mindspore',
'openfermion',
'openfermionpyscf',
'paddle',
'paddle_quantum',
'rich',
'sklearn',
'tensorflow',
'tensorflow_quantum',
]
[tool.pylint.format]
max-line-length = 120
[tool.pylint.messages_control]
enable = [
'useless-suppression',
]
disable = [
'no-name-in-module', # due to dynamic importing of symbols
'duplicate-code',
'fixme',
]
[tool.pytest.ini_options]
minversion = '6.0'
testpaths = ['tests']
addopts = "--ignore='tests/quick_test.py'"
norecursedirs = ['third_party', 'mindquantum/ccsrc']
mock_use_standalone_module = true
markers = [
'symengine: test using the mindquantum.symengine module',
'cxx_exp_projectq: tests involving the ProjectQ simulator',
]
filterwarnings = [
'ignore:.*Please use `OptimizeResult`.*is deprecated:DeprecationWarning',
'ignore:.*`np.str` is a deprecated alias for the builtin `str`.*:DeprecationWarning',
'ignore:.*MindSpore not installed.*:UserWarning',
]
[tool.doc8]
verbose = 0
max_line_length = 120
ignore-path-errors = [
"docs/api_python/mindquantum.algorithm.nisq.uccsd_singlet_get_packed_amplitudes.rst;D001",
"docs/api_python/mindquantum.algorithm.nisq.quccsd_generator.rst;D001",
"docs/api_python/mindquantum.algorithm.nisq.uccsd0_singlet_generator.rst;D001"
]
[tool.isort]
profile = "black"
# [tool.setuptools_scm]
# write_to = 'VERSION.txt'
# write_to_template = '{version}'
# parentdir_prefix_version = 'mindquantum-'
# local_scheme = 'no-local-version'
# fallback_version = 'v1.0.0'
[tool.yapf]
column_limit = 120
[tool.cibuildwheel]
archs = ['auto64']
build-frontend = 'build'
build-verbosity = 1
skip = 'pp* *-musllinux*'
environment = { MQ_CI_BUILD='1', OMP_NUM_THREADS='1' }
before-test = [
'cd {package}',
'python setup.py gen_reqfile',
'python -m pip install -r requirements.txt --prefer-binary',
]
test-command = 'python {package}/tests/quick_test.py'
# Normal options, etc.
manylinux-x86_64-image = 'manylinux2014'
[[tool.cibuildwheel.overrides]]
select = 'cp3{6,7,8,9}-*'
manylinux-x86_64-image = 'manylinux2010'
[tool.cibuildwheel.linux]
# MQ_CIBW_BUILD_ARGS is a comma-separated list of arguments to pass onto `python3 -m build` when running within
# cibuildwheel (e.g. MQ_CIBW_BUILD_ARGS='--set,ENABLE_GITEE')
environment-pass = ['MQ_CIBW_BUILD_ARGS']
# repair-wheel-command = "auditwheel -v repair -w {dest_dir} {wheel}"