From 5d488acde711ca24e20712fa8b386a5b922e78b3 Mon Sep 17 00:00:00 2001 From: Adonis-Diaz Date: Wed, 22 Jul 2026 10:36:22 -0400 Subject: [PATCH 1/5] Fix release tooling setup: justfile, pyproject.toml, release.yml, gitignore - justfile: add missing 'install' recipe header (was a bare unindented command with no recipe name, breaking the whole file's parsing), and rename 'Build' -> 'build' to match idiomatic naming and the call site in release.yml. - pyproject.toml: fix 'requies' -> 'requires' typo (mandatory PEP 518 key) and 'setup-tools' -> 'setuptools' (correct PyPI package name). - release.yml: fix invalid YAML (missing space after 'uses:', and the 'Upload assets to release' step was mis-indented as a nested item under the previous step instead of a sibling step). - .gitignore: add .venv/ alongside the existing venv/ entry so the new uv-based tooling's virtualenv isn't accidentally committed. --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ .gitignore | 1 + justfile | 7 +++++++ pyproject.toml | 3 +++ 4 files changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 justfile create mode 100644 pyproject.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..55b6b06 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: release + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 + - uses: astral-sh/setup-uv@v7 + - uses: actions/setup-python@v6 + with: + python-version: '3.14' + - name: Build package + run: just install build + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + - name: Upload assets to release + uses: AButler/upload-release-assets@v3.0.1 + with: + files: 'dist/*' + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 24396df..647c58c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.egg-info .cache/ venv/ +.venv/ .tox test-*.xml .coverage diff --git a/justfile b/justfile new file mode 100644 index 0000000..71bf406 --- /dev/null +++ b/justfile @@ -0,0 +1,7 @@ +# Install the project and build its dependencies. +install: + uv pip install --system -e . -r requirements-tests.txt + +# build sdist and wheel into dist/ +build: + uv build diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7e1aec0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>61", "wheel"] +build-backend = "setuptools.build_meta" From 46305a7fd6268de3c83bd95b3337d9d4e798e962 Mon Sep 17 00:00:00 2001 From: Adonis-Diaz Date: Wed, 22 Jul 2026 11:35:30 -0400 Subject: [PATCH 2/5] Readme update to release version --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1bc94ae..5eb2298 100644 --- a/README.md +++ b/README.md @@ -135,10 +135,9 @@ Pretty straightforward. Develop in branches, send PRs, land on master. All tests ### Releasing a new version 1. Land all requisite changes - 1. Bump the version in `setup.py` and `pystalk/__init__.py` to the stable version (e.g., `0.2`) + 1. Bump the version in `setup.py` and `pystalk/__init__.py` to the stable version (e.g., `0.9.0`) 1. Update [`CHANGES.rst`](docs/source/CHANGES.rst) with the changes and the new version number 1. Update [`conf.py`](docs/source/conf.py) with the new version number - 1. Commit - 1. Tag the version (e.g., `git tag -s pystalk-0.2`) - 1. Push up to Github - 1. Upload to PyPI with `python setup.py sdist upload` + 1. Commit and push up to Github + 1. Draft a [new GitHub Release](https://github.com/EasyPost/pystalk/releases/new), targeting a new tag matching the version (e.g., `pystalk-0.9.0`) + 1. Publishing the release triggers the `release` GitHub Actions workflow, which builds the sdist/wheel and publishes them to PyPI automatically From b0d0b69222ad6fb4f88d609bb0b23554ce78d39f Mon Sep 17 00:00:00 2001 From: Adonis-Diaz Date: Wed, 22 Jul 2026 15:09:08 -0400 Subject: [PATCH 3/5] reviewer corrections --- .github/workflows/release.yml | 4 ++-- README.md | 3 +-- justfile | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55b6b06..9eb03a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,10 +9,10 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: extractions/setup-just@v3 - uses: astral-sh/setup-uv@v7 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: '3.14' - name: Build package diff --git a/README.md b/README.md index 5eb2298..0e66687 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,6 @@ Pretty straightforward. Develop in branches, send PRs, land on master. All tests 1. Land all requisite changes 1. Bump the version in `setup.py` and `pystalk/__init__.py` to the stable version (e.g., `0.9.0`) 1. Update [`CHANGES.rst`](docs/source/CHANGES.rst) with the changes and the new version number - 1. Update [`conf.py`](docs/source/conf.py) with the new version number 1. Commit and push up to Github - 1. Draft a [new GitHub Release](https://github.com/EasyPost/pystalk/releases/new), targeting a new tag matching the version (e.g., `pystalk-0.9.0`) + 1. Draft a [new GitHub Release](https://github.com/EasyPost/pystalk/releases/new), targeting a new tag matching the version (e.g., `0.9.0`) 1. Publishing the release triggers the `release` GitHub Actions workflow, which builds the sdist/wheel and publishes them to PyPI automatically diff --git a/justfile b/justfile index 71bf406..2c33596 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,6 @@ # Install the project and build its dependencies. install: + uv venv uv pip install --system -e . -r requirements-tests.txt # build sdist and wheel into dist/ From f970780910e43a80c9dba9420333001a94291b7b Mon Sep 17 00:00:00 2001 From: Adonis-Diaz Date: Wed, 22 Jul 2026 15:30:15 -0400 Subject: [PATCH 4/5] Reviewer corrections --- pyproject.toml | 38 +++++++++++++++++++++++++++++++++++++- setup.py | 44 -------------------------------------------- 2 files changed, 37 insertions(+), 45 deletions(-) delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 7e1aec0..b05bebe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,39 @@ [build-system] -requires = ["setuptools>61", "wheel"] +requires = ["setuptools>=61", "wheel"] build-backend = "setuptools.build_meta" + +[project] +name = "pystalk" +description = "Beanstalkd" +dynamic = ["version", "dependencies", "optional-dependencies"] +readme = "README.md" +requires-python = ">=3.6, <4" +license = { file = "LICENSE.txt" } +authors = [{ name = "EasyPost", email = "oss@easypost.com" }] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Programming Language :: Python", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", + "Topic :: Database", + "License :: OSI Approved :: ISC License (ISCL)", +] + +[project.urls] +Source = "https://github.com/easypost/pystalk" + +[tool.setuptools.dynamic] +version = { attr = "pystalk.__version__" } +dependencies = { file = ["requirements.txt"] } + +[tool.setuptools.dynamic.optional-dependencies] +dev = { file = ["requirements-tests.txt"] } + +[tool.setuptools.packages.find] +exclude = ["tests", "tests.*"] \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index a823f59..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -import os.path - -from setuptools import find_packages, setup - -project_root = os.path.abspath(os.path.dirname(__file__)) - -install_requires = [] -with open(os.path.join(project_root, "requirements.txt"), "r") as f: - for line in f: - install_requires.append(line.rstrip()) - - -with open(os.path.join(project_root, "README.md"), encoding="utf-8") as f: - long_description = f.read() - - -setup( - name="pystalk", - version="0.7.0", - author="EasyPost", - author_email="oss@easypost.com", - url="https://github.com/easypost/pystalk", - description="Very simple beanstalkd client", - long_description=long_description, - long_description_content_type="text/markdown", - license="ISC", - install_requires=install_requires, - packages=find_packages(exclude=["tests", "tests.*"]), - python_requires=">=3.6, <4", - classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Console", - "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Topic :: Database", - "License :: OSI Approved :: ISC License (ISCL)", - ], -) From 541da38f3769b90d9042e81a2908fccb30884d6f Mon Sep 17 00:00:00 2001 From: Adonis-Diaz Date: Thu, 23 Jul 2026 13:47:16 -0400 Subject: [PATCH 5/5] Removal of uv --- .github/workflows/release.yml | 1 - justfile | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9eb03a5..3508974 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,6 @@ jobs: steps: - uses: actions/checkout@v7 - uses: extractions/setup-just@v3 - - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v7 with: python-version: '3.14' diff --git a/justfile b/justfile index 2c33596..528553e 100644 --- a/justfile +++ b/justfile @@ -1,8 +1,9 @@ # Install the project and build its dependencies. install: - uv venv - uv pip install --system -e . -r requirements-tests.txt + python -m pip install --upgrade pip + python -m pip install -e . -r requirements-tests.txt # build sdist and wheel into dist/ build: - uv build + python -m pip install build + python -m build