-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (128 loc) · 3.48 KB
/
pyproject.toml
File metadata and controls
145 lines (128 loc) · 3.48 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
[build-system]
requires = [
"scikit-build-core >=0.4.3",
"nanobind >=1.3.2",
]
build-backend = "scikit_build_core.build"
[project]
name = "coconext"
dependencies = [
"cocotb@https://github.com/cocotb/cocotb.git",
'exceptiongroup; python_version < "3.11"',
]
requires-python = ">=3.9,<3.15"
authors = [
{name="Kaleb Barrett", email="dev.ktbarrett@gmail.com"},
]
maintainers = [
{name="Kaleb Barrett", email="dev.ktbarrett@gmail.com"},
]
description = "Features for future versions of cocotb"
readme = "README.md"
license = "BSD-3-Clause"
license-files = [
"LICENSE",
]
dynamic = ["version"]
[project.urls]
Repository = "https://github.com/ktbarrett/coconext.git"
"Bug Tracker" = "https://github.com/ktbarrett/coconext/issues"
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "python/coconext/__init__.py"
[project.scripts]
coconext-config = "coconext_tools.config:main"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"RUF", # ruff
"TC", # flake8-typechecking
]
ignore = [
"E501", # line too long
"E741", # ambiguous variable name
]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = [
"coconext",
"coconext_tools",
]
[tool.ruff.format]
docstring-code-format = true
[tool.mypy]
files = [
"python/",
"tests/python/",
]
mypy_path = "python/"
disallow_untyped_defs = true
disallow_any_unimported = true
no_implicit_optional = true
check_untyped_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
implicit_reexport = false
show_error_codes = true
# nanobind generates __eq__ overloads only for types it emits.
# However Python expects __eq__ to be defined for all objects, i.e.
# __eq__(self, other: object, /) -> bool: ...
# This breaks Liskov substitution so we have to turn off checking here.
[[tool.mypy.overrides]]
module = "_coconext"
disable_error_code = ["override"]
[dependency-groups]
dev = [
"mypy",
"prek",
{include-group = "dev_tests"}
]
dev_tests = [
"ruff",
"nanobind",
"cmake>=3.20",
"scikit-build-core",
"setuptools",
"coverage[toml]>=7.2", # Require 7.2+ for builtin coverage excludes and "exclude_also"
"pytest-cov",
"pytest",
"gcovr>=8.4,!=8.5", # 8.4 introduced block exclusions, 8.5 was broken
]
docs = [
"sphinx>=8.2", # Require 8.2+ for :deco: directive
"sphinx-autodoc-typehints",
"sphinx-rtd-theme",
"sphinxcontrib-prettyspecialmethods@https://github.com/sphinx-contrib/prettyspecialmethods.git",
]
[tool.uv.dependency-groups]
docs = {requires-python = ">=3.11"}
[tool.coverage.report]
exclude_also = [
"@(abc\\.)?abstractmethod",
"@(typing\\.)?overload",
]
[tool.scikit-build]
build-dir = "build"
cmake.version = ">=3.20"
[tool.scikit-build.cmake.define]
CMAKE_EXPORT_COMPILE_COMMANDS = true
[tool.codespell]
ignore-words-list = "sting"
[tool.cibuildwheel]
build = "cp*-manylinux_x86_64 cp*-macosx_x86_64 cp*-macosx_arm64"
manylinux-x86_64-image = "manylinux_2_28"
environment = {CFLAGS = "-O2 -g -flto", CPPFLAGS = "-O2 -g -flto", LDFLAGS = "-O2 -g -flto"}
build-frontend = "build[uv]"
# Tests run in a separate matrix job, not by cibuildwheel: the cocotb tests
# need an HDL simulator that isn't in the manylinux container.
test-skip = "*"
[tool.pytest]
testpaths = [
"tests/python",
]