-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
182 lines (162 loc) · 4.29 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
# Poetry pyproject.toml: https://python-poetry.org/docs/pyproject/
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "bsr"
version = "0.1.1"
description = "Blender integration tools for soft-rod system."
readme = "README.md"
authors = []
license = "MIT"
keywords = ["data-analysis"]
# Pypi classifiers: https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
# ...
packages = [
{ include = "bsr", from = "src" },
{ include = "elastica_blender", from = "src" },
]
[tool.poetry.scripts]
# elastica data converter
elastica-npz2blend = "elastica_blender.converter.npz2blend:main"
[tool.poetry.dependencies]
# for python 3.10, use the following versions
python = "^3.10,<3.12"
bpy = [
{ version = "4.0.0", python = "3.10.*" },
{ version = "4.1.0", python = "3.11.*" },
]
click = "^8.1.7"
mathutils = "^3.3.0"
[tool.poetry.group.dev]
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.1"
pytest-mock = "^3.14.0"
pytest-cov = "^5.0.0"
codecov = "^2.1.13"
black = "^24.4.2"
isort = {extras = ["colors"], version = "^5.13.2"}
pre-commit = "^3.7.1"
mypy = "^1.10.0"
mypy-extensions = "^1.0.0"
pyupgrade = "^3.15.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "^7.3.7"
sphinx-rtd-theme = "^2.0.0"
numpydoc = "^1.7.0"
sphinx-autodoc-typehints = "^2.1.0"
sphinx-click = "^6.0.0"
[tool.poetry.group.examples]
[tool.poetry.group.examples.dependencies]
pyelastica = "^0.3.2"
[tool.black]
# https://github.com/psf/black
target-version = ["py38"]
line-length = 80
color = true
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| env
| venv
)/
'''
[tool.isort]
# https://github.com/timothycrosley/isort/
line_length = 80
known_typing = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]
sections = ["FUTURE", "TYPING", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
include_trailing_comma = true
profile = "black"
multi_line_output = 3
indent = 4
color_output = true
[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
python_version = "3.10"
pretty = true
show_traceback = true
color_output = true
strict = true
allow_redefinition = false
check_untyped_defs = false
disallow_any_generics = false
disallow_incomplete_defs = true
disallow_subclassing_any = false # Needed for allowing Elastica mixins
disallow_untyped_calls = true
ignore_missing_imports = true
implicit_reexport = true
no_implicit_optional = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = false # TODO: open to discussion
warn_unused_configs = true
warn_unused_ignores = true
[tool.pytest.ini_options]
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
# Directories that are not visited by pytest collector:
norecursedirs =["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]
doctest_optionflags = ["NUMBER", "NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL", "ELLIPSIS"]
# Extra options:
addopts = [
"--strict-markers",
"--tb=short",
# "--doctest-modules", TODO: Try to include pytest.doctest
# "--doctest-continue-on-failure",
]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Enable pragma
"pragma: no cover",
"TODO",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == __main__:",
"def __repr__",
'''def plot_'.*\b':''',
"if self.debug:",
"if settings.DEBUG",
"if TYPE_CHECKING:",
"raise AssertionError",
"raise NotImplementedError",
'''class '.*\bProtocol\)':''',
''''@(abc\.)?'abstractmethod''',
'\.\.\.'
]
fail_under = 40
show_missing = true
[tool.coverage.run]
branch = true
omit = [
"*/.local/*",
"setup.py",
"*/protocol.py",
"macros.py",
]