Skip to content

Commit

Permalink
convert to uv and pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonsteiner committed Jan 7, 2025
1 parent 22614ce commit 6f75482
Show file tree
Hide file tree
Showing 5 changed files with 852 additions and 25 deletions.
21 changes: 10 additions & 11 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
with:
- 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,17 +68,14 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update; sudo apt-get install gcc libkrb5-dev
python -m pip install --upgrade pip
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
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dynamic = ["version"]
dependencies = [
"pytz>=2014.4",
"requests>=2.3.0",
"six>=1.10.0"
"six>=1.10.0",
]

[tool.files]
Expand Down Expand Up @@ -72,3 +72,19 @@ max-line-length = "99"

[tool.setuptools]
include-package-data = false

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

This file was deleted.

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

This file was deleted.

Loading

0 comments on commit 6f75482

Please sign in to comment.