-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathpyproject.toml
177 lines (161 loc) · 5.8 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "gvm-tools"
version = "25.3.1.dev1"
authors = ["Greenbone AG <[email protected]>"]
description = "Tools to control a GSM/GVM over GMP or OSP"
license = "GPL-3.0-or-later"
readme = "README.md"
homepage = "https://github.com/greenbone/gvm-tools/"
repository = "https://github.com/greenbone/gvm-tools/"
documentation = "https://greenbone.github.io/gvm-tools/"
classifiers = [
# Full list: https://pypi.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
]
packages = [
{ include = "gvmtools" },
{ include = "tests", format = "sdist" },
{ include = "scripts", format = "sdist" },
]
[tool.poetry.scripts]
gvm-pyshell = "gvmtools.pyshell:main"
gvm-cli = "gvmtools.cli:main"
gvm-script = "gvmtools.script:main"
[tool.poetry.dependencies]
python = "^3.9.2"
python-gvm = ">=23.4.2"
[tool.poetry.group.dev.dependencies]
autohooks = ">=22.8.0"
autohooks-plugin-ruff = ">=23.6.1"
autohooks-plugin-black = ">=22.8.1"
pontos = ">=22.8.1"
sphinx = ">=5.3.0"
coverage = ">=7.2"
rope = ">=1.9.0"
furo = ">=2023.3.27"
sphinx-autobuild = ">=2021.3.14"
myst-parser = ">=2.0.0"
git-cliff = "^2.8.0"
[tool.black]
line-length = 80
target-version = ['py39', 'py310', 'py311', 'py312']
exclude = '''
/(
\.git
| \.venv
| \.github
| \.vscode
| _build
| build
| dist
| docs
)/
'''
[tool.autohooks]
mode = "poetry"
pre-commit = ['autohooks.plugins.black', 'autohooks.plugins.ruff']
[tool.ruff]
line-length = 80
target-version = "py39"
[tool.ruff.lint]
extend-select = ["I", "PLE", "PLW"]
[tool.coverage.run]
omit = ["tests/*"]
source = ["gvmtools", "scripts"]
[tool.pontos.version]
version-module-file = "gvmtools/__version__.py"
[tool.git-cliff.changelog]
# template for the changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\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 -%}
{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else -%}
## [Unreleased]
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
{% if commit.remote.username %} by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}){%- endif -%}
{% if commit.remote.pr_number %} in \
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
{% elif commit.id %} in \
[{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})\
{%- endif -%}
{% endfor %}
{% endfor -%}
"""
# template for the changelog footer
footer = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% for release in releases %}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
{{ self::remote_url() }}/compare/{{ release.previous.version }}..{{ release.version }}
{% endif -%}
{% else -%}
[unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}..HEAD
{% endif -%}
{%- endfor -%}
"""
# remove the leading and trailing whitespace from the templates
trim = true
[tool.git-cliff.git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not following the conventional commits format
filter_unconventional = false
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# remove issue numbers from commits
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^[a|A]dd", group = "<!-- 1 -->:sparkles: Added" },
{ message = "^[c|C]hange", group = "<!-- 2 -->:construction_worker: Changed" },
{ message = "^[f|F]ix", group = "<!-- 3 -->:bug: Bug Fixes" },
{ message = "^[r|R]emove", group = "<!-- 4 -->:fire: Removed" },
{ message = "^[d|D]rop", group = "<!-- 4 -->:fire: Removed" },
{ message = "^[d|D]oc", group = "<!-- 5 -->:books: Documentation" },
{ message = "^[t|T]est", group = "<!-- 6 -->:white_check_mark: Testing" },
{ message = "^[c|C]hore", group = "<!-- 7 -->:wrench: Miscellaneous" },
{ message = "^[c|C]i", group = "<!-- 7 -->️:wrench: Miscellaneous" },
{ message = "^[m|M]isc", group = "<!-- 7 -->:wrench: Miscellaneous" },
{ message = "^[d|D]eps", group = "<!-- 8 -->:ship: Dependencies" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"