From 651edde3e1a6fa040b6af5cab4e1cf0a09ac2589 Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Mon, 2 Feb 2026 10:56:09 +0000 Subject: [PATCH 01/12] Remove version from compose.yaml --- compose.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/compose.yaml b/compose.yaml index 785fddc..6792de9 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: pode: build: From 813e5fef662525588290009d57df3380d211becc Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Mon, 2 Feb 2026 10:56:40 +0000 Subject: [PATCH 02/12] Add dev-container-related files --- .devcontainer/devcontainer.json | 16 ++++++++++++++++ .devcontainer/setup_user.sh | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/setup_user.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..202f6d6 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "pode", + "image": "python:3.14-bookworm", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": {}, + "ghcr.io/devcontainers-extra/features/poetry:2": { + "version": "2.3.1" + } + }, + "workspaceFolder": "/opt/pode", + "workspaceMount": "source=${localWorkspaceFolder},target=/opt/pode,type=bind,consistency=cached", + "runArgs": ["--runtime=runc"], + "onCreateCommand": ". /opt/pode/.devcontainer/setup_user.sh", + "postCreateCommand": "poetry config virtualenvs.create false && poetry install --with dev --no-root", + "remoteUser": "${localEnv:USER}" +} diff --git a/.devcontainer/setup_user.sh b/.devcontainer/setup_user.sh new file mode 100644 index 0000000..47b28e7 --- /dev/null +++ b/.devcontainer/setup_user.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -eux + +uid=$(stat -c '%u' "$(pwd)") +gid=$(stat -c '%g' "$(pwd)") +current_user=$(whoami) + +if [ "$gid" -ne 1000 ]; then + sudo groupadd -g "$gid" hostgroup + if [ "$uid" -ne 1000 ]; then + sudo usermod -u "$uid" -g hostgroup "$current_user" + else + sudo usermod -g hostgroup "$current_user" + fi +elif [ "$uid" -ne 1000 ]; then + sudo usermod -u "$uid" "$current_user" +fi From d15b3f6cf596b10f76240b28c66220bfa61ec3e0 Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Mon, 2 Feb 2026 11:04:04 +0000 Subject: [PATCH 03/12] Update Dockerfile --- Dockerfile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f291b8..3ad90e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,8 @@ ARG PYTHON_IMAGE_VERSION +ARG IMAGE_TYPE -FROM python:${PYTHON_IMAGE_VERSION} - +FROM python:${PYTHON_IMAGE_VERSION} AS base ARG POETRY_VERSION -ARG DEV_IMAGE WORKDIR /opt/pode @@ -15,11 +14,10 @@ COPY tests/ tests/ COPY pode/ pode/ COPY pyproject.toml . -RUN if [ "${DEV_IMAGE}" = "true" ]; then \ - poetry install; \ - elif [ "${DEV_IMAGE}" = "false" ]; then \ - poetry install --without dev; \ - else \ - echo "Invalid value specified for DEV_IMAGE: '${DEV_IMAGE}'"; \ - exit 1; \ - fi +FROM base AS prod +RUN poetry install + +FROM base AS dev +RUN poetry install --with dev + +FROM ${IMAGE_TYPE} From 52e3336e5e67c7e6304e174b8da0fff59f5c1e08 Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Mon, 2 Feb 2026 11:04:33 +0000 Subject: [PATCH 04/12] Update matrix of Python versions for CI tests --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5cdebff..1334bc0 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.platform.os }} strategy: matrix: - python_version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_version: ['3.10', '3.11', '3.12', '3.13', '3.14'] platform: [ { os: 'macos-latest', From 89d09799a6805e6ea612f3dd93af1ff6e580fdc9 Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Mon, 2 Feb 2026 11:11:41 +0000 Subject: [PATCH 05/12] Update pyproject.toml --- pyproject.toml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5d1d4db..1bade39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,28 +1,32 @@ -[tool.poetry] +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[project] name = "pode" version = "0.4.4" description = "Implementation of an algorithm for a polygon decomposition by Hert, S. and Lumelsky, V., 1998" -authors = ["GeorgySk "] +authors = [ + { name = "Georgy Skorobogatov", email = "skorobogatovgeorgy+github@gmail.com" }, +] readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.8" -gon = "^5.0.0" -ground = "^8.1.0" -networkx = "^2.8.8" -sect = "^6.1.0" +license-files = ["LICENSE"] +requires-python = "^3.10" +dependencies = [ + "gon (>=5.0.0,<6.0.0)", + "ground (>=8.1.0,<9.0.0)", + "networkx (>=2.8.8,<3.0.0)", + "sect (>=6.1.0,<7.0.0)" +] [tool.poetry.group.dev.dependencies] bump-my-version = "^0.18.3" pytest = "^7.2.0" pytest-cov = "^4.0.0" +# fixed for easier way to reproduce across various machines hypothesis = "6.99.1" hypothesis-geometry = "^7.3.0" -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - [tool.coverage.run] source = ["pode"] From f413fe4ddf17bb7484e0eedd956266f71e601eee Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Mon, 2 Feb 2026 11:11:52 +0000 Subject: [PATCH 06/12] Update README.md badges --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de2485a..2067d65 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,10 @@ pode =========== -[![](https://codecov.io/gh/LostFan123/pode/branch/master/graph/badge.svg)](https://codecov.io/gh/LostFan123/pode "Codecov") -[![](https://img.shields.io/github/license/LostFan123/pode.svg)](https://github.com/LostFan123/pode/blob/master/LICENSE "License") +[![](https://github.com/GeorgySk/pode/workflows/CI/badge.svg)](https://github.com/GeorgySk/pode/actions/workflows/ci.yml "Github Actions") +[![](https://codecov.io/gh/GeorgySk/gon/branch/master/graph/badge.svg)](https://codecov.io/gh/GeorgySk/pode "Codecov") +[![](https://readthedocs.org/projects/pode/badge/?version=latest)](https://pode.readthedocs.io/en/latest "Documentation") +[![](https://img.shields.io/github/license/GeorgySk/pode.svg)](https://github.com/GeorgySk/pode/blob/master/LICENSE "License") [![](https://badge.fury.io/py/pode.svg)](https://badge.fury.io/py/pode "PyPI") Summary From f7afa4b23b36495cfb5c5ce7e1fa9bb62f47835b Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Wed, 4 Feb 2026 09:00:52 +0000 Subject: [PATCH 07/12] =?UTF-8?q?Bump=20version:=200.4.4=20=E2=86=92=200.4?= =?UTF-8?q?.5-alpha?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.toml | 2 +- compose.yaml | 2 +- pode/__init__.py | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.toml b/.bumpversion.toml index ecf2c06..e60e20e 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -1,5 +1,5 @@ [tool.bumpversion] -current_version = "0.4.4" +current_version = "0.4.5-alpha" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(\\-(?P[a-z]+))?" serialize = [ "{major}.{minor}.{patch}-{release}", diff --git a/compose.yaml b/compose.yaml index 6792de9..b0a545d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -6,7 +6,7 @@ services: - PYTHON_IMAGE_VERSION=${PYTHON_IMAGE_VERSION} - POETRY_VERSION=${POETRY_VERSION} - DEV_IMAGE=${DEV_IMAGE} - image: georgysk/pode:0.4.4 + image: georgysk/pode:0.4.5-alpha volumes: - .:/opt/pode stdin_open: true diff --git a/pode/__init__.py b/pode/__init__.py index 85900c6..8a64f65 100644 --- a/pode/__init__.py +++ b/pode/__init__.py @@ -1,5 +1,5 @@ """Polygon decomposition""" -__version__ = '0.4.4' +__version__ = '0.4.5-alpha' from .pode import (divide, Contour, diff --git a/pyproject.toml b/pyproject.toml index 1bade39..5ce71c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [project] name = "pode" -version = "0.4.4" +version = "0.4.5-alpha" description = "Implementation of an algorithm for a polygon decomposition by Hert, S. and Lumelsky, V., 1998" authors = [ { name = "Georgy Skorobogatov", email = "skorobogatovgeorgy+github@gmail.com" }, From 2b76594a22e640d44b47bced6228dacf3483a4e4 Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Wed, 4 Feb 2026 09:03:18 +0000 Subject: [PATCH 08/12] =?UTF-8?q?Bump=20version:=200.4.5-alpha=20=E2=86=92?= =?UTF-8?q?=200.4.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.toml | 2 +- compose.yaml | 2 +- pode/__init__.py | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.toml b/.bumpversion.toml index e60e20e..b31eb36 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -1,5 +1,5 @@ [tool.bumpversion] -current_version = "0.4.5-alpha" +current_version = "0.4.5" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(\\-(?P[a-z]+))?" serialize = [ "{major}.{minor}.{patch}-{release}", diff --git a/compose.yaml b/compose.yaml index b0a545d..4c979f3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -6,7 +6,7 @@ services: - PYTHON_IMAGE_VERSION=${PYTHON_IMAGE_VERSION} - POETRY_VERSION=${POETRY_VERSION} - DEV_IMAGE=${DEV_IMAGE} - image: georgysk/pode:0.4.5-alpha + image: georgysk/pode:0.4.5 volumes: - .:/opt/pode stdin_open: true diff --git a/pode/__init__.py b/pode/__init__.py index 8a64f65..fddee48 100644 --- a/pode/__init__.py +++ b/pode/__init__.py @@ -1,5 +1,5 @@ """Polygon decomposition""" -__version__ = '0.4.5-alpha' +__version__ = '0.4.5' from .pode import (divide, Contour, diff --git a/pyproject.toml b/pyproject.toml index 5ce71c5..fa78ae3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [project] name = "pode" -version = "0.4.5-alpha" +version = "0.4.5" description = "Implementation of an algorithm for a polygon decomposition by Hert, S. and Lumelsky, V., 1998" authors = [ { name = "Georgy Skorobogatov", email = "skorobogatovgeorgy+github@gmail.com" }, From fbcc3b19654eca33a2a551009a10e5d1c0d17452 Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Wed, 4 Feb 2026 09:34:20 +0000 Subject: [PATCH 09/12] Fix incorrect Poetry version --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 1334bc0..67ee616 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -48,7 +48,7 @@ jobs: - name: 'Install coverage dependencies' run: python -m pip install -U coverage - name: 'Install Poetry' - run: python -m pip install poetry==1.3.1 + run: python -m pip install poetry==2.1.4 - name: 'Turn off virtual environment of Poetry' run: poetry config virtualenvs.create false - name: 'Install dependencies' From 3fcb890c339fbfbd893275fcdf5c8fb69c7b16ae Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Wed, 4 Feb 2026 09:46:59 +0000 Subject: [PATCH 10/12] Exclude Python 3.10 on macOS --- .github/workflows/github-actions.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 67ee616..1037328 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -33,6 +33,9 @@ jobs: python_architecture: 'x86' }, ] + exclude: + - python-version: 3.10 + os: macos-latest steps: - name: 'Checkout' uses: actions/checkout@v3 From bfef596f2d79efec11f8e07d0e9b3768ae62078f Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Wed, 4 Feb 2026 10:38:52 +0000 Subject: [PATCH 11/12] Fix matrix syntax --- .github/workflows/github-actions.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 1037328..d5c81c8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -15,27 +15,15 @@ jobs: strategy: matrix: python_version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - platform: [ - { - os: 'macos-latest', - python_architecture: 'x64' - }, - { - os: 'ubuntu-latest', - python_architecture: 'x64' - }, - { - os: 'windows-latest', - python_architecture: 'x64' - }, - { - os: 'windows-latest', - python_architecture: 'x86' - }, - ] + os: ['macos-latest', 'ubuntu-latest', 'windows-latest'] + python_architecture: ['x64', 'x86'] exclude: - - python-version: 3.10 - os: macos-latest + - os: 'macos-latest' + python_architecture: 'x86' + - os: 'ubuntu-latest' + python_architecture: 'x86' + - os: 'macos-latest' + python_version: '3.10' steps: - name: 'Checkout' uses: actions/checkout@v3 From a9606cb8a6aa362ff327f8ae18ed20dc9c12a39b Mon Sep 17 00:00:00 2001 From: GeorgySk Date: Wed, 4 Feb 2026 10:41:20 +0000 Subject: [PATCH 12/12] Fix matrix references --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index d5c81c8..6bb3cb1 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -11,7 +11,7 @@ on: jobs: test: name: 'Test' - runs-on: ${{ matrix.platform.os }} + runs-on: ${{ matrix.os }} strategy: matrix: python_version: ['3.10', '3.11', '3.12', '3.13', '3.14'] @@ -33,7 +33,7 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python_version }} - architecture: ${{ matrix.platform.python_architecture }} + architecture: ${{ matrix.python_architecture }} - name: 'Install packaging tools' run: python -m pip install -U pip setuptools - name: 'Install coverage dependencies'