From 0fa06cd264439838185df636577dc6ca792cf1d6 Mon Sep 17 00:00:00 2001 From: RafaelWO Date: Sun, 11 Feb 2024 17:58:11 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=9A=A8=20Remove=20unused=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unparallel/unparallel.py | 1 - 1 file changed, 1 deletion(-) diff --git a/unparallel/unparallel.py b/unparallel/unparallel.py index 083d201..7afb1bf 100644 --- a/unparallel/unparallel.py +++ b/unparallel/unparallel.py @@ -1,5 +1,4 @@ import asyncio -import contextlib import logging from dataclasses import dataclass from typing import Any, Callable, Dict, List, Optional, Tuple, Union From afafb979d1109e66e8c72653af78516cbc786b34 Mon Sep 17 00:00:00 2001 From: RafaelWO Date: Sun, 11 Feb 2024 17:58:30 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9C=A8=20Add=20CI=20workflow=20for=20pub?= =?UTF-8?q?lishing=20package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..51c9924 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,52 @@ +name: Publish +on: + push: + + branches: # TODO: REMOVE!!! + - feature/102-publish-to-pypi-within-github-ci + tags: + - '**' + +jobs: + pypi-publish: + name: Build package and upload it to PyPI + runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: pypi + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + steps: + - name: Checkout current branch + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Set up cache + uses: actions/cache@v3 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish + + - name: Install dependencies + run: poetry install + + - name: Build package + run: poetry build + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ From e295d1398afc6e7d440b52e1d4c9f1345ce85ffe Mon Sep 17 00:00:00 2001 From: RafaelWO Date: Sun, 11 Feb 2024 18:02:36 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=91=B7=20Remove=20test=20branch=20fro?= =?UTF-8?q?m=20publish=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 51c9924..c725a12 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,6 @@ name: Publish on: push: - - branches: # TODO: REMOVE!!! - - feature/102-publish-to-pypi-within-github-ci tags: - '**' From 13697dcf329153aa71c96ad723a43dc942b0b0f8 Mon Sep 17 00:00:00 2001 From: RafaelWO Date: Sun, 11 Feb 2024 18:05:11 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=91=B7=20Remove=20test=20PyPI=20url?= =?UTF-8?q?=20from=20publish=20task?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c725a12..279834b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,5 +45,3 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/