Skip to content
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
23 changes: 10 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Set up uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: "3.12"
enable-cache: true
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python - --version 1.8.5
poetry install
run: uv sync --locked

- name: Run tests
run: |
poetry run pytest
run: uv run --no-sync pytest

- name: Build wheels
run: |
poetry version $(git tag --points-at HEAD)
poetry build
uv version "$(git tag --points-at HEAD)"
uv build

- name: Upload
env:
USERNAME: __token__
PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish --username=$USERNAME --password=$PASSWORD
UV_PUBLISH_USERNAME: __token__
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: uv publish
24 changes: 6 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,20 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Set up uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-${ GITHUB_REF }
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
enable-cache: true

- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python - --version 1.8.5
poetry install
run: uv sync --locked

- name: Run tests
run: |
poetry run pytest
run: uv run --no-sync pytest

- name: Build wheels
run: |
poetry build
run: uv build

build-docs:
runs-on: ubuntu-latest
Expand Down
1,333 changes: 0 additions & 1,333 deletions poetry.lock

This file was deleted.

41 changes: 21 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
[tool.poetry]
[project]
name = "kw6"
version = "0.0.0"
description = "Minimalistic library for reading files in the kw6 file format"
authors = ["NextML AB"]
license = "Apache 2.0"
authors = [{ name = "NextML AB" }]
requires-python = ">=3.9,<3.13"
license = "Apache-2.0"
dependencies = [
"numpy>=1.21.2,<2",
"Pillow>=10.0,<12",
"pydantic>=2.0.0,<3",
]

[tool.poetry.dependencies]
# Floor raised to 3.9 so numpy/Pillow resolve to lines that ship cp312 wheels
# (numpy 1.26 / Pillow 10 dropped 3.8); ceiling <3.13 for Python 3.12.
python = ">=3.9,<3.13"
numpy = "^1.21.2"
# Pillow >=10 is the first line with cp312 wheels; <12 keeps the 3.8 floor
# satisfiable (Pillow 11 dropped 3.8).
Pillow = ">=10.0,<12"
pydantic = "^2.0.0"

[tool.poetry.dev-dependencies]
tqdm = "^4.62.2"
pytest = "^6.2.5"
flake8 = "^3.9.2"
ipykernel = "^6.4.1"
[dependency-groups]
dev = [
"tqdm>=4.62.2,<5",
"pytest>=6.2.5,<7",
"flake8>=3.9.2,<4",
"ipykernel>=6.4.1,<7",
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.11.25,<0.12"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-root = ""
33 changes: 0 additions & 33 deletions setup.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions setup.py

This file was deleted.

Loading
Loading