Skip to content

Commit

Permalink
Convert project to use uv package manager
Browse files Browse the repository at this point in the history
  • Loading branch information
larsks committed Jan 20, 2025
1 parent 8d78f2f commit ad6933d
Show file tree
Hide file tree
Showing 9 changed files with 1,365 additions and 105 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
jobs:
run-tests:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -20,10 +20,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set up uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
uv sync --all-groups
uv tool install tox --with tox-uv
- name: Unit Tests
run: tox -epy3
run: |
uv run tox -epy3
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prune .github
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
exclude = ["openstack"]

[project]
name = "esisdk"
dynamic = ["version"]
description = "An SDK for building applications to work with ESI"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Environment :: Console",
"Environment :: OpenStack",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"openstacksdk>=4.0.1",
]

[project.urls]
Homepage = "https://esi.readthedocs.io/en/latest/"

[dependency-groups]
dev = [
"coverage>=4.0,!=4.4",
"mock>=5.1.0",
"oslo-config>=9.6.0",
"oslotest>=5.0.0",
"requests-mock>=1.12.1",
"stestr>=1.0.0",
]

[tool.setuptools_scm]

20 changes: 0 additions & 20 deletions requirements.txt

This file was deleted.

26 changes: 0 additions & 26 deletions setup.cfg

This file was deleted.

21 changes: 0 additions & 21 deletions setup.py

This file was deleted.

20 changes: 0 additions & 20 deletions test-requirements.txt

This file was deleted.

16 changes: 3 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
[tox]
minversion = 2.0
minversion = 4.0
envlist = py3
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
PYTHONWARNINGS=default::DeprecationWarning
TESTS_DIR=./esi/tests/
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
runner = uv-venv-lock-runner
commands =
stestr run {posargs}
uv run stestr run {posargs}

[testenv:venv]
commands = {posargs}
Expand Down
Loading

0 comments on commit ad6933d

Please sign in to comment.