From be683ff56f7007eb56614a6ddf30cadce06a814f Mon Sep 17 00:00:00 2001 From: artdotlis Date: Tue, 23 Sep 2025 10:35:40 +0000 Subject: [PATCH 1/3] fix: search for the common merge ancestor --- .github/workflows/new_tag.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/new_tag.yml b/.github/workflows/new_tag.yml index 27fe1ca..16d0394 100644 --- a/.github/workflows/new_tag.yml +++ b/.github/workflows/new_tag.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout full history uses: actions/checkout@v4 with: fetch-depth: 0 @@ -25,12 +25,11 @@ jobs: VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2) echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Get previous version from main~1 + - name: Get previous version from last main ancestor id: previous run: | - git checkout HEAD~1 - PREV_VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2) - echo "version=$PREV_VERSION" >> $GITHUB_OUTPUT + VERSION="$(git merge-base HEAD HEAD^):pyproject.toml" | grep '^version =' | cut -d '"' -f2" + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Compare versions and create tag if changed if: steps.current.outputs.version != steps.previous.outputs.version @@ -38,5 +37,6 @@ jobs: git config user.name "github-actions[bot]" TAG="v${{ steps.current.outputs.version }}" + echo "Creating tag $TAG" git tag "$TAG" git push origin "$TAG" From 1ae04493b48197bc963883f991ce1ebcfa4d0b70 Mon Sep 17 00:00:00 2001 From: artdotlis Date: Tue, 23 Sep 2025 10:36:13 +0000 Subject: [PATCH 2/3] bump: release 0.2.0 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ README.md | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4b83832 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +## v0.2.0 (2025-09-23) + +### Feat + +- allow empty output workables +- init project + +### Fix + +- search for the common merge ancestor +- add task done on empty output +- move sleep outside of lock +- correct work function expecting tuple as result +- correct test syncqueue types +- correct sync queue generics +- correct uv dependencies +- correct makefile command +- correct library name in docs + +### Refactor + +- add tag on pull request +- call cz via uv +- bundle worker output +- reduce output to console +- add better typing to workable manager +- improve workable types +- add better typing to worker +- change types of workable +- move uv to PATH an act diff --git a/README.md b/README.md index 49900e4..cb29673 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # mPyFlow -[![release: 0.1.0](https://img.shields.io/badge/rel-0.1.0-blue.svg?style=flat-square)](https://github.com/artdotlis/mPyFlow) +[![release: 0.2.0](https://img.shields.io/badge/rel-0.2.0-blue.svg?style=flat-square)](https://github.com/artdotlis/mPyFlow) [![MIT LICENSE](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat-square)](https://choosealicense.com/licenses/mit/) [![Documentation Status](https://img.shields.io/badge/docs-GitHub-blue.svg?style=flat-square)](https://artdotlis.github.io/mPyFlow/) diff --git a/pyproject.toml b/pyproject.toml index c8488cc..0f0f265 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mpyflow" -version = "0.1.0" +version = "0.2.0" description = """mPyFlow is a library designed to manage multiprocessing workflows.""" readme = "README.md" diff --git a/uv.lock b/uv.lock index c6dc5c8..004c6e2 100644 --- a/uv.lock +++ b/uv.lock @@ -504,7 +504,7 @@ wheels = [ [[package]] name = "mpyflow" -version = "0.1.0" +version = "0.2.0" source = { editable = "." } dependencies = [ { name = "rich" }, From 43bfa52c6f93b4e20fb55c12ec22d9a3319d5db7 Mon Sep 17 00:00:00 2001 From: artdotlis Date: Tue, 23 Sep 2025 11:23:41 +0000 Subject: [PATCH 3/3] refactor: add workflow to auto-tag new versions from pyproject.toml --- .github/workflows/new_tag.yml | 38 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/new_tag.yml b/.github/workflows/new_tag.yml index 16d0394..ace6ca6 100644 --- a/.github/workflows/new_tag.yml +++ b/.github/workflows/new_tag.yml @@ -1,4 +1,4 @@ -name: Tag on version bump +name: Tag on version bump after rebase on: push: @@ -10,33 +10,39 @@ permissions: jobs: tag: - name: Create tag if version changed runs-on: ubuntu-latest - steps: - - name: Checkout full history + - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Get current version from pyproject.toml - id: current + - name: Get version from pyproject.toml + id: get_version run: | - VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2) + VERSION=$(grep '^version' pyproject.toml | cut -d '"' -f2) + echo "Detected version: $VERSION" echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Get previous version from last main ancestor - id: previous + - name: Check if tag exists + id: tag_exists run: | - VERSION="$(git merge-base HEAD HEAD^):pyproject.toml" | grep '^version =' | cut -d '"' -f2" - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Compare versions and create tag if changed - if: steps.current.outputs.version != steps.previous.outputs.version + TAG="v${{ steps.get_version.outputs.version }}" + echo "Checking for tag: $TAG" + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag already exists: $TAG" + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "Tag does not exist: $TAG" + echo "exists=false" >> $GITHUB_OUTPUT + fi + + - name: Create and push tag + if: steps.tag_exists.outputs.exists == 'false' run: | + TAG="v${{ steps.get_version.outputs.version }}" git config user.name "github-actions[bot]" - TAG="v${{ steps.current.outputs.version }}" - echo "Creating tag $TAG" + echo "Creating tag: $TAG" git tag "$TAG" git push origin "$TAG"