Skip to content

Commit b4f118b

Browse files
committed
Modernize packaging, and update Python support
Summary: - Switch to PEP 621 pyproject.toml with Hatch & VCS-based versioning (hatch-vcs) - Remove legacy setup.py and setup.cfg - Update supported Python versions to 3.9–3.13 in tox and CI - Upgrade github actions Refactor tox.ini: - Remove python setup.py sdist from docs env - Add flake8 as a dependency for pep8 env - Clean up and document Sphinx build process - Remove all references to unsupported Python versions (3.6–3.8) - Ensure all test/lint/build workflows are modern and reproducible Adding Changelog file that was previously auto-generated.
1 parent 5bc8e07 commit b4f118b

File tree

7 files changed

+62
-89
lines changed

7 files changed

+62
-89
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python: ["3.9", "3.10", "3.11", "3.12"]
11+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -50,7 +50,7 @@ jobs:
5050
- name: Build package
5151
run: python -m build
5252
- name: upload windows dists
53-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
5454
with:
5555
name: release-dists
5656
path: dist/

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.tox
22
*.egg-info
33
/AUTHORS
4-
/ChangeLog
54
dist/
65
doc/build
76
.coverage

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ChangeLog
2+
=========

pyproject.toml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "beagle"
7+
description = "Command Line Client for Hound"
8+
readme = "README.rst"
9+
requires-python = ">=3.9"
10+
license = { text = "Apache-2.0" }
11+
authors = [
12+
{ name = "Doug Hellmann", email = "[email protected]" }
13+
]
14+
classifiers = [
15+
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13"
20+
]
21+
dependencies = []
22+
dynamic = ["version"]
23+
24+
[project.scripts]
25+
beagle = "beagle.app:main"
26+
27+
[tool.hatch.version]
28+
source = "vcs"
29+
30+
[tool.hatch.build.targets.sdist]
31+
include = [
32+
"/beagle",
33+
"/README.rst",
34+
"/LICENSE"
35+
]
36+
37+
[project.entry-points."beagle.cli"]
38+
search = "beagle.search:Search"
39+
40+
[project.entry-points."cliff.formatter.list"]
41+
grep = "beagle.grep_formatter:GrepFormatter"
42+
link = "beagle.openstack:OSLinkFormatter"
43+
44+
[project.entry-points."openstack.cli"]
45+
code_search = "beagle.search:Search"
46+
47+
[project.optional-dependencies]
48+
test = [
49+
"coverage",
50+
"pytest",
51+
"pytest-cov",
52+
"testtools",
53+
"fixtures",
54+
"flake8"
55+
]

setup.cfg

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

setup.py

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

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 3.2.0
3-
envlist = py38,pep8
3+
envlist = py39,py310,py311,py312,py313,pep8
44

55
[testenv]
66
usedevelop = True
@@ -12,6 +12,7 @@ deps = .[test]
1212
commands = {posargs}
1313

1414
[testenv:pep8]
15+
deps = flake8
1516
commands = flake8 {posargs}
1617

1718
[testenv:cover]
@@ -27,8 +28,7 @@ commands =
2728
[testenv:docs]
2829
deps = -r{toxinidir}/doc/requirements.txt
2930
commands =
30-
python setup.py sdist
31-
sphinx-build -a -E -W -b html doc/source doc/build/html;;
31+
sphinx-build -a -E -W -b html doc/source doc/build/html
3232

3333
[flake8]
3434
# E123, E125 skipped as they are invalid PEP-8.

0 commit comments

Comments
 (0)