Skip to content

Commit

Permalink
convert to uv and pyproject.toml (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonsteiner authored Jan 7, 2025
1 parent 9412378 commit ff2f305
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ name: CI_TEST
on:
push:
paths:
- 'requirements.txt'
- '**.py'
- '**.yml'
pull_request:
Expand Down Expand Up @@ -51,11 +50,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
enable-cache: true

- name: Install python
run: uv python install

- name: setup java 17
uses: actions/setup-java@v3
Expand All @@ -66,16 +68,14 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install libkrb5-dev
python -m pip install -r test-requirements.txt
python -m pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 jenkinsapi/ --count --select=E9,F63,F7,F82 --ignore F821,W503,W504 --show-source --statistics
flake8 jenkinsapi/ --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics
uv run flake8 jenkinsapi/ --count --select=E9,F63,F7,F82 --ignore F821,W503,W504 --show-source --statistics
uv run flake8 jenkinsapi/ --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics
- name: Test with pytest
env:
JENKINS_VERSION: ${{ matrix.token }}
run: |
pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests
uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests
29 changes: 20 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,17 @@ classifiers = [
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
requires_python = ">=3.8"
requires-python = ">=3.8"
dynamic = ["version"]
dependencies = [
"pytz>=2014.4",
"requests>=2.3.0",
"six>=1.10.0"
"six>=1.10.0",
]

[tool.files]
packages = """
jenkinsapi
jenkinsapi_utils
jenkinsapi_tests"""
[tool.setuptools]
packages = ["jenkinsapi", "jenkinsapi_utils", "jenkinsapi_tests"]
include-package-data = false

[tool.pbr]
warnerrors = "True"
Expand All @@ -70,5 +68,18 @@ universal = 1
exclude = ".tox,doc/source/conf.py,build,.venv,.eggs"
max-line-length = "99"

[tool.setuptools]
include-package-data = false
[dependency-groups]
dev = [
"pytest-mock>=3.14.0",
"pytest>=8.3.4",
"pytest-cov>=4.0.0",
"pycodestyle>=2.3.1",
"astroid>=1.4.8",
"pylint>=1.7.1",
"tox>=2.3.1",
"mock>=5.1.0",
"myst-parser>=3.0.0",
"codecov>=2.1.13",
"requests-kerberos>=0.15.0",
"flake8>=5.0.0",
]
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

0 comments on commit ff2f305

Please sign in to comment.