-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
433 lines (394 loc) · 14.2 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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
[project]
name = "starbridge"
version = "0.0.77"
description = "⭐ Integrates Claude Desktop with the web, Google and Atlassian workspaces."
readme = "README.md"
authors = [
{ name = "Helmut Hoffer von Ankershoffen", email = "[email protected]" },
]
license = { file = "LICENSE" }
keywords = [
"anthropic",
"atlassian",
"bump-my-version",
"claude",
"codecov",
"confluence",
"cyclonedx",
"devcontainer",
"docker",
"docker-compose",
"github-actions",
"git-cliff",
"google-drive",
"jira",
"logfire",
"mcp",
"nox",
"opentelemetry",
"pre-commit",
"pydantic",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-docker",
"pytest-env",
"pytest-xdist",
"renovate",
"ruff",
"sonarqube",
"typer",
"uv",
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Framework :: AsyncIO",
"Framework :: OpenTelemetry :: Instrumentations",
"Framework :: Pydantic",
"Framework :: Pytest",
"Typing :: Typed",
"Natural Language :: English",
]
requires-python = ">= 3.11, < 4.0"
dependencies = [
"pydantic>=2.10.6",
"pydantic-settings>=2.8.1",
"mcp>=1.2.0",
"griffe>=1.5.7",
"typer>=0.15.2",
"atlassian-python-api>=3.41.19",
"python-dotenv>=1.0.1",
"logfire[system-metrics]>=3.6.4",
"opentelemetry-api>=1.30.0",
"opentelemetry-instrumentation>=0.50b0",
"opentelemetry-instrumentation-httpx>=0.50b0",
"opentelemetry-instrumentation-starlette>=0.50b0",
"opentelemetry-instrumentation-urllib>=0.50b0",
"opentelemetry-instrumentation-sqlite3>=0.50b0",
"opentelemetry-instrumentation-requests>=0.50b0",
"opentelemetry-instrumentation-urllib3>=0.50b0",
"email-validator>=2.2.0",
"protego>=0.4.0",
"beautifulsoup4>=4.13.3",
"markdownify>=1.0.0",
"strip-markdown>=1.3",
"markdown>=3.7",
"readabilipy>=0.3.0",
"markitdown[all]>=0.0.2",
"cryptography>=44.0.1",
"brave-search-python-client>=0.3.12",
"enum-tools>=0.12.0",
"sphinx-toolbox>=3.8.3",
"pymupdf4llm>=0.0.17",
"pymupdf==1.25.2", # explicitely required as 1.25.3 misses the linux/arm64 wheel and pympudf4llm requires unpinned
]
[project.scripts]
starbridge = "starbridge.cli:cli"
[project.urls]
Homepage = "https://starbridge.readthedocs.io/en/latest/"
Documentation = "https://starbridge.readthedocs.io/en/latest/"
Source = "https://github.com/helmut-hoffer-von-ankershoffen/starbridge"
Changelog = "https://github.com/helmut-hoffer-von-ankershoffen/starbridge/releases"
Issues = "https://github.com/helmut-hoffer-von-ankershoffen/starbridge/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.optional-dependencies]
imaging = ["cairosvg>=2.7.1", "svglib>=1.5.1"]
notebooks = ["jupyter >= 1.1.1", "marimo>=0.11.17", "jinja2 >=3.1.6"]
[dependency-groups]
dev = [
"autodoc-pydantic >= 2.2.0",
"bump-my-version >= 1.0.1",
"cyclonedx-py >= 1.0.1",
"detect-secrets >= 1.5.0",
"enum-tools >= 0.12.0",
"furo >= 2024.8.6",
"git-cliff >= 2.8.0",
"mypy >= 1.5.0",
"nox[uv] >= 2025.2.9",
"pip-audit >= 2.8.0",
"pip-licenses >= 5.0.0",
"pre-commit >= 4.1.0",
"pyright >= 1.1.396",
"pytest >= 8.3.5",
"pytest-asyncio >= 0.25.3",
"pytest-cov >= 6.0.0",
"pytest-docker >= 3.2.0",
"pytest-env >= 1.1.5",
"pytest-xdist[psutil] >= 3.6.1",
"ruff >= 0.9.10",
"sphinx >= 8.2.3",
"sphinx-autobuild >= 2024.10.3",
"sphinx-copybutton >= 0.5.2",
"sphinx-inline-tabs >= 2023.4.21",
"sphinx-mdinclude >= 0.6.2",
"sphinxext.opengraph >= 0.9.1",
"sphinx-pydantic >= 0.1.1",
"sphinx-rtd-theme >= 3.0.2",
"sphinx-toolbox >= 3.9.0",
"sphinxext-opengraph >= 0.9.1",
"tomli >= 2.1.0",
"matplotlib >= 3.10.1",
"pytest-regressions >= 2.7.0",
]
[tool.ruff]
target-version = "py311"
preview = true
fix = true
line-length = 120
extend-exclude = [".fixme", "notebook.py"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN002", # missing type annotation for `*args` -> provides no value
"ANN003", # missing type annotation for `**kwargs`` -> provides no value
"ASYNC109", # async function definition with a `timeout` parameter -> as mentioned by ruff, "This rule is highly opinionated and may not be suitable for all use cases."
"CPY001", # missing copyright notice -> not for OSS
"DOC502", # docstrings with exceptions not raised in the code of the function -> not always necessary
"D203", # incomptatible with D211 -> prefer D211
"D212", # incompatible with D213 -> prefer D213
"FBT001", # boolean positional arguments -> disagree
"FBT002", # boolean defautl value positionl arguments -> disagree
"FBT003", # boolean positional value in function call -> disagree
"PGH003", # use specific rule codes when ignoring type issues -> quite a hassle, no value
"TRY300", # else instead of return before except. -> strongly disagree, hinders readabilty.
"COM812", # conflicts with ruff formatter -> not feasible nor recommended
"ISC001", # conflicts with ruff formatter -> not feasible nor recommended
"S404", # subprocess` module is possibly insecure -> as mentioned by ruff, unstable and preview
"FIX002", # line contains todo -> yes, that's what todo's are for?!
"TD003", # missing issue link for todo -> not in OSS
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
# we are more relaxed in tests, while sill applying hundreds of rules
"S101", # asserts allowed in tests...
"ARG", # unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"PLR2004", # magic value used in comparison, ...
"PT011", # exception to broad
"PLC2701", # private import, but required for unit testing
"PLC0415", # local import
"PT012", # exception to broad
"S311", # standard pseudo-random generators are not suitable for cryptographic purposes
"SLF001", # private member access required for unit testing
"S603", # check for execution of untrusted input
"ANN001", # missing type annotation for function argument
"ANN002", # missing type annotation
"ANN003", # missing type annotation
"ANN202", # missing return type annotation
"PTH123", # use of open to be replaced with Path.open
"DOC201", # `return` is not documented in docstring
"ASYNC230", # async functions should not open files with blocking methods like `open`
"S104", # bind to all ports
"S607", # subprocess with partial path
]
[tool.ruff.lint.extend-per-file-ignores]
"examples/notebook.py" = [
# we are more relaxed in notebooks, while sill applying hundreds of rules
"B018", # notebooks surface variable without print
]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
junit_xml = "mypi_junit.xml"
plugins = "pydantic.mypy"
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
[tool.pydantic-mypy] # https://docs.pydantic.dev/latest/integrations/mypy/#configuring-the-plugin
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest.ini_options]
addopts = "-v --cov=starbridge --cov-report=term-missing --cov-report=xml:coverage.xml --cov-report=html:coverage_html"
testpaths = ["tests"]
python_files = ["*_test.py"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
env = ["COVERAGE_FILE=.coverage", "COVERAGE_PROCESS_START=pyproject.toml"]
markers = [
"sequential: exclude from parallel test execution",
"no_extras: tests that do require no extras installed",
]
[tool.coverage.run]
sigterm = true
relative_files = true
source = ["src"]
omit = ["src/starbridge/instrumentation/*"]
branch = true
parallel = true
concurrency = ["thread", "multiprocessing"]
[tool.coverage.paths]
source = ["src/"]
[tool.bumpversion]
current_version = "0.0.77"
8parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = "--no-verify"
setup_hooks = []
pre_commit_hooks = [
"uv sync",
"git add uv.lock",
"git-cliff --tag $BVHOOK_NEW_VERSION",
"rm -f CHANGELOG.md.tmp",
"git add CHANGELOG.md",
]
post_commit_hooks = []
[[tool.bumpversion.files]]
filename = "pyproject.toml"
[[tool.bumpversion.files]]
filename = "VERSION"
[[tool.bumpversion.files]]
filename = "sonar-project.properties"
[[tool.bumpversion.files]]
filename = "docs/source/conf.py"
[tool.git-cliff.remote.github]
owner = "helmut-hoffer-von-ankershoffen"
repo = "starbridge"
[tool.git-cliff.changelog]
output = "CHANGELOG.md"
render = true
# template for the changelog header
header = """
[⭐ Starbridge](https://starbridge.readthedocs.io/en/latest/)\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% macro print_commit(commit) -%}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }} - \
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
{% endmacro -%}
{% if version %}\
{% if previous.version %}\
## [{{ version | trim_start_matches(pat="v") }}]\
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| unique(attribute="message")
| filter(attribute="scope")
| sort(attribute="scope") %}
{{ self::print_commit(commit=commit) }}
{%- endfor %}
{% for commit in commits
| unique(attribute="message") %}
{%- if not commit.scope -%}
{{ self::print_commit(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{%- if github -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
## New Contributors ❤️
{% endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{%- endfor -%}
{%- endif %}
"""
# template for the changelog footer
footer = """
"""
## [{{ version | trim_start_matches(pat="v") }}]\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
## [unreleased]
### {{ group | striptags | trim | upper_first }}
## New Contributors ❤️
# remove the leading and trailing whitespace from the templates
trim = true
# postprocessors
postprocessors = [
{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
]
[tool.git-cliff.git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor\\(clippy\\)", skip = true },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore\\(npm\\).*yarn\\.lock", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# regex for matching git tags
tag_pattern = "v[0-9].*"
# regex for skipping tags
skip_tags = "beta|alpha"
# regex for ignoring tags
ignore_tags = "rc"
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "newest"