Skip to content

Commit 5b2df9a

Browse files
committed
fix: use setuptools-scm and release drafter
- replace in-repo changelog with github releases page - update project metadata - use setuptools-scm auto-versioning based on tags - make use of release-drafter for updating the changelogs
1 parent 58be6ad commit 5b2df9a

4 files changed

Lines changed: 55 additions & 147 deletions

File tree

.github/release-drafter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
# see https://github.com/ansible/team-devtools
3+
_extends: ansible/team-devtools

CHANGELOG.md

Lines changed: 0 additions & 104 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ include *.py
22
include *.txt
33
include *.yaml
44
include .pre-commit-config.yaml
5-
include CHANGELOG.md
65
include LICENSE
76
include tox.ini

pyproject.toml

Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,97 @@
1-
[build-system]
2-
requires = [
3-
"setuptools >= 64.0.0", # required by pyproject+setuptools_scm integration
4-
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme
5-
6-
]
7-
build-backend = "setuptools.build_meta"
8-
91
[project]
10-
# https://peps.python.org/pep-0621/#readme
11-
requires-python = ">=3.8"
12-
version = "0.3.0"
132
name = "pytest-github-actions-annotate-failures"
143
description = "pytest plugin to annotate failed tests with a workflow command for GitHub Actions"
154
readme = "README.md"
5+
# https://peps.python.org/pep-0621/#readme
6+
requires-python = ">=3.8"
7+
license = "MIT"
168
authors = [{ "name" = "utgwkk", "email" = "utagawakiki@gmail.com" }]
179
maintainers = [{ "name" = "utgwkk", "email" = "utagawakiki@gmail.com" }]
18-
license = { text = "MIT" }
10+
keywords = ["ansible", "molecule", "plugin", "testing"]
1911
classifiers = [
2012
"Development Status :: 5 - Production/Stable",
2113
"Environment :: Console",
14+
"Framework :: Pytest",
2215
"Intended Audience :: Developers",
2316
"Intended Audience :: Information Technology",
2417
"Intended Audience :: System Administrators",
25-
"License :: OSI Approved :: MIT License",
26-
"Framework :: Pytest",
18+
"Programming Language :: Python",
2719
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3 :: Only",
2821
"Programming Language :: Python :: 3.8",
2922
"Programming Language :: Python :: 3.9",
3023
"Programming Language :: Python :: 3.10",
3124
"Programming Language :: Python :: 3.11",
3225
"Programming Language :: Python :: 3.12",
3326
"Programming Language :: Python :: 3.13",
3427
"Programming Language :: Python :: 3.14",
35-
"Programming Language :: Python :: 3 :: Only",
36-
"Programming Language :: Python",
37-
"Topic :: System :: Systems Administration",
3828
"Topic :: Software Development :: Quality Assurance",
3929
"Topic :: Software Development :: Testing",
30+
"Topic :: System :: Systems Administration",
4031
"Topic :: Utilities",
4132
]
42-
keywords = ["ansible", "testing", "molecule", "plugin"]
43-
dependencies = [
44-
"pytest>=7.0.0"
45-
]
33+
dependencies = ["pytest>=7.0.0"]
34+
dynamic = ["version"]
4635

4736
[project.urls]
37+
changelog = "https://github.com/pytest-dev/pytest-github-actions-annotate-failures/releases"
4838
homepage = "https://github.com/pytest-dev/pytest-github-actions-annotate-failures"
4939
repository = "https://github.com/pytest-dev/pytest-github-actions-annotate-failures"
50-
changelog = "https://github.com/pytest-dev/pytest-github-actions-annotate-failures/releases"
5140

5241
[project.entry-points.pytest11]
5342
pytest_github_actions_annotate_failures = "pytest_github_actions_annotate_failures.plugin"
5443

5544
[dependency-groups]
56-
dev = [{ include-group = "test"}]
45+
dev = [{ include-group = "test" }]
5746
test = ["packaging"]
5847

48+
[build-system]
49+
requires = [
50+
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme
51+
"setuptools >= 64.0.0", # required by pyproject+setuptools_scm integration
52+
]
53+
build-backend = "setuptools.build_meta"
5954

6055
[tool.ruff.lint]
6156
extend-select = [
62-
"B", # flake8-bugbear
63-
"I", # isort
64-
"ARG", # flake8-unused-arguments
65-
"C4", # flake8-comprehensions
66-
"EM", # flake8-errmsg
67-
"ICN", # flake8-import-conventions
68-
"ISC", # flake8-implicit-str-concat
69-
"G", # flake8-logging-format
70-
"PGH", # pygrep-hooks
71-
"PIE", # flake8-pie
72-
"PL", # pylint
73-
"PT", # flake8-pytest-style
74-
"RET", # flake8-return
75-
"RUF", # Ruff-specific
76-
"SIM", # flake8-simplify
77-
"UP", # pyupgrade
78-
"YTT", # flake8-2020
79-
"EXE", # flake8-executable
57+
"B", # flake8-bugbear
58+
"I", # isort
59+
"ARG", # flake8-unused-arguments
60+
"C4", # flake8-comprehensions
61+
"EM", # flake8-errmsg
62+
"ICN", # flake8-import-conventions
63+
"ISC", # flake8-implicit-str-concat
64+
"G", # flake8-logging-format
65+
"PGH", # pygrep-hooks
66+
"PIE", # flake8-pie
67+
"PL", # pylint
68+
"PT", # flake8-pytest-style
69+
"RET", # flake8-return
70+
"RUF", # Ruff-specific
71+
"SIM", # flake8-simplify
72+
"UP", # pyupgrade
73+
"YTT", # flake8-2020
74+
"EXE", # flake8-executable
8075
]
8176
ignore = [
82-
"PLR", # Design related pylint codes
77+
"PLR", # Design related pylint codes
8378
]
8479
isort.required-imports = ["from __future__ import annotations"]
8580

8681
[tool.ruff.lint.per-file-ignores]
8782
"tests/**" = ["T20"]
83+
84+
[tool.setuptools_scm]
85+
# To prevent accidental pick of mobile version tags such 'v6'
86+
git_describe_command = [
87+
"git",
88+
"describe",
89+
"--dirty",
90+
"--long",
91+
"--tags",
92+
"--match",
93+
"v*.*",
94+
]
95+
local_scheme = "no-local-version"
96+
tag_regex = "^(?P<prefix>v)?(?P<version>\\d+[^\\+]*)(?P<suffix>.*)?$"
97+
# version_file = "src/ansiblelint/_version.py"

0 commit comments

Comments
 (0)