Skip to content

Commit fd150fc

Browse files
committed
Use uv to manage the project
1 parent db72e06 commit fd150fc

File tree

10 files changed

+1088
-85
lines changed

10 files changed

+1088
-85
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# publish.yml
2+
3+
name: "Publish"
4+
5+
on:
6+
release:
7+
types: ["published"]
8+
9+
jobs:
10+
run:
11+
name: "Build and publish release"
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
19+
with:
20+
enable-cache: true
21+
cache-dependency-glob: uv.lock
22+
23+
- name: Set up Python
24+
run: uv python install 3.13
25+
26+
- name: Build
27+
run: uv build
28+
29+
- name: Publish
30+
run: uv publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}

.github/workflows/test.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
name: rrmngmnt gatting
22
on:
3-
pull_request:
3+
pull_request:
44
jobs:
55
build:
66
name: Test
77
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
python: ["3.7", "3.8", "3.9"]
8+
119
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-python@v2
14-
with:
15-
python-version: ${{ matrix.python }}
16-
- name: Install dependencies
17-
run: |
18-
pip install tox
19-
- name: Run linters
20-
run: tox -e pep8
21-
- name: Run unit tests
22-
run: tox -e py
10+
- uses: actions/checkout@v4
11+
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v6
14+
15+
- name: Install uv-tox
16+
run: uv tool install tox --with tox-uv
17+
- name: Run linters
18+
run: tox -e pep8
19+
- name: Run tests
20+
run: tox -p -e python

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Install
239239

240240
.. code:: sh
241241
242-
python setup.py devop
242+
pip install python-rrmngmnt
243243
244244
Test
245245
----

pyproject.toml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[build-system]
2+
requires = ["hatchling", "uv-dynamic-versioning"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "python-rrmngmnt"
7+
dynamic = ["version"]
8+
description = "Tool to manage remote systems and services"
9+
readme = "README.rst"
10+
license = { text = "GPL-2.0-only" }
11+
authors = [{ name = "Lukas Bednar", email = "lukyn17@gmail.com" }]
12+
keywords = ["remote", "resource", "service"]
13+
classifiers = [
14+
"Topic :: Utilities",
15+
"Intended Audience :: Developers",
16+
"Intended Audience :: Information Technology",
17+
"Operating System :: POSIX",
18+
"Programming Language :: Python",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.7",
21+
"Programming Language :: Python :: 3.8",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
]
28+
dependencies = ["paramiko", "netaddr", "six"]
29+
requires-python = ">=3.7"
30+
31+
[project.urls]
32+
Homepage = "https://github.com/rhevm-qe-automation/python-rrmngmnt"
33+
34+
35+
[tool.hatch.version]
36+
source = "uv-dynamic-versioning"
37+
38+
[tool.hatch.build.targets.wheel]
39+
packages = ["rrmngmnt"]
40+
41+
[dependency-groups]
42+
tests = [
43+
"attrs>=24.2.0",
44+
"pytest>=7.4.4",
45+
"pytest-cov>=4.1.0",
46+
"pytest-docker>=2.2.0",
47+
]

requirements.txt

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

setup.cfg

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

setup.py

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

test-requirements.txt

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

tox.ini

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[tox]
2-
envlist = py37,py38,py39,pep8
2+
envlist = python3.9,python3.1{0,1,2,3},pep8
33
[testenv]
4-
deps = -r{toxinidir}/test-requirements.txt
5-
-r{toxinidir}/requirements.txt
6-
commands=py.test \
7-
--basetemp={envtmpdir} \
8-
--cov rrmngmnt \
9-
--cov-report term \
10-
--cov-report html \
11-
{posargs} tests
4+
deps = uv
5+
commands=
6+
uv sync -p {envname} --locked --all-extras --dev --group tests
7+
uv run pytest \
8+
--basetemp={envtmpdir} \
9+
--cov rrmngmnt \
10+
--cov-report term \
11+
--cov-report html \
12+
{posargs} tests
1213
[testenv:pep8]
13-
deps=flake8
14-
commands=flake8 rrmngmnt tests
14+
deps=uv
15+
commands=uv run flake8 rrmngmnt tests

0 commit comments

Comments
 (0)