-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
271 lines (236 loc) · 7.7 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
[project]
name = "bpy_jupyter"
version = "0.2.0"
description = "Interact with Blender using Jupyter notebooks"
authors = [
{ name = "Sofus Albert Høgsbro Rose", email = "[email protected]" },
{ name = "Jan-Hendrik Mueller", email = "[email protected]" }
]
maintainers = [
{ name = "Sofus Albert Høgsbro Rose", email = "[email protected]" },
{ name = "Jan-Hendrik Mueller", email = "[email protected]" }
]
readme = "README.md"
requires-python = "~= 3.11"
license = { text = "AGPL-3.0-or-later" }
dependencies = [
"rich>=13.9.3",
"anywidget>=0.9.13",
"ipywidgets>=8.1.5",
"jupyterlab>=4.2.5",
"pydantic>=2.9.2",
"jupyter-server>=2.14.2",
"pyxll-jupyter>=0.5.3",
"jupyter>=1.1.1",
"ipykernel==6.29.5",
"jupyter-client>=8.6.3",
"platformdirs>=4.3.6",
"pyperclipfix>=1.9.4",
]
[project.urls]
Homepage = "https://kolibril13.github.io/bpy-gallery/"
####################
# - Blender Extension
####################
[tool.blext]
pretty_name = "BPY Jupyter"
blender_version_min = '4.2.0'
blender_version_max = '4.3.10'
bl_tags = ["Development", "Import-Export", "Pipeline"]
copyright = ["2024 bpy_jupyter Contributors"]
[tool.blext.permissions]
network = 'Jupyter needs to expose a notebook server'
# Platform Support
## Map Valid Blender Platforms -> Required PyPi Platform Tags
## Include as few PyPi tags as works on ~everything.
[tool.blext.platforms]
windows-amd64 = ['win_amd64']
macos-arm64 = ['macosx_10_9_universal2', 'macosx_11_0_arm64', 'macosx_12_0_arm64', 'macosx_14_0_arm64', 'macosx_10_15_universal2']
linux-x64 = ['manylinux1_x86_64', 'manylinux2014_x86_64', 'manylinux_2_17_x86_64', 'manylinux_2_28_x86_64']
#macos-x86_64 = ['macosx_10_10_x86_64'] ##TODO: Broken
# Packaging
## Path is from the directory containing this file.
[tool.blext.packaging]
path_wheels = 'dev/wheels'
init_settings_filename = 'init_settings.toml'
# "Profiles" -> Affects Initialization Settings
## This sets the default extension preferences for different situations.
[tool.blext.profiles.test]
use_path_local = true
use_log_file = true
log_file_path = 'bpy_jupyter.log'
log_file_level = 'DEBUG'
use_log_console = true
log_console_level = 'INFO'
[tool.blext.profiles.dev]
use_path_local = true
use_log_file = true
log_file_path = 'bpy_jupyter.log'
log_file_level = 'DEBUG'
use_log_console = true
log_console_level = 'INFO'
[tool.blext.profiles.release]
use_path_local = false
use_log_file = true
log_file_path = 'bpy_jupyter.log'
log_file_level = 'INFO'
use_log_console = true
log_console_level = 'WARNING'
[tool.blext.profiles.release-debug]
use_path_local = false
use_log_file = true
log_file_path = 'bpy_jupyter.log'
log_file_level = 'DEBUG'
use_log_console = true
log_console_level = 'WARNING'
####################
# - Blender Extension
####################
[tool.uv]
managed = true
dev-dependencies = [
"blext>=0.2.1",
"mypy>=1.13.0",
"pip>=24.2",
"rich>=13.9.3",
"ruff>=0.7.1",
"tomli-w>=1.1.0",
"typer>=0.15.1",
]
package = false
####################
# - Tooling: Ruff
####################
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.lint]
task-tags = ["TODO"]
select = [
"E", # pycodestyle ## General Purpose
"F", # pyflakes ## General Purpose
"PL", # Pylint ## General Purpose
## Code Quality
"TCH", # flake8-type-checking ## Type Checking Block Validator
"C90", # mccabe ## Avoid Too-Complex Functions
"ERA", # eradicate ## Ban Commented Code
"TRY", # tryceratops ## Exception Handling Style
"B", # flake8-bugbear ## Opinionated, Probable-Bug Patterns
"N", # pep8-naming
"D", # pydocstyle
"SIM", # flake8-simplify ## Sanity-Check for Code Simplification
"SLF", # flake8-self ## Ban Private Member Access
"RUF", # Ruff-specific rules ## Extra Good-To-Have Rules
## Style
"I", # isort ## Force import Sorting
"UP", # pyupgrade ## Enforce Upgrade to Newer Python Syntaxes
"COM", # flake8-commas ## Enforce Trailing Commas
"Q", # flake8-quotes ## Finally - Quoting Style!
"PTH", # flake8-use-pathlib ## Enforce pathlib usage
"A", # flake8-builtins ## Prevent Builtin Shadowing
"C4", # flake9-comprehensions ## Check Compehension Appropriateness
"DTZ", # flake8-datetimez ## Ban naive Datetime Creation
"EM", # flake8-errmsg ## Check Exception String Formatting
"ISC", # flake8-implicit-str-concat ## Enforce Good String Literal Concat
"G", # flake8-logging-format ## Enforce Good Logging Practices
"INP", # flake8-no-pep420 ## Ban PEP420; Enforce __init__.py.
"PIE", # flake8-pie ## Misc Opinionated Checks
"T20", # flake8-print ## Ban print()
"RSE", # flake8-raise ## Check Niche Exception Raising Pattern
"RET", # flake8-return ## Enforce Good Returning
"ARG", # flake8-unused-arguments ## Ban Unused Arguments
# Specific
"PT", # flake8-pytest-style ## pytest-Specific Checks
]
ignore = [
"COM812", # Conflicts w/Formatter
"ISC001", # Conflicts w/Formatter
"Q000", # Conflicts w/Formatter
"Q001", # Conflicts w/Formatter
"Q002", # Conflicts w/Formatter
"Q003", # Conflicts w/Formatter
"D206", # Conflicts w/Formatter
"B008", # FastAPI uses this for Depends(), Security(), etc. .
"E701", # class foo(Parent): pass or if simple: return are perfectly elegant
"ERA001", # 'Commented-out code' seems to be just about anything to ruff
"F722", # jaxtyping uses type annotations that ruff sees as "syntax error"
"N806", # Sometimes we like using types w/uppercase in functions, sue me
"RUF001", # We use a lot of unicode, yes, on purpose!
#"RUF012", # ruff misunderstands which ClassVars are actually mutable.
# Line Length - Controversy Incoming
## Hot Take: Let the Formatter Worry about Line Length
## - Yes dear reader, I'm with you. Soft wrap can go too far.
## - ...but also, sometimes there are real good reasons not to split.
## - Ex. I think 'one sentence per line' docstrings are a valid thing.
## - Overlong lines tend to be be a code smell anyway
## - We'll see if my hot takes survive the week :)
"E501", # Let Formatter Worry about Line Length
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"SLF001", # It's okay to not have module-level docstrings in test modules.
"D100", # It's okay to not have module-level docstrings in test modules.
"D104", # Same for packages.
]
####################
# - Tooling: Ruff Sublinters
####################
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = []
[tool.ruff.lint.pycodestyle]
max-doc-length = 120
ignore-overlong-task-comments = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 6
####################
# - Tooling: Ruff Formatter
####################
[tool.ruff.format]
quote-style = "single"
indent-style = "tab"
docstring-code-format = false
####################
# - Tooling: MyPy
####################
[tool.mypy]
python_version = '3.11'
python_executable="./.venv/bin/python"
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
strict_optional = true
no_implicit_optional = true
disallow_subclassing_any = false
disallow_any_generics = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
ignore_missing_imports = true
plugins = [
# 'pydantic.mypy',
# 'typing_protocol_intersection.mypy_plugin',
]
####################
# - Tooling: Commits
####################
[tool.commitizen]
# Specification
name = "cz_conventional_commits"
version_scheme = "semver2"
version_provider = "pep621"
tag_format = "v$version"
# Version Bumping
retry_after_failure = true
major_version_zero = true
update_changelog_on_bump = true
# Annotations / Signature
gpg_sign = true
annotated_tag = true
####################
# - Tooling: Pytest
####################
[tool.pytest.ini_options]
testpaths = ["tests"]