1
1
[build-system ]
2
+ build-backend = " setuptools.build_meta"
2
3
requires = [
3
- " setuptools >= 65.3.0" , # required by pyproject+setuptools_scm integration
4
- " setuptools_scm[toml] >= 7.0.5" , # required for "no-local-version" scheme
5
-
4
+ " setuptools >= 65.3.0" , # required by pyproject+setuptools_scm integration and editable installs
5
+ " setuptools_scm[toml] >= 7.0.5" # required for "no-local-version" scheme
6
6
]
7
- build-backend = " setuptools.build_meta"
8
7
9
8
[project ]
10
- requires-python = " >=3.10"
11
- dynamic = [" version" , " dependencies" , " optional-dependencies" ]
12
- name = " mkdocs-ansible"
13
- description = " Ansible MkDocs Theme based on mkdocs-material"
14
- readme = " docs/README.md"
15
- authors = [{
"name" =
" Ansible by Red Hat" ,
"email" =
" [email protected] " }]
16
- maintainers = [{
"name" =
" Ansible by Red Hat" ,
"email" =
" [email protected] " }]
17
- license = { text = " MIT" }
9
+ authors = [{
"email" =
" [email protected] " ,
"name" =
" Ansible by Red Hat" }]
18
10
classifiers = [
19
11
" Development Status :: 5 - Production/Stable" ,
20
12
" Environment :: Web Environment" ,
@@ -28,39 +20,61 @@ classifiers = [
28
20
' Programming Language :: Python :: 3.13' ,
29
21
" Topic :: Documentation" ,
30
22
" Topic :: Software Development :: Documentation" ,
31
- " Topic :: Text Processing :: Markup :: HTML" ,
23
+ " Topic :: Text Processing :: Markup :: HTML"
32
24
]
25
+ description = " Ansible MkDocs Theme based on mkdocs-material"
26
+ dynamic = [" version" , " dependencies" , " optional-dependencies" ]
33
27
keywords = [" ansible" , " mkdocs" , " theme" ]
28
+ license = {text = " MIT" }
29
+ maintainers = [{
"email" =
" [email protected] " ,
"name" =
" Ansible by Red Hat" }]
30
+ name = " mkdocs-ansible"
31
+ readme = " docs/README.md"
32
+ requires-python = " >=3.10"
33
+
34
+ [project .entry-points ."mkdocs .themes" ]
35
+ ansible = " mkdocs_ansible"
34
36
35
37
[project .urls ]
36
- homepage = " https://github.com/ansible/mkdocs-ansible"
38
+ changelog = " https://github.com/ansible/mkdocs-ansible/releases "
37
39
documentation = " https://ansible.readthedocs.io/projects/mkdocs-ansible/"
40
+ homepage = " https://github.com/ansible/mkdocs-ansible"
38
41
repository = " https://github.com/ansible/mkdocs-ansible"
39
- changelog = " https://github.com/ansible/mkdocs-ansible/releases"
40
42
43
+ [tool .codespell ]
44
+ # indention is a typo in ruamel.yaml's API
45
+ ignore-words-list = " indention"
46
+ skip = " .tox,.mypy_cache,build,.git,.eggs,pip-wheel-metadata"
41
47
42
- [project .entry-points ."mkdocs .themes" ]
43
- ansible = " mkdocs_ansible"
48
+ # Keep this default because xml/report do not know to use load it from config file:
49
+ # data_file = ".coverage"
50
+ [tool .coverage .paths ]
51
+ source = [" src" , " .tox/*/site-packages" ]
44
52
45
53
[tool .coverage .report ]
46
- exclude_lines = [" pragma: no cover" , " if TYPE_CHECKING:" ]
47
- omit = [" test/*" , " src/mkdocs_ansible/_version.py" ]
54
+ exclude_also = [" pragma: no cover" , " if TYPE_CHECKING:" ]
48
55
# Increase it just so it would pass on any single-python run
49
56
fail_under = 82
50
- skip_covered = true
51
- skip_empty = true
52
57
# During development we might remove code (files) with coverage data, and we dont want to fail:
53
58
ignore_errors = true
59
+ omit = [" test/*" , " src/mkdocs_ansible/_version.py" ]
54
60
show_missing = true
61
+ skip_covered = true
62
+ skip_empty = true
55
63
56
64
[tool .coverage .run ]
65
+ concurrency = [" multiprocessing" , " thread" ]
66
+ # Do not use branch until bug is fixes:
67
+ # https://github.com/nedbat/coveragepy/issues/605
68
+ # branch = true
69
+ parallel = true
57
70
source = [" src" ]
58
71
59
72
[tool .mypy ]
60
- strict = true
73
+ exclude = " (.config|build|dist|test/local-content|site-packages|~/.pyenv|examples/playbooks/collections|plugins/modules)"
74
+ # https://github.com/python/mypy/issues/12664
61
75
python_version = " 3.10"
76
+ strict = true
62
77
warn_unused_configs = true
63
- exclude = [' build' ]
64
78
65
79
[[tool .mypy .overrides ]]
66
80
module = [" mkdocs_ansible._version" ]
@@ -73,19 +87,46 @@ warn_unused_ignores = false # https://github.com/python/mypy/issues/13201
73
87
[tool .pylint .MASTER ]
74
88
ignore-paths = " ^src/.*/(_version|_vendor).*$"
75
89
76
- [tool .setuptools .dynamic ]
77
- dependencies = { file = [" .config/requirements.in" ] }
78
- optional-dependencies.test = { file = [" .config/requirements-test.in" ] }
90
+ [tool .ruff ]
91
+ cache-dir = " ./.cache/.ruff"
92
+ exclude = [" .config" ]
93
+ fix = true
94
+ # Same as Black.
95
+ line-length = 88
96
+ preview = true
97
+
98
+ [tool .ruff .lint .pydocstyle ]
99
+ convention = " google"
79
100
80
101
[tool .setuptools ]
81
102
include-package-data = true
82
103
104
+ [tool .setuptools .dynamic ]
105
+ dependencies = {file = [" .config/requirements.in" ]}
106
+ optional-dependencies.test = {file = [" .config/requirements-test.in" ]}
107
+
83
108
[tool .setuptools .package-data ]
84
109
"*" = [" *.css" , " *.html" , " *.js" ]
85
110
86
111
[tool .setuptools .packages .find ]
87
112
where = [" src" ]
88
113
89
114
[tool .setuptools_scm ]
115
+ # To prevent accidental pick of mobile version tags such 'v6'
116
+ git_describe_command = [
117
+ " git" ,
118
+ " describe" ,
119
+ " --dirty" ,
120
+ " --long" ,
121
+ " --tags" ,
122
+ " --match" ,
123
+ " v*.*"
124
+ ]
90
125
local_scheme = " no-local-version"
126
+ tag_regex = " ^(?P<prefix>v)?(?P<version>\\ d+[^\\ +]*)(?P<suffix>.*)?$"
91
127
write_to = " src/mkdocs_ansible/_version.py"
128
+
129
+ [tool .tomlsort ]
130
+ in_place = true
131
+ sort_inline_tables = true
132
+ sort_table_keys = true
0 commit comments