-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
199 lines (171 loc) · 4.78 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
[project]
name = "elasticai.creator"
dynamic = ["version"]
description = "Design, train and compile neural networks optimized specifically for FPGAs."
readme = "README.md"
authors = [{ name = "Department Embedded Systems - University Duisburg Essen" }]
maintainers = [{ name = "Lukas Einhaus", email = "lukas.einhaus@uni-due.de" }]
requires-python = ">=3.11"
dependencies = [
"torch>=1.11",
"numpy>=1.23.0",
"tomlkit>=0.13.2",
"click>=8.1.7",
]
[dependency-groups]
dev = [
"build>=1.2.2.post1",
"hatch>=1.14.0",
"hatch-vcs>=0.4.0",
"ipykernel>=6.29.5",
"pre-commit>=4.0.1",
"tach>=0.23.0",
]
docs = [
"sphinx>=8.1.3",
"furo>=2024.8.6",
"sphinx-autoapi>=3.4.0",
"sphinx-autobuild>=2024.10.3",
"sphinx-copybutton>=0.5.2",
"sphinx-prompt>=1.9.0",
"sphinxcontrib-plantuml>=0.30",
"sphinxcontrib-wavedrom>=3.0.4",
"myst-parser>=4.0.0",
"sphinxcontrib-mermaid>=1.0.0",
"linkify>=1.4",
"linkify-it-py>=2.0.3",
"sphinx-autodoc2>=0.5.0",
"sphinxext-opengraph>=0.9.1",
]
release = ["git-cliff>=2.7.0"]
testing = [
"pytest>=8.3.4",
"hypothesis>=6.124.7",
"pytest-cov>=6.0.0",
"coverage>=7.6.9",
"vunit-hdl>=5.0.0.dev5",
]
utils = ["rust-just>=1.38.0"]
versioning = ["towncrier>=24.8.0"]
lint = ["mypy>=1.13.0", "ruff>=0.9.0"]
lsp = ["pylsp-mypy>=0.6.9", "pylsp-rope>=0.1.17", "python-lsp-server>=1.12.0"]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["elasticai"]
exclude = [
"*_test.py",
"test_*.py",
"elasticai/creator_plugins/*/tests",
"elasticai/creator_plugins/*/examples",
"elasticai/creator_plugins/*/docs",
]
[tool.hatch.version]
source = "vcs"
[tool.uv]
default-groups = ["utils", "testing", "lint", "dev", "docs"]
[tool.uv.sources]
elasticai-runtime-env5 = { git = "https://github.com/es-ude/elastic-ai.runtime.enV5.git", rev = "a9bc18749b1c1666828453a47c9c37f6f0aa2d61" }
[tool.pytest.ini_options]
minversion = "6.0"
markers = [
"simulation: possibly slow running integration tests including hw simulation, depends on ghdl being present",
"slow: a slow test that you would not run in tdd cycle",
]
testpaths = ["elasticai/creator/", "tests", "elasticai/creator_plugins"]
python_files = ["*_test.py", "test_*.py"]
addopts = "--import-mode=importlib"
[tool.coverage.run]
omit = [
"elasticai/creator/examples/*py",
"elasticai/creator/tests/*py",
"elasticai/creator/*Tests/*py",
"elasticai/creator/**/*_test.py",
"elasticai/**/__init__.py",
"tests/*py",
"elasticai/creator/utils/_console_out.py", # not testable
"elasticai/creator/utils/_run.py", # not testable
]
source = ["elasticai/creator", "elasticai/creator_plugins"]
command_line = "-m pytest -m 'not simulation and not slow'"
[tool.ruff]
include = [
"pyproject.toml",
"elasticai/**/*.py",
"elasticai/**/*.pyi",
"elasticai/**/*.py",
"tests/**/*.py",
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
".devenv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.8
target-version = "py38"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
select = ["E4", "E7", "E9", "F", "I"]
ignore = [
"D101",
"D102",
"E741", # ambiguous variable names
]
# 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"
[tool.mypy]
ignore_errors = false
[[tool.mypy.overrides]]
## Ignore errors in the following modules until we fixed type hints
module = [
"elasticai.creator.nn.fixed_point.lstm.*",
"elasticai.creator.nn.fixed_point.conv1d.*",
"elasticai.creator.nn.fixed_point.linear.*",
"elasticai.creator.nn.fixed_point.number_converter.*",
"elasticai.creator.nn.quantized_grads.*",
"elasticai.creator.base_modules.conv1d",
"elasticai.creator.base_modules.conv2d",
"elasticai.creator.base_modules.linear",
]
ignore_errors = true