Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert to uv and pyproject.toml #879

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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@v3

- 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.

Loading