From 853aae445303a27a2b8af1f7d41538f4c7916759 Mon Sep 17 00:00:00 2001 From: Dane Jones Date: Sat, 14 Jun 2025 16:17:20 -0400 Subject: [PATCH 1/2] Add GitHub Actions workflow for publishing Python package to PyPI --- .github/workflows/publish-to-pypi.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/publish-to-pypi.yml diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..573829f --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,36 @@ +name: Publish Python Package to PyPI + +on: + release: + types: [created] # Trigger only when a new release is published + +permissions: + id-token: write # Needed for trusted publishing with PyPI + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pureshell # Link to the PyPI project + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + # No `with: password:` is needed here because we are using trusted publishing. + # Ensure PyPI is configured to trust this repository and workflow for the 'pureshell' package. From 44d619e3e2fb31a60c44cac90debdfd7d5dc6987 Mon Sep 17 00:00:00 2001 From: Dane Jones Date: Sat, 14 Jun 2025 16:30:41 -0400 Subject: [PATCH 2/2] Update project version to 0.2.0 and enhance description in pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6f1101a..c3aaebc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta" [project] name = "pureshell" -version = "0.1.0" -description = "A Python module for impartial computation. Implements the Functional Core, Stateful Shell pattern." +version = "0.2.0" +description = "pureshell is a Python library providing a framework for the \"Functional Core, Stateful Shell\" architectural pattern. It guides you to write business logic as pure, static functions within Ruleset classes, while StatefulEntity objects manage state and delegate operations. This promotes highly testable, maintainable, and understandable code. Key features include @shell_method for declarative logic linking, @ruleset_provider for default behavior, and dynamic injection of Ruleset instances for runtime flexibility (e.g., strategy pattern, mock testing)." authors = [ { name="Dane Jones", email="danerjones@gmail.com" } ]