-
Notifications
You must be signed in to change notification settings - Fork 31
/
pyproject.toml
152 lines (139 loc) · 4.18 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "qupulse"
dynamic = ["version"]
description = "A Quantum compUting PULse parametrization and SEquencing framework"
readme = "README.md"
license = "GPL-3.0-or-later"
requires-python = ">=3.10"
authors = [
{ name = "Quantum Technology Group and Chair of Software Engineering, RWTH Aachen University" },
]
keywords = [
"control",
"physics",
"pulse",
"quantum",
"qubit",
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
]
dependencies = [
"frozendict",
"lazy_loader",
"numpy",
"sympy>=1.1.1",
# This is required because there is no 3.12 compatible gmpy2 stable release as of 2024.06.20
"gmpy2;python_version<'3.12'",
"gmpy2>=2.2.0rc1;python_version>='3.12'"
]
[project.optional-dependencies]
autologging = [
"autologging",
]
default = [
"pandas",
"scipy",
"qupulse[tests,docs,plotting,autologging,faster-sampling]",
]
docs = [
"ipykernel",
"nbsphinx",
"pyvisa",
"sphinx>=4",
]
faster-sampling = [
"numba",
]
plotting = [
"matplotlib",
]
tabor-instruments = [
"tabor_control>=0.1.1",
]
tektronix = [
"tek_awg>=0.2.1",
]
tests = [
"pytest",
"pytest_benchmark",
]
zurich-instruments = [
"qupulse-hdawg",
]
[project.urls]
Homepage = "https://github.com/qutech/qupulse"
[tool.hatch.version]
path = "qupulse/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
"/qupulse",
]
[tool.hatch.envs.docs]
installer = "uv"
dependencies = [
"qupulse[default,zurich-instruments]",
"sphinx",
"nbsphinx",
"sphinx-rtd-theme"
]
[tool.hatch.envs.docs.scripts]
# This is a hack to achieve cross-platform version extraction until https://github.com/pypa/hatch/issues/1006
build = """
python -c "import subprocess, os; \
result = subprocess.run(['hatch', 'version'], capture_output=True, text=True); \
version = result.stdout.strip(); \
subprocess.run(['sphinx-build', '-b', '{args:0}', 'doc/source', 'doc/build/{args:0}', '-d', 'doc/build/.doctrees', '-D', 'version=%s' % version, '-D', 'release=%s' % version])"
"""
latex = """
python -c "import subprocess, os; \
result = subprocess.run(['hatch', 'version'], capture_output=True, text=True); \
version = result.stdout.strip(); \
subprocess.run(['sphinx-build', '-b', 'latex', 'doc/source', 'doc/build/latex', '-D', 'version=%s' % version, '-D', 'release=%s' % version])"
"""
html = """
python -c "import subprocess, os; \
result = subprocess.run(['hatch', 'version'], capture_output=True, text=True); \
version = result.stdout.strip(); \
subprocess.run(['sphinx-build', '-b', 'html', 'doc/source', 'doc/build/html', '-D', 'version=%s' % version, '-D', 'release=%s' % version])"
"""
clean= """
python -c "import shutil; shutil.rmtree('doc/build')"
"""
clean-notebooks = "jupyter nbconvert --ClearMetadataPreprocessor.enabled=True --to=notebook --execute --inplace --log-level=ERROR doc/source/examples/00*.ipynb doc/source/examples/01*.ipynb doc/source/examples/02*.ipynb doc/source/examples/03*.ipynb"
[tool.hatch.envs.changelog]
detached = true
dependencies = [
"towncrier",
]
[tool.hatch.envs.changelog.scripts]
draft = "towncrier build --version main --draft"
release = "towncrier build --yes --version {args}"
[tool.towncrier]
directory = "changes.d"
package = "qupulse"
package_dir = "./qupulse"
filename = "RELEASE_NOTES.rst"
name = "qupulse"
issue_format = "`#{issue} <https://github.com/qutech/qupulse/issues/{issue}>`_"
[tool.pytest.ini_options]
minversion = "6.0"
python_files = [
"*_tests.py",
"*_bug.py"
]
filterwarnings = [
# syntax is action:message_regex:category:module_regex:lineno
# we fail on all with a whitelist because a dependency might mess-up passing the correct stacklevel
"error::SyntaxWarning",
"error::DeprecationWarning",
# pytest uses readline which uses collections.abc
# "ignore:Using or importing the ABCs from 'collections' instead of from 'collections\.abc\' is deprecated:DeprecationWarning:.*readline.*"
]