Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
193 lines (164 loc) · 4.89 KB
/
Copy pathpyproject.toml
File metadata and controls
193 lines (164 loc) · 4.89 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
[build-system]
requires = ["setuptools>=66.0"]
build-backend = "setuptools.build_meta"
# ============================================================================
# project info
# ============================================================================
[project]
name = "compas_pb"
description = "Protobuf extension for COMPAS Data"
keywords = []
authors = [
{ name = "Wei-Ting Chen", email = "chenwei@arch.ethz.ch" },
{ name = "Chen Kasirer", email = "kasirer@arch.ethz.ch" }
]
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9"
dynamic = ['version']
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"compas >=2",
"protobuf >=6.31.1",
"importlib-metadata>=5; python_version == '3.9'",
]
[project.optional-dependencies]
dev = [
"attrs >=17.4",
"bump-my-version",
"compas_invocations2",
"invoke >=0.14",
"ruff",
"sphinx_compas2_theme",
"twine",
"wheel",
"pytest-mock",
"build",
]
docs = [
"markdown-callouts >=0.4",
"markdown-exec >=1.8",
"mike",
"mkdocs >=1.6",
"mkdocs-autorefs >=1.4",
"mkdocs-coverage >=1.0",
"mkdocs-git-revision-date-localized-plugin >=1.2",
"mkdocs-llmstxt >=0.2",
"mkdocs-material >=9.5",
"mkdocs-minify-plugin >=0.8",
"mkdocs-redirects >=1.2",
"mkdocs-section-index >=0.3",
"mkdocstrings[python]",
"pydantic >=2.10",
"tomli >=2.0; python_version < '3.11'",
]
[project.scripts]
compas_pb = "compas_pb.cli:main"
[project.urls]
Homepage = "https://compas.dev/compas_pb"
Documentation = "https://compas.dev/compas_pb"
Repository = "https://github.com/compas-dev/compas_pb"
Changelog = "https://github.com/compas-dev/compas_pb/blob/main/CHANGELOG.md"
Issues = "https://github.com/compas-dev/compas_pb/issues"
Forum = "https://forum.compas-framework.org/"
# ============================================================================
# setuptools config
# ============================================================================
[tool.setuptools]
package-dir = { "" = "src" }
include-package-data = true
zip-safe = false
[tool.setuptools.dynamic]
version = { attr = "compas_pb.__version__" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"*" = ["*.proto"]
# ============================================================================
# replace pytest.ini
# ============================================================================
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests", "src/compas_pb"]
python_files = ["test_*.py", "*_test.py", "test.py"]
addopts = [
"-ra",
"--strict-markers",
"--doctest-glob=*.rst",
"--tb=short",
"--import-mode=importlib",
]
markers = [
"network: needs network access to fetch an older compas_pb into an ephemeral environment",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ALLOW_UNICODE",
"ALLOW_BYTES",
"NUMBER",
]
# ============================================================================
# replace bumpversion.cfg
# ============================================================================
[tool.bumpversion]
current_version = "1.2.0"
message = "Bump version to {new_version}"
commit = false
tag = false
[[tool.bumpversion.files]]
filename = "src/compas_pb/__init__.py"
search = "{current_version}"
replace = "{new_version}"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "Unreleased"
replace = "[{new_version}] {now:%Y-%m-%d}"
# ============================================================================
# linting and formatting
# ============================================================================
[tool.black]
extend-exclude = '(/[a-zA-Z\./]*[\s]?)' # exclude everything, black should be removed..
[tool.ruff]
line-length = 179
indent-width = 4
target-version = "py39"
exclude = ["src/compas_pb/generated/"]
[tool.ruff.lint]
select = ["E", "F", "I"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["I001"]
"tests/*" = ["I001"]
"tasks.py" = ["I001"]
[tool.isort]
line_length = 179
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
force_single_line = false
ensure_newline_before_comments = true
known_first_party = "compas_pb"
default_section = "THIRDPARTY"
forced_separate = "test_compas_pb"
[tool.ruff.lint.isort]
force-single-line = true
known-first-party = ["compas_pb"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pycodestyle]
max-doc-length = 179
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"