| 1 |
[project] |
| 2 |
name = "greenbone-feed-sync" |
| 3 |
version = "25.1.3.dev1" |
| 4 |
description = "A tool for downloading the Greenbone Community Feed" |
| 5 |
authors = [ |
| 6 |
{name = "Björn Ricks", email = "[email protected]"} |
| 7 |
] |
| 8 |
license = "GPL-3.0-or-later" |
| 9 |
readme = "README.md" |
| 10 |
|
| 11 |
[tool.poetry] |
| 12 |
name = "greenbone-feed-sync" |
| 13 |
version = "25.1.4.dev1" |
| 14 |
description = "A tool for downloading the Greenbone Community Feed" |
| 15 |
authors = ["Björn Ricks <[email protected]>"] |
| 16 |
license = "GPL-3.0-or-later" |
| 17 |
readme = "README.md" |
| 18 |
|
| 19 |
classifiers = [ |
| 20 |
# Full list: https://pypi.org/pypi?%3Aaction=list_classifiers |
| 21 |
"Development Status :: 5 - Production/Stable", |
| 22 |
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", # pylint: disable=line-too-long |
| 23 |
"Environment :: Console", |
| 24 |
"Programming Language :: Python :: 3.9", |
| 25 |
"Programming Language :: Python :: 3.10", |
| 26 |
"Programming Language :: Python :: 3.11", |
| 27 |
"Programming Language :: Python :: 3.12", |
| 28 |
"Operating System :: OS Independent", |
| 29 |
"Topic :: Utilities", |
| 30 |
] |
| 31 |
|
| 32 |
packages = [ |
| 33 |
{ include = "greenbone" }, |
| 34 |
{ include = "tests", format = "sdist" }, |
| 35 |
{ include = "poetry.lock", format = "sdist" }, |
| 36 |
] |
| 37 |
|
| 38 |
[tool.poetry.dependencies] |
| 39 |
python = "^3.9" |
| 40 |
rich = ">=13.2.0" |
| 41 |
tomli = { version = ">=2.0.1", python = "<3.11" } |
| 42 |
shtab = ">=1.6.5" |
| 43 |
|
| 44 |
[tool.poetry.group.dev.dependencies] |
| 45 |
autohooks-plugin-black = ">=22.11.0" |
| 46 |
autohooks-plugin-ruff = ">=23.6.0" |
| 47 |
autohooks-plugin-mypy = ">=23.3.0" |
| 48 |
pontos = ">=22.12.2" |
| 49 |
coverage = { extras = ["toml"], version = ">=7.1.0" } |
| 50 |
git-cliff = "^2.8.0" |
| 51 |
|
| 52 |
[tool.poetry.scripts] |
| 53 |
greenbone-feed-sync = 'greenbone.feed.sync.main:main' |
| 54 |
greenbone-nvt-sync = 'greenbone.feed.sync.main:main' |
| 55 |
greenbone-scapdata-sync = 'greenbone.feed.sync.main:main' |
| 56 |
greenbone-certdata-sync = 'greenbone.feed.sync.main:main' |
| 57 |
|
| 58 |
[build-system] |
| 59 |
requires = ["poetry-core"] |
| 60 |
build-backend = "poetry.core.masonry.api" |
| 61 |
|
| 62 |
[tool.black] |
| 63 |
line-length = 80 |
| 64 |
target-version = ['py39', 'py310', 'py311', 'py312'] |
| 65 |
exclude = ''' |
| 66 |
/( |
| 67 |
\.git |
| 68 |
| \.venv |
| 69 |
| \.github |
| 70 |
| \.vscode |
| 71 |
| _build |
| 72 |
| build |
| 73 |
| dist |
| 74 |
| docs |
| 75 |
)/ |
| 76 |
''' |
| 77 |
|
| 78 |
[tool.autohooks] |
| 79 |
pre-commit = [ |
| 80 |
'autohooks.plugins.black', |
| 81 |
'autohooks.plugins.ruff', |
| 82 |
'autohooks.plugins.mypy', |
| 83 |
] |
| 84 |
mode = "poetry" |
| 85 |
|
| 86 |
[tool.pontos.version] |
| 87 |
version-module-file = "greenbone/feed/sync/__version__.py" |
| 88 |
|
| 89 |
[tool.isort] |
| 90 |
profile = "black" |
| 91 |
line_length = 80 |
| 92 |
|
| 93 |
[tool.ruff] |
| 94 |
line-length = 80 |
| 95 |
target-version = "py39" |
| 96 |
|
| 97 |
[tool.ruff.lint] |
| 98 |
extend-select = ["I", "PLE", "PLW"] |
| 99 |
|
| 100 |
[tool.coverage.run] |
| 101 |
omit = ["tests/*", "*/__init__.py"] |
| 102 |
source = ["greenbone"] |
| 103 |
|
| 104 |
[tool.mypy] |
| 105 |
files = "greenbone" |
| 106 |
ignore_missing_imports = true |
| 107 |
explicit_package_bases = true |
| 108 |
|
| 109 |
[tool.git-cliff.changelog] |
| 110 |
# template for the changelog header |
| 111 |
header = """ |
| 112 |
# Changelog\n |
| 113 |
All notable changes to this project will be documented in this file. |
| 114 |
|
| 115 |
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 116 |
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n |
| 117 |
""" |
| 118 |
# template for the changelog body |
| 119 |
# https://keats.github.io/tera/docs/#introduction |
| 120 |
body = """ |
| 121 |
{%- macro remote_url() -%} |
| 122 |
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} |
| 123 |
{%- endmacro -%} |
| 124 |
|
| 125 |
{% if version -%} |
| 126 |
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 127 |
{% else -%} |
| 128 |
## [Unreleased] |
| 129 |
{% endif -%} |
| 130 |
|
| 131 |
{% for group, commits in commits | group_by(attribute="group") %} |
| 132 |
### {{ group | upper_first }} |
| 133 |
{% for commit in commits %} |
| 134 |
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\ |
| 135 |
{% if commit.remote.username %} by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}){%- endif -%} |
| 136 |
{% if commit.remote.pr_number %} in \ |
| 137 |
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ |
| 138 |
{% elif commit.id %} in \ |
| 139 |
[{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})\ |
| 140 |
{%- endif -%} |
| 141 |
{% endfor %} |
| 142 |
{% endfor -%} |
| 143 |
""" |
| 144 |
# template for the changelog footer |
| 145 |
footer = """ |
| 146 |
{%- macro remote_url() -%} |
| 147 |
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} |
| 148 |
{%- endmacro -%} |
| 149 |
|
| 150 |
{% for release in releases %} |
| 151 |
{% if release.version -%} |
| 152 |
{% if release.previous.version -%} |
| 153 |
[{{ release.version | trim_start_matches(pat="v") }}]: \ |
| 154 |
{{ self::remote_url() }}/compare/{{ release.previous.version }}..{{ release.version }} |
| 155 |
{% endif -%} |
| 156 |
{% else -%} |
| 157 |
[unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}..HEAD |
| 158 |
{% endif -%} |
| 159 |
{%- endfor -%} |
| 160 |
""" |
| 161 |
# remove the leading and trailing whitespace from the templates |
| 162 |
trim = true |
| 163 |
|
| 164 |
[tool.git-cliff.git] |
| 165 |
# parse the commits based on https://www.conventionalcommits.org |
| 166 |
conventional_commits = true |
| 167 |
# filter out the commits that are not following the conventional commits format |
| 168 |
filter_unconventional = false |
| 169 |
# process each line of a commit as an individual commit |
| 170 |
split_commits = false |
| 171 |
# regex for preprocessing the commit messages |
| 172 |
commit_preprocessors = [ |
| 173 |
# remove issue numbers from commits |
| 174 |
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, |
| 175 |
] |
| 176 |
# regex for parsing and grouping commits |
| 177 |
commit_parsers = [ |
| 178 |
{ message = "^[a|A]dd", group = "<!-- 1 -->:sparkles: Added" }, |
| 179 |
{ message = "^[c|C]hange", group = "<!-- 2 -->:construction_worker: Changed" }, |
| 180 |
{ message = "^[f|F]ix", group = "<!-- 3 -->:bug: Bug Fixes" }, |
| 181 |
{ message = "^[r|R]emove", group = "<!-- 4 -->:fire: Removed" }, |
| 182 |
{ message = "^[d|D]rop", group = "<!-- 4 -->:fire: Removed" }, |
| 183 |
{ message = "^[d|D]oc", group = "<!-- 5 -->:books: Documentation" }, |
| 184 |
{ message = "^[t|T]est", group = "<!-- 6 -->:white_check_mark: Testing" }, |
| 185 |
{ message = "^[c|C]hore", group = "<!-- 7 -->:wrench: Miscellaneous" }, |
| 186 |
{ message = "^[c|C]i", group = "<!-- 7 -->️:wrench: Miscellaneous" }, |
| 187 |
{ message = "^[m|M]isc", group = "<!-- 7 -->:wrench: Miscellaneous" }, |
| 188 |
{ message = "^[d|D]eps", group = "<!-- 8 -->:ship: Dependencies" }, |
| 189 |
] |
| 190 |
# filter out the commits that are not matched by commit parsers |
| 191 |
filter_commits = true |
| 192 |
# sort the tags topologically |
| 193 |
topo_order = false |
| 194 |
# sort the commits inside sections by oldest/newest order |
| 195 |
sort_commits = "oldest" |