|
- [build-system]
- requires = ['setuptools>=45', 'wheel', 'pybind11>=2.6.2', 'setuptools_scm[toml]>=6', '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 = [
- ]
- extension-pkg-allow-list = [
- ]
-
- 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 = []
-
- [tool.pylint.format]
- max-line-length = 120
-
- [tool.pylint.messages_control]
- disable = [
- 'no-name-in-module', # due to dynamic importing of symbols
- '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}"
|