-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathpyproject.toml
176 lines (160 loc) · 5.75 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "python-gvm"
version = "26.1.1.dev1"
description = "Library to communicate with remote servers over GMP or OSP"
license = "GPL-3.0-or-later"
authors = ["Greenbone AG <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/greenbone/python-gvm/"
repository = "https://github.com/greenbone/python-gvm/"
documentation = "https://greenbone.github.io/python-gvm/"
classifiers = [
# Full list: https://pypi.org/pypi?%3Aaction=list_classifiers
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Environment :: Console",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [{ include = "gvm" }, { include = "tests", format = "sdist" }]
[tool.poetry.dependencies]
python = "^3.9.2"
paramiko = ">=2.7.1"
lxml = ">=4.5.0"
[tool.poetry.group.dev.dependencies]
coverage = ">=7.2"
sphinx = ">=5.3.0"
autohooks-plugin-ruff = ">=24.1.0"
autohooks-plugin-black = ">=22.7.0"
autohooks-plugin-mypy = ">=22.7.0"
black = ">=22.6.0"
pontos = ">=22.7.2"
furo = ">=2022.6.21"
lxml-stubs = "^0.5.1"
types-paramiko = "^3.4.0.20240205"
git-cliff = "^2.8.0"
[tool.black]
line-length = 80
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
exclude = '''
/(
\.git
| \.venv
| \.github
| \.vscode
| _build
| build
| dist
| docs
)/
'''
[tool.ruff]
line-length = 80
target-version = "py39"
[tool.ruff.lint]
extend-select = ["I", "PLE", "PLW"]
[tool.autohooks]
mode = "poetry"
pre-commit = ['autohooks.plugins.black', "autohooks.plugins.ruff"]
[tool.coverage.run]
branch = true
omit = ["tests/*", "*/__init__.py"]
source = ["gvm"]
[tool.pontos.version]
version-module-file = "gvm/__version__.py"
[tool.mypy]
files = "gvm"
ignore_missing_imports = true
explicit_package_bases = true
allow_redefinition = true
[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"