| 1 |
[build-system] |
| 2 |
requires = ["setuptools", "wheel"] |
| 3 |
build-backend = "setuptools.build_meta" |
| 4 |
|
| 5 |
[tool.towncrier] |
| 6 |
package = "cocotb" |
| 7 |
directory = "docs/source/newsfragments" |
| 8 |
filename = "docs/source/release_notes.rst" |
| 9 |
issue_format = ":pr:`{issue}`" |
| 10 |
|
| 11 |
|
| 12 |
underlines = ["=", "-"] |
| 13 |
all_bullets = false |
| 14 |
|
| 15 |
[[tool.towncrier.type]] |
| 16 |
directory = "feature" |
| 17 |
name = "Features" |
| 18 |
showcontent = true |
| 19 |
|
| 20 |
[[tool.towncrier.type]] |
| 21 |
directory = "bugfix" |
| 22 |
name = "Bugfixes" |
| 23 |
showcontent = true |
| 24 |
|
| 25 |
[[tool.towncrier.type]] |
| 26 |
directory = "doc" |
| 27 |
name = "Improved Documentation" |
| 28 |
showcontent = true |
| 29 |
|
| 30 |
[[tool.towncrier.type]] |
| 31 |
directory = "removal" |
| 32 |
name = "Deprecations and Removals" |
| 33 |
showcontent = true |
| 34 |
|
| 35 |
[[tool.towncrier.type]] |
| 36 |
directory = "change" |
| 37 |
name = "Changes" |
| 38 |
showcontent = true |
| 39 |
|
| 40 |
[tool.ruff] |
| 41 |
extend-exclude = [ |
| 42 |
"docs/source/conf.py", |
| 43 |
"makefiles", |
| 44 |
"venv", |
| 45 |
"_vendor", |
| 46 |
".nox/", |
| 47 |
] |
| 48 |
target-version = "py37" |
| 49 |
|
| 50 |
[tool.ruff.format] |
| 51 |
docstring-code-format = true |
| 52 |
|
| 53 |
[tool.ruff.lint] |
| 54 |
extend-select = [ |
| 55 |
"I", |
| 56 |
"UP", |
| 57 |
"PL", |
| 58 |
"E", |
| 59 |
"W", |
| 60 |
"F", |
| 61 |
"C4", |
| 62 |
"LOG", |
| 63 |
"G", |
| 64 |
"ISC", |
| 65 |
"TC", |
| 66 |
"SIM103", |
| 67 |
"SIM300", |
| 68 |
"RUF100", |
| 69 |
"RUF101", |
| 70 |
"RUF010", |
| 71 |
"RUF005", |
| 72 |
"RUF022", |
| 73 |
"PERF101", |
| 74 |
"PERF102", |
| 75 |
"B007", |
| 76 |
"PYI030", |
| 77 |
] |
| 78 |
ignore = [ |
| 79 |
"E741", |
| 80 |
"E501", |
| 81 |
"PLR0912", |
| 82 |
"PLR0913", |
| 83 |
"PLR0915", |
| 84 |
"PLR2004", |
| 85 |
"PLW0603", |
| 86 |
"PLR0911", |
| 87 |
"PLW1641", |
| 88 |
"UP021", |
| 89 |
] |
| 90 |
|
| 91 |
[tool.ruff.lint.per-file-ignores] |
| 92 |
|
| 93 |
"examples/doc_examples/quickstart/test_my_design.py" = [ |
| 94 |
"E402", |
| 95 |
"F811", |
| 96 |
] |
| 97 |
|
| 98 |
[tool.ruff.lint.isort] |
| 99 |
known-first-party = [ |
| 100 |
"cocotb", |
| 101 |
"cocotb_tools", |
| 102 |
"pygpi", |
| 103 |
] |
| 104 |
known-third-party = [ |
| 105 |
"pytest", |
| 106 |
] |
| 107 |
|
| 108 |
[tool.cibuildwheel] |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
build = "cp*-manylinux_x86_64 cp*-manylinux_i686 cp*-win_amd64 cp*-win32 cp*-macosx_x86_64 cp*-macosx_arm64" |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
environment = {CFLAGS = "-O2 -g -flto", CPPFLAGS = "-O2 -g -flto", LDFLAGS = "-O2 -g -flto"} |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
manylinux-x86_64-image = "manylinux2014" |
| 127 |
manylinux-i686-image = "manylinux2014" |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
[tool.cibuildwheel.windows] |
| 135 |
environment = {CL = "/O2 /Z7 /Zo /LTCG"} |
| 136 |
|
| 137 |
[[tool.cibuildwheel.overrides]] |
| 138 |
|
| 139 |
|
| 140 |
select = "cp36-*" |
| 141 |
manylinux-x86_64-image = "manylinux1" |
| 142 |
manylinux-i686-image = "manylinux1" |
| 143 |
|
| 144 |
[tool.pytest.ini_options] |
| 145 |
|
| 146 |
|
| 147 |
testpaths = [ |
| 148 |
"tests/pytest", |
| 149 |
] |
| 150 |
|
| 151 |
|
| 152 |
addopts = "--strict-markers" |
| 153 |
|
| 154 |
markers = [ |
| 155 |
"simulator_required: mark tests as needing a simulator", |
| 156 |
"compile: the compile step in runner-based tests", |
| 157 |
] |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
[tool.coverage.paths] |
| 162 |
source = [ |
| 163 |
"src/cocotb/", |
| 164 |
".nox/**/cocotb/", |
| 165 |
] |
| 166 |
|
| 167 |
[tool.coverage.report] |
| 168 |
omit = [ |
| 169 |
"*/cocotb_tools/*", |
| 170 |
"*/_vendor/*", |
| 171 |
] |
| 172 |
exclude_lines = [ |
| 173 |
|
| 174 |
|
| 175 |
"#\\s*(pragma|PRAGMA)[:\\s]?\\s*(no|NO)\\s*(cover|COVER)", |
| 176 |
"^\\s*(((async )?def .*?)?\\)(\\s*->.*?)?:\\s*)?\\.\\.\\.\\s*(#|$)", |
| 177 |
"if (typing\\.)?TYPE_CHECKING:", |
| 178 |
] |
| 179 |
|
| 180 |
[tool.codespell] |
| 181 |
ignore-words-list = [ |
| 182 |
"AFE", |
| 183 |
"Synopsys", |
| 184 |
"afe", |
| 185 |
"afile", |
| 186 |
"alog", |
| 187 |
"ccompiler", |
| 188 |
"datas", |
| 189 |
"implementors", |
| 190 |
"inout", |
| 191 |
"nam", |
| 192 |
"sting", |
| 193 |
"synopsys", |
| 194 |
] |
| 195 |
|
| 196 |
[tool.mypy] |
| 197 |
packages = ["cocotb", "pygpi"] |
| 198 |
modules = ["noxfile"] |
| 199 |
disallow_untyped_defs = true |
| 200 |
disallow_any_unimported = true |
| 201 |
disallow_untyped_calls = true |
| 202 |
disallow_untyped_decorators = true |
| 203 |
no_implicit_optional = true |
| 204 |
warn_redundant_casts = true |
| 205 |
warn_unused_ignores = true |
| 206 |
implicit_reexport = false |
| 207 |
show_error_codes = true |
| 208 |
pretty = true |