-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
120 lines (101 loc) · 3.76 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
# ┌───────────────────────────────────────────────────────────────┐
# │ Contents of pyproject.toml │
# ├───────────────────────────────────────────────────────────────┘
# │
# ├── Build system
# ├── Project
# ├──┐Tools
# │ └── Git-Cliff
# │
# └───────────────────────────────────────────────────────────────
# ################################################################ Build system
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["toc"]
# ################################################################ Project
[project]
name = "tableofcontents"
version = "2.7.3"
authors = [
{ name="AlphaJack" },
]
description = "Generate a table of contents from the comments of a file"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Documentation",
"Topic :: Text Processing",
"Topic :: Utilities",
"Environment :: Console",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
]
dependencies = [
"importlib_metadata"
]
[project.scripts]
toc = "toc.cli:main"
[project.urls]
Homepage = "https://github.com/AlphaJack/toc"
Issues = "https://github.com/AlphaJack/toc/issues"
Repository = "https://github.com/AlphaJack/toc"
Changelog = "https://github.com/AlphaJack/toc/blob/master/CHANGELOG.md"
# ################################################################ Tools
# ################################ Git-Cliff
[tool.git-cliff.git]
conventional_commits = false
filter_unconventional = false
protect_breaking_commits = true
filter_commits = false
split_commits = true
tag_pattern = "v[0-9].*"
# handled manually
skip_tags = "beta|alpha|v2.0.0|v1.0.0"
ignore_tags = "rc"
sort_commits = "newest"
commit_parsers = [
{ message = "^(feat|[Aa]dd)", group = "Added" },
{ message = "^perf", group = "Performance" },
{ message = "^change", group = "Changed" },
{ message = "^[Dd]oc", group = "Documentation" },
{ message = "^deprecat", group = "Deprecated" },
{ message = "^fix", group = "Fixed" },
{ message = "^remove", group = "Removed" },
{ body = ".*security", group = "Security" },
{ message = "^test", group = "Testing" },
{ message = "^(auto|ci|chore|minor|skip)", skip = true },
{ body = ".*", group = "Various" },
]
[tool.git-cliff.changelog]
trim = true
header = """# Changelog - toc
"""
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}\
{% else %}\
## Work in progress\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}\
- {{ commit.message | split(pat=':') | last | trim | upper_first }}
{% endfor %}\
{% endfor %}\n
"""
footer = """
## [2.0.0] - 2024-01-21
- Rewriten `toc` in pure `python`
- Published to PyPI as [`tableofcontents`](https://pypi.org/project/tableofcontents)
- Added feature to prepend the table of contents to files, preserving shebangs
## [1.0.0] - 2023-11-03
- Initial release of `toc` in `bash`, `perl`, `sed` and `awk`
"""
postprocessors = [
{ pattern = "[Aa]dding", replace = "Added" },
]