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 17, 2025
1 parent 8d78f2f commit b1a745d
Show file tree
Hide file tree
Showing 6 changed files with 1,873 additions and 65 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
60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[project]
name = "esisdk"
version = "1.4.0"
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 = [
"appdirs>=1.3.0",
"cryptography>=2.7",
"decorator>=4.4.1",
"dogpile-cache>=0.6.5",
"importlib-metadata<5.0.0 ; python_full_version < '3.8'",
"iso8601>=0.1.11",
"jmespath>=0.9.0",
"jsonpatch>=1.16,!=1.20",
"keystoneauth1>=3.18.0",
"netifaces>=0.10.4",
"openstacksdk>=4.0.1",
"os-service-types>=1.7.0",
"pbr>=2.0.0,!=2.1.0",
"pyyaml>=3.13",
"requestsexceptions>=1.2.0",
]

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

[dependency-groups]
dev = [
"coverage>=4.0,!=4.4",
"ddt>=1.0.1",
"fixtures>=3.0.0",
"hacking>=3.1.0,<4.0.0",
"importlib-metadata<5.0.0 ; python_full_version < '3.8'",
"jsonschema>=3.2.0",
"mock>=3.0.0",
"openstacksdk>=4.0.1",
"oslo-config>=6.1.0",
"oslotest>=3.2.0",
"prometheus-client>=0.4.2",
"requests-mock>=1.2.0",
"statsd>=3.3.0",
"stestr>=1.0.0",
"testscenarios>=0.4",
"testtools>=2.2.0",
]
26 changes: 0 additions & 26 deletions setup.cfg

This file was deleted.

21 changes: 0 additions & 21 deletions setup.py

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 b1a745d

Please sign in to comment.