forked from apytypes/apytypes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (133 loc) · 4.95 KB
/
pyproject.toml
File metadata and controls
153 lines (133 loc) · 4.95 KB
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
152
153
[project]
name = "apytypes"
dynamic = ['version']
authors = [
{ name = "Oscar Gustafsson", email = "oscar.gustafsson@gmail.com" },
{ name = "Mikael Henriksson", email = "mikael.henriksson@liu.se" },
{ name = "Theodor Lindberg", email = "theodor.lindberg@liu.se" },
]
description = "Python package for custom fixed-point and floating-point formats"
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
keywords = ["fixed-point", "floating-point", "finite word length"]
[project.urls]
Repository = "https://github.com/apytypes/apytypes/"
Issues = "https://github.com/apytypes/apytypes/issues"
Homepage = "https://apytypes.github.io/"
Documentation = "https://apytypes.github.io/apytypes/"
Changelog = "https://github.com/apytypes/apytypes/blob/main/CHANGELOG.md"
[project.optional-dependencies]
docs = [
"breathe>=4.35",
"furo>=2024",
"matplotlib>=3.7",
"numpydoc>=1.7",
"setuptools<70", # Pin to get around limitation in m2r2
"sphinx>=7",
"sphinx_copybutton>=0.5",
"sphinx_gallery>=0.16",
"m2r2",
"docutils<=0.20", # Pin to get around limitation in m2r2
]
test = ["numpy>=1.25", "pytest>=8.2"]
dev = ["nanobind>=2.0.0"]
benchmark = ["numpy>=1.25", "pytest>=8.2", "pytest-benchmark"]
comparison = [
"fpbinary",
"fixedpoint",
"fxpmath",
"spfpm",
"numfi",
"numpy>=1.25",
"matplotlib>=3.7",
]
[build-system]
build-backend = 'mesonpy'
requires = ['meson-python>=0.16', 'setuptools_scm>=8.1']
[tool.meson-python.args]
install = ['--skip-subprojects']
[tool.setuptools_scm]
version_scheme = "release-branch-semver"
local_scheme = "node-and-date"
parentdir_prefix_version = "apytypes-"
fallback_version = "0.0+UNKNOWN"
[tool.pytest.ini_options]
markers = [
"float_neg : custom marker for grouping tests for floating-point negation",
"float_add : custom marker for grouping tests for floating-point addition",
"float_sub : custom marker for grouping tests for floating-point subtraction",
"float_mul : custom marker for grouping tests for floating-point multiplication",
"float_div : custom marker for grouping tests for floating-point division",
"float_pow : custom marker for grouping tests for floating-point power function",
"float_comp : custom marker for grouping tests for floating-point comparisons",
"float_special : custom marker for grouping tests for floating-point special values",
"float_array : custom marker for grouping tests for floating-point arrays",
"slow : custom marker for grouping long running tests",
]
[tool.typos]
files.extend-exclude = ["extern", "docs/Doxyfile"]
default.extend-words = { NDArray = "NDArray" }
default.extend-identifiers = { NDArray = "NDArray" }
[tool.cibuildwheel]
skip = [
"pp*", # APyTypes currently can not be build for PyPy ...
"*-win32", # ... nor can it be build for 32-bit Windows systems
]
[tool.cibuildwheel.macos.environment]
# MacOS 10.14 is the first MacOS release with full support for C++17
MACOSX_DEPLOYMENT_TARGET = "10.14"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".git",
".vscode",
"_build",
"build",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.9
target-version = "py39"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = ["F822", # Should not be ignored, but as nanobind stubgen does not include __version__...
"E712"] # Test should be rewritten to not compare with False/True
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"