-
Notifications
You must be signed in to change notification settings - Fork 11
/
pyproject.toml
256 lines (227 loc) · 7.55 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
# SPDX-FileCopyrightText: Copyright DB InfraGO AG
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=3.4", "wheel"]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
name = "capellambse"
description = "Provides access to Capella MBSE projects in Python"
readme = "README.md"
requires-python = ">=3.10, <3.14"
license = { text = "Apache-2.0" }
authors = [{ name = "DB InfraGO AG" }]
keywords = ["arcadia", "capella", "mbse", "model-based systems engineering"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Other/Nonlisted Topic",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"awesomeversion>=24.2.0",
"diskcache>=5.0",
"lxml>=4.5.0",
"markupsafe>=2.0",
"Pillow>=7.0.0",
"platformdirs>=4.2.0",
"pyyaml>=6.0",
"requests>=2.25.0",
"svgwrite>=1.3.1",
"typing_extensions >=4.9.0, <5",
]
[project.urls]
Homepage = "https://github.com/DSD-DBS/py-capellambse"
Documentation = "https://dsd-dbs.github.io/py-capellambse"
[project.optional-dependencies]
docs = [
"furo",
"ipython",
"jinja2",
"nbsphinx>=0.9.5",
"sphinx>=8.0.2",
"sphinx-argparse-cli",
"sphinx-autodoc-typehints",
"tomli; python_version<'3.11'",
]
test = [
"click",
"jinja2>=3.1.3",
"pytest",
"pytest-cov",
"requests-mock",
]
cli = [
"click>=8.1.7",
"jinja2>=3.1.3",
]
decl = []
httpfiles = []
png = ["cairosvg>=2.5.2"]
termgraphics = ["cairosvg>=2.5.2"]
[project.entry-points."capellambse.diagram.formats"]
datauri_svg = "capellambse.model.diagram:SVGDataURIFormat"
html_img = "capellambse.model.diagram:SVGInHTMLIMGFormat"
png = "capellambse.model.diagram:PNGFormat"
svg = "capellambse.model.diagram:SVGFormat"
svg_confluence = "capellambse.model.diagram:ConfluenceSVGFormat"
svgdiagram = "capellambse.model.diagram:convert_svgdiagram"
termgraphics = "capellambse.model.diagram:TerminalGraphicsFormat"
[project.entry-points."capellambse.filehandler"]
file = "capellambse.filehandler.local:LocalFileHandler"
git = "capellambse.filehandler.git:GitFileHandler"
glart = "capellambse.filehandler.gitlab_artifacts:GitlabArtifactsFiles"
http = "capellambse.filehandler.http:HTTPFileHandler"
https = "capellambse.filehandler.http:HTTPFileHandler"
zip = "capellambse.filehandler.zip:ZipFileHandler"
[project.entry-points."capellambse.model_extensions"]
filtering = "capellambse.extensions.filtering:init"
pvmt = "capellambse.extensions.pvmt:init"
reqif = "capellambse.extensions.reqif:init"
validation = "capellambse.extensions.validation:init"
[tool.coverage.run]
branch = true
command_line = "-m pytest"
source = ["capellambse"]
[tool.coverage.report]
exclude_also = [
'if t\.TYPE_CHECKING:',
'class .*\bt\.Protocol\):',
'@abc\.abstractmethod',
'@t\.overload',
]
skip_covered = true
[tool.docformatter]
wrap-descriptions = 72
wrap-summaries = 79
[tool.isort]
profile = 'black'
line_length = 79
[tool.mypy]
check_untyped_defs = true
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
plugins = ["mypypp.deprecated"]
python_version = "3.10"
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_incomplete_defs = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
# Untyped third party libraries
module = [
"cairosvg.*",
"cssutils.*",
"diskcache.*",
"lxml.*",
"PIL.*",
"requests_mock.*",
"svgwrite.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = """
--import-mode=importlib
--strict-config
--strict-markers
--tb=short
"""
testpaths = ["tests"]
xfail_strict = true
[tool.ruff]
line-length = 79
[tool.ruff.lint]
extend-select = [
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"D212", # "Multi-line docstring summary should start at the first line"
"D402", # "First line should not be the function’s 'signature'"
"D417", # "Missing argument descriptions in the docstring"
"DTZ", # flake8-datetimez
"ERA", # eradicate
"FA", # flake8-future-annotations
"FIX", # flake8-fixme
"FURB", # refurb
"G", # flake8-logging-format
"ICN", # flake8-import-conventions
"ISC001", # "Implicitly concatenated string literals on one line"
"ISC003", # "Explicitly concatenated string should be implicitly concatenated"
"LOG", # flake8-logging
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # ruff
"SIM", # flake8-simplify
"TCH005", # "Found empty type-checking block"
"T1", # flake8-debugger
"UP", # pyupgrade
"YTT", # flake8-2020
]
extend-ignore = [
"D1", # Missing docstring in _
"D201", # No blank lines allowed before function docstring # auto-formatting
"D202", # No blank lines allowed after function docstring # auto-formatting
"D203", # 1 blank line required before class docstring # auto-formatting
"D204", # 1 blank line required after class docstring # auto-formatting
"D211", # No blank lines allowed before class docstring # auto-formatting
"D213", # Multi-line docstring summary should start at the second line
"DTZ001", # `tzinfo=None` passed to `datetime.datetime()`
"DTZ005", # `tz=None` passed to `datetime.datetime.now()`
"E402", # Module level import not at top of file
"F403", # `from _ import *` used; unable to detect undefined names
"F405", # `_` may be undefined, or defined from star imports
"PLC0414", # Import alias does not rename original package # used for explicit reexports
"PLR0904", # Too many public methods
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0914", # Too many local variables
"PLR0915", # Too many statements
"PLR0916", # Too many Boolean expressions
"PLR0917", # Too many positional arguments
"PLR2004", # Magic value used in comparison, consider replacing `_` with a constant variable
"PLW0603", # Using the global statement to update `_` is discouraged
"PLW2901", # `for` loop variable `_` overwritten by assignment target
"RUF005", # Consider iterable unpacking instead of concatenation # false-positives with NamedTuple and overridden __add__ (i.e. Vector2D)
"SIM108", # Use ternary operator instead of `if`-`else`-block
]
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = [
"PLE0604", # Invalid object in `__all__`, must contain only strings # false-positive when unpacking imported submodule __all__
]
"tests/test_*.py" = [
"F811", # Redefinition of unused `_` from line _
"PLR2004", # Magic value used in comparison, consider replacing `_` with a constant variable
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"capellambse.diagram.Vector2D",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = ["typing.overload"]
[tool.setuptools]
platforms = ["any"]
zip-safe = false
[tool.setuptools.package-data]
"*" = ["py.typed"]
"capellambse" = ["OpenSans-Regular.ttf"]
[tool.setuptools.packages.find]
include = ["capellambse", "capellambse.*"]
[tool.setuptools_scm]
# This section must exist for setuptools_scm to work