-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpyproject.toml
245 lines (226 loc) · 6.19 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
[project]
name = "xeda"
description = "Cross EDA Abstraction and Automation"
readme = "README.md"
requires-python = ">=3.9"
dynamic = ["version"]
license = { file = "LICENSE.txt" }
keywords = [
"EDA",
"Electronic",
"Design",
"Automation",
"Tool",
"Synthesis",
"Simulation",
"Simulator",
"Verification",
"Hardware",
"Verilog",
"VHDL",
"FPGA",
"ASIC",
]
authors = [ #
{ name = "Kamyar Mohajerani", email = "[email protected]" },
]
classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: Utilities",
]
dependencies = [
"jinja2 ~= 3.1",
"pydantic >= 1.10, < 2.0",
"tomli ~= 2.0; python_version<'3.11'",
"python-box[] ~= 7.2",
"attrs >= 22.1, < 24.0",
"cattrs >= 22.2, < 24.0",
"attrs_strict ~= 1.0",
"pathvalidate >= 2.5, < 4.0",
"click ~= 8.1",
"click_help_colors ~= 0.9",
"coloredlogs ~= 15.0",
"rich >= 12.6, < 14.0",
"pebble ~= 5.0",
"pint ~= 0.24",
"importlib_resources >= 5.10", # backport of importlib.resources, replaces pkg_resources
"simpleeval ~= 0.9",
# experimental:
"pyyaml ~= 6.0",
"varname >= 0.13.3, < 0.14",
"overrides ~= 7.7",
"simple_term_menu ~= 1.6",
"psutil ~= 6.0",
"junitparser >= 2.4, < 4.0", # TODO: remove
"pyvcd ~= 0.4",
"GitPython ~= 3.1",
"fabric ~= 3.2",
"execnet ~= 2.1",
"devtools ~= 0.12",
]
[project.optional-dependencies]
docs = ["sphinx", "sphinx-tabs", "sphinx-jinja", "autodoc_pydantic"]
dev = ["pytest", "mypy", "black", "flakeheaven", "tox"]
[project.urls]
homepage = "https://github.com/XedaHQ/xeda"
repository = "https://github.com/XedaHQ/xeda.git"
changelog = "https://github.com/XedaHQ/xeda/blob/dev/CHANGELOG.md"
# documentation = "..."
[project.scripts]
xeda = "xeda.cli:cli"
[build-system]
requires = ["setuptools>=65", "wheel>=0.37", "setuptools_scm[toml]>=7.1"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
include = ["xeda*"]
exclude = ["tests/**", "*/tests/**", "platforms", "*/platforms", "**/platforms/**"]
namespaces = false
[tool.setuptools.package-data]
"xeda" = [
"*.cpp",
"*.dse",
"*.fdc",
"*.j2",
"*.json",
"*.ldc",
"*.lef",
"*.lib",
"*.sdc",
"*.sdf",
"*.tcl",
"*.toml",
"*.ucf",
"*.xcf",
"*.xdc",
"*.ys",
# "*/platforms/**",
]
[tool.setuptools.exclude-package-data]
"xeda" = [
"tests/*",
# moving the platforms to the xeda_platforms* packages
"**/platforms/",
]
[tool.setuptools_scm]
[tool.black]
line-length = 100
target-version = ["py39", "py310", "py311", "py312", "py313"]
include = '\.pyi?$'
[tool.pylint.messages_control]
max-line-length = 100
disable = [
"line-too-long",
"invalid-name",
"too-few-public-methods",
"unspecified-encoding",
"missing-function-docstring",
"too-many-instance-attributes",
"too-many-statements",
"too-many-branches",
"too-many-locals",
"too-many-arguments",
"too-many-nested-blocks",
# to be removed:
"missing-module-docstring",
"unused-argument",
"fixme",
"f-string-without-interpolation",
"wrong-import-order",
"missing-class-docstring",
"no-self-argument", # from pydantic validators (classmethod)
"no-self-use", # from pydantic validators (classmethod)
]
[tool.pylint.similarities]
min-similarity-lines = 10
# Ignore comments when computing similarities.
ignore-comments = "yes"
# Ignore docstrings when computing similarities.
ignore-docstrings = "yes"
# Ignore imports when computing similarities.
ignore-imports = "no"
[tool.pylint.design]
max-returns = 8
[tool.bandit]
skips = [
"B701",
"B101:assert_used",
"B404:blacklist", # subprocess module
"B314",
]
[tool.flakeheaven]
# make output nice
format = "grouped"
# 80 chars aren't enough in 21 century
max_line_length = 100
# show line of source code in output
show_source = true
[tool.flakeheaven.plugins]
# include everything in pyflakes except F401
# pyflakes = ["+*", "-F401"]
pyflakes = ["+*"]
pycodestyle = [
"+*",
"-E501", # line too long
"-E203",
"-E231", # whitespace before/after ':'
"-C812", # missing trailing comma
"-W503", # line break before binary operator
]
# enable only codes from S100 to S199
# flake8-bandit = ["-*", "+S1??"]
flake8-bandit = [
"+*",
"-S603",
"-S404", # subprocess
"-S405",
"-S314", # xml.etree.ElementTree.parse
"-S101", # asserts
"-S311", # random crypto
"-S701", # jinja2 autoescape
"-S310", # urllib open URL
]
# enable everything that starts from `flake8-`
"flake8-*" = ["+*"]
# explicitly disable plugin
flake8-docstrings = ["-*"]
flake8-quotes = ["-*"]
flake8-commas = ["-*"]
[tool.isort]
profile = "black"
[tool.zimports]
black-line-length = 100
keep-unused-type-checking = true
# multi-imports = true
[tool.mypy]
plugins = ["pydantic.mypy"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
# warn_unused_ignores = false
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy:
# disallow_untyped_defs = true
# strict = false
# ignore_missing_imports = true
warn_unused_configs = true
# exclude = ['^build/.*$', '^examples/.*$', '^\.tox/.*$', 'src/flows/openroad/openroad_scripts/utils/.*']
color_output = true
pretty = true
strict_optional = true
# warn_return_any = false
disable_error_code = ["import-untyped", "type-arg", "unused-ignore"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true