-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
176 lines (159 loc) · 3.89 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[tool.poetry]
name = "cocotb-wrapper"
version = "1.1.2"
description = "A wrapper around cocotb that facilitates using cocotb"
license = "MIT"
authors = ["Thierry Delafontaine <[email protected]>"]
maintainers = ["Thierry Delafontaine <[email protected]>"]
readme = "README.md"
repository = "https://github.com/InES-HPMM/cocotb-wrapper"
keywords = [
"cocotb",
"fpga",
"testing",
"vhdl",
"verilog",
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
]
packages = [
{include = "cocotb_wrapper"},
]
[tool.poetry.dependencies]
python = ">=3.8"
cocotb = "^1.8.1"
cocotb-bus = "^0.2.1"
cocotbext-axi = "^0.1.24"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
myst-parser = "^2.0.0"
pydata-sphinx-theme = "^0.14.2"
sphinx = "^7.1"
sphinx-copybutton = "^0.5.2"
sphinx-togglebutton = "^0.3.2"
sphinxcontrib-bibtex = "^2.6.1"
sphinxcontrib-katex = "^0.9.9"
sphinxcontrib-makedomain = "^0.1.1"
toml = "^0.10.2"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
black = "^23.10.1"
coverage = "^7.3.2"
mypy = "^1.6.1"
pre-commit = "^3.5.0"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
pytest-sugar = "^0.9.7"
pytest-xdist = "^3.3.1"
ruff = "^0.1.2"
tox = "^4.11.3"
types-toml = "^0.10.8.7"
typing-extensions = "^4.6"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
target-version = ["py38", "py39", "py310", "py311"]
include = '\.pyi?$'
line-length = 80
[tool.coverage.run]
branch = true
omit = [
"tests/*",
]
[tool.coverage.report]
skip_covered = false
skip_empty = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
]
omit = [
"tests/*",
]
[tool.coverage.html]
directory = "report/coverage/html"
title = "Code Coverage of cocotb-wrapper"
[tool.coverage.xml]
output = "report/coverage/coverage.xml"
[tool.mypy]
mypy_path = "$MYPY_CONFIG_FILE_DIR"
exclude = [
"^tests/",
]
explicit_package_bases = true
strict = true
warn_redundant_casts = true
warn_return_any = true
show_error_codes = true
# Extensions without stubs
[[tool.mypy.overrides]]
module = [
"cocotb.*",
"cocotbext.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
# generate a coverage report
"--cov=cocotb_wrapper",
"--cov-config=pyproject.toml",
# distribute testing tasks across all cores
"--numprocesses=auto",
# show summary of all tests that did not pass
"-rEfX",
# raise an error when parsing the config fails
"--strict-config",
]
log_cli=true
python_files = "test_*"
python_functions = "test_*"
testpaths = "tests"
[tool.ruff]
line-length = 80
target-version = "py38"
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY", # modern numpy
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"TID252", # Relative imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"D105", # Missing docstring in magic method
"E501", # Line length controlled by black
"N803", # Argument casing
"N806", # Relax: Variable name in function should be lowercase
"N999", # Module names
"NPY002", # np.random.Generator may not be preferred in all cases
"SIM102", # We don't perfer always combining if branches
"SIM108", # We don't encourage ternary operators
"SIM114", # Don't combine if branches for debugability
"SIM116", # Don't use dict lookup to replace if-else
]
ignore-init-module-imports = true
unfixable = [
"SIM112", # Envvars should not be modified
]
[tool.ruff.per-file-ignores]
"tests/*" = ["D100", "D101", "D102", "D103", "D104", "D107"]
[tool.ruff.pydocstyle]
convention = "google"