Skip to content

Commit

Permalink
use dev dependencies via uv
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Dec 14, 2024
1 parent 2ba7b72 commit 809da24
Show file tree
Hide file tree
Showing 7 changed files with 721 additions and 34 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Code quality
on:
push:
env:
UV_SYSTEM_PYTHON: 1
UV_SYSTEM_PYTHON: true

jobs:

Expand All @@ -25,9 +25,10 @@ jobs:
architecture: x64

- name: Install dev dependencies
run: uv pip install -r dev-requirements.txt
run: uv sync

- name: Run ruff
run: |
ruff format --diff .
ruff check --diff .
- name: ruff format
run: uv ruff format --diff .

- name: ruff check
run: uv ruff check --diff .
18 changes: 3 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Tests
on:
push:
env:
UV_SYSTEM_PYTHON: 1
SOFTHSM2_CONF: /tmp/softhsm2.conf
UV_SYSTEM_PYTHON: true

jobs:

Expand All @@ -17,20 +16,12 @@ jobs:
- "3.11"
- "3.12"
- "3.12"
- "3.13"

steps:
- name: Install APT dependencies
run: sudo apt-get install -y softhsm2

- name: env
run: env

- name: id
run: id

- name: Create SoftHSM token
run: softhsm2-util --init-token --free --label TEST --pin 1234 --so-pin 5678

- name: Acquire sources
uses: actions/[email protected]

Expand All @@ -46,10 +37,7 @@ jobs:
architecture: x64

- name: Install the project
run: uv sync --all-extras --dev

- name: Install dev dependencies
run: uv pip install -r dev-requirements.txt
run: uv sync --all-extras --python-preference only-system --python ${{ matrix.python-version }}

- name: Run tests
run: uv run pytest -v
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.13
11 changes: 0 additions & 11 deletions dev-requirements.txt

This file was deleted.

12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security :: Cryptography",
]
dependencies = [
Expand Down Expand Up @@ -63,3 +64,14 @@ combine-as-imports = true

[tool.setuptools.packages.find]
include = ["pkcs11*"]

[dependency-groups]
dev = [
"cryptography>=44.0.0",
"oscrypto>=1.3.0",
"pytest>=8.3.4",
"ruff>=0.8.3",
"setuptools-scm>=8.1.0",
"sphinx>=7.4.7",
"sphinx-rtd-theme>=3.0.2",
]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

698 changes: 698 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit 809da24

Please sign in to comment.