-
Notifications
You must be signed in to change notification settings - Fork 20
/
pyproject.toml
276 lines (244 loc) · 8.3 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
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
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
name = "ansys-mechanical-core"
version = "0.12.dev0"
description = "A python wrapper for Ansys Mechanical"
readme = "README.rst"
requires-python = ">=3.10,<4.0"
license = {file = "LICENSE"}
authors = [{name = "ANSYS, Inc.", email = "[email protected]"}]
maintainers = [{name = "ANSYS, Inc.", email = "[email protected]"}]
keywords = ["pymechanical", "mechanical", "ansys", "pyansys",]
classifiers = [
"Development Status :: 4 - Beta",
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Information Analysis',
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"ansys-api-mechanical==0.1.2",
"ansys-mechanical-env==0.1.8",
"ansys-mechanical-stubs==0.1.5",
"ansys-platform-instancemanagement>=1.0.1",
"ansys-pythonnet>=3.1.0rc2",
"ansys-tools-path>=0.3.1",
"appdirs>=1.4.0",
"click>=8.1.3", # for CLI interface
"clr-loader==0.2.7.post0",
"grpcio>=1.30.0",
"protobuf>=3.12.2,<6",
"psutil==6.1.1",
"tqdm>=4.45.0",
"requests>=2,<3",
]
[project.urls]
Homepage = "https://github.com/ansys/pymechanical"
Documentation = "https://mechanical.docs.pyansys.com"
Repository = "https://github.com/ansys/pymechanical"
Issues = "https://github.com/ansys/pymechanical/issues"
Changelog = "https://mechanical.docs.pyansys.com/version/stable/changelog.html"
[project.optional-dependencies]
tests = [
"pytest==8.3.4",
"pytest-cov==6.0.0",
"pytest-print==1.0.2",
"psutil==6.1.1"
]
doc = [
"sphinx==8.1.3",
"ansys-sphinx-theme[autoapi]==1.2.4",
"grpcio==1.68.1",
"imageio-ffmpeg==0.5.1",
"imageio==2.36.1",
"jupyter_sphinx==0.5.3",
"jupyterlab>=3.2.8",
"matplotlib==3.10.0",
"numpy==2.2.1",
"numpydoc==1.8.0",
"pandas==2.2.3",
"panel==1.5.5",
"plotly==5.24.1",
"pypandoc==1.14",
"pytest-sphinx==0.6.3",
"pythreejs==2.4.2",
"pyvista>=0.39.1",
"sphinx-autobuild==2024.10.3",
"sphinx-autodoc-typehints==2.5.0",
"sphinx-copybutton==0.5.2",
"sphinx_design==0.6.1",
"sphinx-gallery==0.18.0",
"sphinx-notfound-page==1.0.4",
"sphinxcontrib-websupport==2.0.0",
"sphinxemoji==0.3.1",
]
viz = [
"ansys-tools-visualization-interface>=0.2.6",
"usd-core==24.11",
]
[project.scripts]
ansys-mechanical = "ansys.mechanical.core.run:cli"
ansys-mechanical-ideconfig = "ansys.mechanical.core.ide_config:cli"
[tool.flit.module]
name = "ansys.mechanical.core"
[tool.black]
line-length = 100
[tool.isort]
profile = "black"
force_sort_within_sections = true
line_length = 100
src_paths = ["doc", "src", "tests"]
# ========================================================
# Pytest and Coverage Configuration
# ========================================================
[tool.coverage.run]
relative_files = true
source = ["ansys.mechanical"]
[tool.coverage.report]
show_missing = true
[tool.coverage.html]
directory = ".cov/html"
[tool.coverage.xml]
output = ".cov/coverage.xml"
[tool.pytest.ini_options]
minversion = "7.1"
addopts = """-ra -s --durations=0 --cov=ansys.mechanical --cov-report html:.cov/html \
--cov-report xml:.cov/xml --cov-report term --cov-append -vv --print --print-relative-time"""
# addopts = """-ra -s -m remote_session_launch --durations=0 --cov=ansys.mechanical --cov-report html:.cov/html \
# --cov-report xml:.cov/xml --cov-report term -vv --print --print-relative-time"""
# addopts = """-ra -s -m 'remote_session_launch or remote_session_connect' --durations=0 --cov=ansys.mechanical \
# --cov-report html:.cov/html --cov-report xml:.cov/xml --cov-report term -vv --print --print-relative-time"""
# addopts = """-ra -s -m 'remote_session_launch or remote_session_connect or embedding' --durations=0
# --cov=ansys.mechanical --cov-report html:.cov/html --cov-report xml:.cov/xml --cov-report \
# term -vv --print --print-relative-time"""
testpaths = [
"tests",
]
markers = [
"embedding: tests that embed Mechanical in the python process",
"embedding_scripts: embedding tests that use subprocess",
"python_env: tests that check for an appropriate python environment",
"remote_session_launch: tests that launch Mechanical and work with gRPC server inside it",
"remote_session_connect: tests that connect to Mechanical and work with gRPC server inside it",
"minimum_version(num): tests that run if ansys-version is greater than or equal to the minimum version provided",
"version_range(min_revn,max_revn): tests that run if ansys-version is in the range of the minimum and maximum revision numbers inclusive.",
"windows_only: tests that run if the testing platform is on Windows",
"linux_only: tests that run if the testing platform is on Linux",
"cli: tests for the Command Line Interface",
"embedding_backgroundapp: tests for the BackgroundApp",
"embedding_logging: tests for the logging with Embedded App",
]
xfail_strict = true
# ========================================================
# Towncrier Configuration
# ========================================================
[tool.towncrier]
package = "ansys.mechanical.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/pymechanical/releases/tag/v{version}>`_ - {project_date}"
issue_format = "`#{issue} <https://github.com/ansys/pymechanical/pull/{issue}>`_"
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[[tool.towncrier.type]]
directory = "dependencies"
name = "Dependencies"
showcontent = true
[[tool.towncrier.type]]
directory = "miscellaneous"
name = "Miscellaneous"
showcontent = true
# ========================================================
# Flake8 Configuration
# ========================================================
[tool.flake8]
exclude = ["venv", "__init__.py", "doc/_build", ".venv"]
select = [
"W191", "W291", "W293", "W391", "E115", "E117",
"E122", "E124", "E125", "E225", "E231", "E301",
"E303", "E501", "F401", "F403"
]
count = true
max-complexity = 10
max-line-length = 100
statistics = true
# ========================================================
# Tox Configuration
# ========================================================
[tool.tox]
legacy_tox_ini = """
[tox]
description = Default tox environments list
envlist =
style,{py310,py311,py312}{,-coverage},doc
passenv = AWP_ROOT
skip_missing_interpreters = true
isolated_build = true
isolated_build_env = build
[gh-actions]
description = The tox environment to be executed in gh-actions for a given python version
python =
3.10: style,py310-coverage,doc
3.11: style,py311-coverage,doc
3.12: style,py311-coverage,doc
[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py310: python3.10
py311: python3.11
py312: python3.12
py: python3
{style,reformat,doc,build}: python3
passenv = *
setenv =
PYTHONUNBUFFERED = yes
coverage: PYTEST_EXTRA_ARGS = --cov=ansys.mechanical --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html
extras = tests
commands =
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}
[testenv:style]
description = Checks project code style
passenv = *
skip_install = true
deps =
pre-commit
commands =
pre-commit install
pre-commit run --all-files --show-diff-on-failure
[testenv:doc]
description = Check if documentation generates properly
passenv = *
extras = doc
commands =
sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxinidir}/doc/_build/html" --color -vW -bhtml
"""
[[tool.towncrier.type]]
directory = "documentation"
name = "Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "maintenance"
name = "Maintenance"
showcontent = true
[[tool.towncrier.type]]
directory = "test"
name = "Test"
showcontent = true