-
Notifications
You must be signed in to change notification settings - Fork 235
Expand file tree
/
Copy pathpyproject.toml
More file actions
355 lines (319 loc) · 10.9 KB
/
pyproject.toml
File metadata and controls
355 lines (319 loc) · 10.9 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
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pyaedt"
dynamic = ["version"]
description = "High-level Python API for Ansys Electronics Desktop Framework"
readme = "README.md"
requires-python = ">=3.10,<4"
license = "MIT"
license-files = ["LICENSE"]
authors = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}]
maintainers = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}]
classifiers = [
# General classifiers
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Manufacturing",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: Scientific/Engineering :: Information Analysis",
# Additional specific classifiers
"Operating System :: OS Independent",
]
dependencies = [
"ansys-tools-common",
"grpcio>=1.50.0,<1.81",
"jsonschema",
"psutil>=6.0.0",
"pyedb>=0.71.0",
"tomli; python_version < '3.11'",
"tomli-w",
"pyyaml",
"defusedxml>=0.7,<8.0",
"numpy>=1.20.0,<2.3",
"pydantic>=2.6.4,<2.13",
]
[project.optional-dependencies]
dotnet = [
"ansys-pythonnet>=3.1.0rc3",
"cffi>=1.16.0,<2.1; platform_system=='Linux'",
"dotnetcore2==3.1.23; platform_system=='Linux'",
"pywin32>=303; platform_system=='Windows'",
]
# NOTE: Any modification to graphics should be extended in internal checks (decorators)
graphics = [
"ansys-tools-visualization-interface",
"pyvista[io]>=0.38.0,<0.48",
"matplotlib>=3.5.0,<3.11",
"vtk>=9.0,<9.7",
"fpdf2",
"pillow",
]
jupyter = [
"jupyterlab>=3.6.0,<4.6",
"ipython>=7.30.0,<9.1",
]
all = [
"matplotlib>=3.5.0,<3.11",
"openpyxl>=3.1.0,<3.3",
"osmnx>=2.0.0,<2.2",
"pandas>=1.1.0,<2.4",
"pyvista[io]>=0.38.0,<0.48",
"fast-simplification>=0.1.7",
"ansys-tools-visualization-interface",
"tables; python_version >= '3.10'",
"scikit-rf>=0.30.0,<1.12",
"pyaedt[jupyter]",
"requests",
"typer>=0.20.0",
"fpdf2",
"rpyc>=6.0.0,<6.1",
]
examples = [
"imageio>=2.34.0,<2.38",
"matplotlib>=3.5.0,<3.11",
"openpyxl>=3.1.0,<3.3",
"osmnx>=2.0.0,<2.2",
"pandas>=1.1.0,<2.4",
"pyvista[jupyter]>=0.38.0,<0.48",
"fast-simplification>=0.1.7",
"joblib>=1.4.0,<1.6",
"plotly>=6.0,<6.8",
"scikit-rf>=0.30.0,<1.12",
"fpdf2",
"rpyc>=6.0.0,<6.1",
"tables; python_version >= '3.10'",
]
[dependency-groups]
dev = [
"prek==0.3.9",
{ include-group = "doc" },
{ include-group = "tests" },
]
tests = [
"pytest>=7.4.0,<9.1",
"pytest-cov>=4.0.0,<7.2",
"pytest-testmon>=2.0.0,<3.0",
"mock>=5.1.0,<5.3",
"pytest-testmon>=2.0.0,<3.0",
"pytest-timeout>=2.3.0,<2.5",
"pytest-xdist>=3.5.0,<3.9",
"pytest-testmon>=2.0.0,<3.0",
"cryptography",
]
doc = [
"ansys-sphinx-theme>=1.0.0,<1.8",
"numpydoc==1.10.0",
"recommonmark",
"Sphinx>=7.1.0,<8.3",
"sphinx-autobuild==2024.10.3",
"sphinx-copybutton>=0.5.0,<0.6",
"sphinx-gallery>=0.14.0,<0.21",
"sphinx_design>=0.4.0,<0.7",
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
"ansys.aedt.core.syslib" = ["**/*.so", "**/*.pyd", "**/*.license"]
[tool.setuptools.dynamic]
version = {attr = "ansys.aedt.core.__version__"}
[project.urls]
Bugs = "https://github.com/ansys/pyaedt/issues"
Documentation = "https://aedt.docs.pyansys.com"
Source = "https://github.com/ansys/pyaedt"
Discussions = "https://github.com/ansys/pyaedt/discussions"
Releases = "https://github.com/ansys/pyaedt/releases"
Changelog = "https://github.com/ansys/pyaedt/blob/main/doc/source/changelog.rst"
[project.scripts]
pyaedt = "ansys.aedt.core.cli:app"
[tool.ruff]
line-length = 120
fix = true
exclude = ["*.def", "*.aedt", "*.aedtz"] # Do not check AEDT/EDB binary files
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"D", # pydocstyle, see https://docs.astral.sh/ruff/rules/#pydocstyle-d
"E", # pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"F", # pyflakes, see https://docs.astral.sh/ruff/rules/#pyflakes-f
"I", # isort, see https://docs.astral.sh/ruff/rules/#isort-i
"N", # pep8-naming, see https://docs.astral.sh/ruff/rules/#pep8-naming-n
"PTH", # flake8-use-pathlib, https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"TD", # flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td
"W", # pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"UP006", # non-pep585-annotation, https://docs.astral.sh/ruff/rules/non-pep585-annotation
"UP007", # non-pep604-annotation-union, https://docs.astral.sh/ruff/rules/non-pep604-annotation-union
"UP045", # non-pep604-annotation-optional, https://docs.astral.sh/ruff/rules/non-pep604-annotation-optional
]
ignore = [
# "D" - pydocstyle, see https://docs.astral.sh/ruff/rules/#pydocstyle-d
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D106", # undocumented-public-nested-class
"D205", # missing-blank-line-after-summary
"D210", # surrounding-whitespace
"D301", # escape-sequence-in-docstring
"D400", # missing-trailing-period
"D401", # non-imperative-mood
"D404", # docstring-starts-with-this
"D414", # empty-docstring-section
"D419", # empty-docstring
# "N" - pep8-naming, see https://docs.astral.sh/ruff/rules/#pep8-naming-n
"N801", # invalid-class-name
"N802", # invalid-function-name
"N803", # invalid-argument-name
"N806", # non-lowercase-variable-in-function
"N813", # camelcase-imported-as-lowercase
"N815", # mixed-case-variable-in-class-scope
"N816", # mixed-case-variable-in-global-scope
"N817", # camelcase-imported-as-acronym
"N818", # error-suffix-on-exception-name
"N999", # invalid-module-name
# "PTH" - flake8-use-pathlib, https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"PTH100", # os-path-abspath
"PTH101", # os-chmod
"PTH102", # os-mkdir
"PTH103", # os-makedirs
"PTH104", # os-rename
"PTH106", # os-rmdir
"PTH107", # os-remove
"PTH108", # os-unlink
"PTH109", # os-getcwd
"PTH110", # os-path-exists
"PTH112", # os-path-isdir
"PTH113", # os-path-isfile
"PTH116", # os-stat
"PTH118", # os-path-join
"PTH119", # os-path-basename
"PTH120", # os-path-dirname
"PTH122", # os-path-splitext
"PTH123", # builtin-open
"PTH201", # path-constructor-current-directory
"PTH208", # os-listdir
# "TD" - flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td
"TD002", # missing-todo-author
"TD003", # missing-todo-link
]
[tool.ruff.lint.pydocstyle]
# Use Numpy-style docstrings.
convention = "numpy"
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["doc", "src/ansys/aedt/core", "tests"]
force-single-line = true
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"src/pyaedt/**.py" = ["F403"]
[tool.codespell]
ignore-words = "ignore_words.txt"
skip = """
*.pyc,*.aedt,*.xml,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,\
*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./docs/build/*,./docs/images/*,./dist/*,*~,.hypothesis*,\
./src/ansys/aedt/core/third_party,./docs/source/examples/*,*cover,*.dat,*.mac,PKG-INFO,*.mypy_cache/*,*.xml,*.aedt,*.svg
"""
enable-colors = true
[tool.coverage.run]
source = ["src/ansys/aedt/core"]
[tool.coverage.report]
show_missing = true
omit = [
"src/ansys/aedt/core/rpc/*.py",
"src/ansys/aedt/core/extensions/installer/*_setup.py",
]
[tool.pytest.ini_options]
markers = [
"unit: mark a test as a unit test.",
"integration: mark a test as an integration test.",
"system: mark a test as a system test.",
"solvers: mark a test as related to solvers.",
"general: mark a test as related to general features.",
"visualization: mark a test as related to visualization features.",
"extensions: mark a test as related to extensions.",
"filter_solutions: mark a test as related to filter solutions.",
"emit: mark a test as related to EMIT features.",
"avoid_ansys_load: mark a test that should avoid LD_LIBRARY_PATH modifications.",
]
filterwarnings = [
"ignore::UserWarning:src.ansys.aedt.core.*",
"ignore::DeprecationWarning:src.*",
"ignore::UserWarning:ansys.aedt.core.*",
"ignore::DeprecationWarning:ansys.aedt.core.*"
]
[tool.numpydoc_validation]
checks = [
"GL06", # Found unknown section
"GL07", # Sections are in the wrong order.
"GL08", # The object does not have a docstring
"GL09", # Deprecation warning should precede extended summary
"GL10", # reST directives {directives} must be followed by two colons
# Return
"RT04", # Return value description should start with a capital letter"
"RT05", # Return value description should finish with "."
# Summary
"SS01", # No summary found
"SS02", # Summary does not start with a capital letter
"SS03", # Summary does not end with a period
"SS04", # Summary contains heading whitespaces
"SS05", # Summary must start with infinitive verb, not third person
# Parameters
"PR10", # Parameter "{param_name}" requires a space before the colon
# separating the parameter name and type",
]
exclude = [
'\.AEDTMessageManager.add_message$', # bad SS05
'\.Modeler3D\.create_choke$', # bad RT05
'\.tests', # missing docstring for tests
'HistoryProps.', # bad RT05 because of the base class named OrderedDict
]
[tool.towncrier]
package = "ansys.aedt.core"
directory = "doc/changelog.d"
filename = "doc/source/changelog.rst"
start_string = ".. towncrier release notes start\n"
template = "doc/changelog.d/changelog_template.jinja"
title_format = "`{version} <https://github.com/ansys/pyaedt/releases/tag/v{version}>`_ - {project_date}"
issue_format = "`#{issue} <https://github.com/ansys/pyaedt/pull/{issue}>`_"
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "dependencies"
name = "Dependencies"
showcontent = true
[[tool.towncrier.type]]
directory = "documentation"
name = "Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[[tool.towncrier.type]]
directory = "maintenance"
name = "Maintenance"
showcontent = true
[[tool.towncrier.type]]
directory = "miscellaneous"
name = "Miscellaneous"
showcontent = true
[[tool.towncrier.type]]
directory = "test"
name = "Test"
showcontent = true