-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (153 loc) · 4.63 KB
/
Copy pathpyproject.toml
File metadata and controls
178 lines (153 loc) · 4.63 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
[build-system]
requires = [
"setuptools==83.0.0",
"autocalver",
]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
name = "beeware-docs-tools"
description = "Tools for building BeeWare's documentation with a common theme and translations."
readme = "README.md"
requires-python = ">= 3.12"
license = "BSD-3-Clause"
license-files = [
"LICENSE",
]
authors = [
{name="Kattni", email="kattni@kattni.com"},
]
maintainers = [
{name="BeeWare Team", email="team@beeware.org"},
]
dependencies = [
"click==8.4.0",
"deepl==1.30.0",
"markdown-checker==1.2.1",
"mistletoe==1.6.0",
"mkdocs-autorefs==1.4.4",
"mkdocs-literate-nav==0.6.3", # DO NOT UPGRADE - Uncertain whether author's move to ProperDocs will cause incompatibility
"mkdocs-macros-plugin @ git+https://github.com/kattni/mkdocs-macros-plugin@include-dir-multiple-directories",
"mkdocs-material==9.7.6",
"mkdocs-rss-plugin==1.19.0",
"mkdocs==1.6.1", # DO NOT UPGRADE - 2+ is not compatible with anything here
"mkdocstrings-python==2.0.5",
"pymdown-extensions==11.0.1",
"pyspelling==2.12.1",
"python-Levenshtein==0.27.3",
"PyYAML==6.0.3",
"polib==1.2.0",
"ruff==0.15.21",
"setuptools_scm==10.2.0",
"translate-toolkit==3.19.13",
]
[dependency-groups]
# Extras used by developers *of* beeware-docs-tools are pinned to specific versions to
# ensure environment consistency.
pre-commit = [
"pre-commit == 4.6.0",
]
tox-uv = [
"tox-uv == 1.35.2",
]
wlc = [
"wlc == 2.1.0",
]
dev = [
{include-group = "pre-commit"},
{include-group = "tox-uv"},
]
test = [
"pytest == 9.1.1",
"pytest-xdist == 3.8.0",
]
translate = [
{include-group = "tox-uv"},
{include-group = "wlc"},
]
[project.urls]
Homepage = "https://beeware.org/"
Funding = "https://beeware.org/contributing/membership/"
Tracker = "https://github.com/beeware/beeware-docs-tools/issues/"
Source = "https://github.com/beeware/beeware-docs-tools/"
[project.scripts]
build_md_translations = "beeware_docs_tools.build_md_translations:main"
build_po_translations = "beeware_docs_tools.build_po_translations:main"
build_pot_translations = "beeware_docs_tools.build_pot_translations:main"
live_serve_en = "beeware_docs_tools.live_serve_en:main"
update_machine_translations = "beeware_docs_tools.update_machine_translations:main"
[tool.ruff]
target-version = "py312"
[tool.ruff.lint]
# In addition to the default rules, these additional rules will be used:
extend-select = [
"E", # pycodestyle
"W", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"YTT", # flake8-2020
"ASYNC", # flake8-async
"C4", # flake8-comprehensions
"I", # isort
# The SIM rules are *very* opinionated, and don't necessarily make for better code.
# They may be worth occasionally turning on just to see if something could actually
# use improvement.
# "SIM", # flake8-simplify
]
ignore = [
"E501", # Allow long Markdown/Jinja translation examples and diagnostics.
]
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = [
"beeware_docs_tools",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
"error",
]
[tool.rumdl]
flavor = "mkdocs"
include = ["**/*.md"]
exclude = ["docs/en/SUMMARY.md", "comment.md", "CODE_OF_CONDUCT.md"]
respect-gitignore = true
# Disable rules:
# MD014: Force commands in codeblocks to show output
disable = ["MD014"]
[tool.rumdl.per-file-ignores]
# MD002: First heading should be level 1, found level 2; title will be included in the target page
# MD034: URL without angle brackets or link formatting; triggers on URLs with Jinja variable included
# MD041: First line in file should be level 1 heading; title will be included in the target page
"src/beeware_docs_tools/shared_content/en/*.md" = ["MD002", "MD034", "MD041",]
[tool.rumdl.MD013] # Line length
line_length = 999999 # Force reflow to paragraph content to remove linebreaks
reflow = true
reflow_mode = "normalize"
[tool.rumdl.MD026] # Remove punctuation at the end of headings
punctuation = ",;:"
[tool.rumdl.MD033] # No inline HTML
allowed_elements = ["nospell",] # pyspelling inline disable tag
[tool.rumdl.MD061]
terms = ["TODO"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
beeware_docs_tools = [
"**/*.html",
"**/*.css",
"**/*.js",
"**/*.png",
"**/*.woff2",
"**/*.po",
"**/*.md",
]
[tool.autocalver]
use = true
log = "git-log-head"
log_command = "git log -n 1 --date=iso"
is_main_var = "BUILD_BRANCH_REF"
is_main_match = ".*/main$"