Skip to content

Automate PyPI release pipeline and modernize packaging#26

Merged
ilyazub merged 5 commits intomasterfrom
release-from-gh-actions
Mar 18, 2026
Merged

Automate PyPI release pipeline and modernize packaging#26
ilyazub merged 5 commits intomasterfrom
release-from-gh-actions

Conversation

@ilyazub
Copy link
Contributor

@ilyazub ilyazub commented Mar 18, 2026

What's in the PR:

  • .github/workflows/release.yml — full test→build→publish→smoke-test pipeline on v** tags
  • .github/workflows/ci.yml — cleaned up
  • pyproject.toml — full PEP 621 [project] table, replaces setup.py
  • setup.py, Pipfile, Pipfile.lock deleted (there's pyproject.toml already)
  • .venv/ gitignored
  • Author email → support@serpapi.com

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an automated GitHub Actions release pipeline for publishing the Python package to PyPI/GitHub Packages and migrates packaging metadata to pyproject.toml (PEP 621), removing legacy setup.py/Pipenv files.

Changes:

  • Add a tag-triggered release workflow (test → build → publish → smoke-test).
  • Simplify CI test selection so example/live API tests run only on Python 3.13.
  • Modernize packaging via pyproject.toml and remove setup.py, Pipfile, and Pipfile.lock.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.github/workflows/release.yml New automated release workflow for building/publishing and validating the published package.
.github/workflows/ci.yml Simplifies pytest invocation and gates example tests to Python 3.13 only.
pyproject.toml Adds PEP 621 [project] metadata, optional deps, pytest config, and dynamic version config.
.gitignore Ignores local virtualenv directory (.venv/).
setup.py Deleted in favor of pyproject.toml-based builds.
Pipfile Deleted (Pipenv no longer used).
Pipfile.lock Deleted (Pipenv no longer used).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@ilyazub ilyazub force-pushed the release-from-gh-actions branch 3 times, most recently from 1ac341e to ed4880e Compare March 18, 2026 10:24
@ilyazub ilyazub requested a review from Copilot March 18, 2026 10:43
@ilyazub ilyazub force-pushed the release-from-gh-actions branch from f255524 to bfb6525 Compare March 18, 2026 10:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the project’s Python packaging by moving fully to pyproject.toml/PEP 621 and adds GitHub Actions automation for testing, building, publishing to PyPI/GitHub Packages, and post-publish smoke testing on version tag pushes.

Changes:

  • Replace legacy setup.py/Pipenv metadata with a complete PEP 621 pyproject.toml configuration.
  • Add a tag-triggered release workflow that runs tests, builds artifacts, publishes packages, and smoke-tests the published release.
  • Clean up CI workflow and ignore local .venv/ environments.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Adds full [project] metadata, dynamic versioning, optional deps, and pytest config.
.github/workflows/release.yml Introduces test→build→publish→smoke-test pipeline for v* tags (with GitHub Release + package publishing).
.github/workflows/ci.yml Updates CI steps and splits example tests to run only on one matrix version.
.gitignore Ignores .venv/.
setup.py Removed legacy setuptools build/upload commands in favor of pyproject.toml.
Pipfile, Pipfile.lock Removed Pipenv files now that packaging is pyproject.toml-driven.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

ilyazub added 5 commits March 18, 2026 11:59
Replace setup.py and Pipenv files with a complete PEP 621 pyproject.toml:
- Full [project] table with metadata, classifiers, optional-deps
- Dynamic version via setuptools AST parsing of serpapi/__version__.py
- pytest configuration in [tool.pytest.ini_options]
- Remove setup.py, Pipfile, and Pipfile.lock
Tag-triggered (v*) pipeline:
- test: run unit tests across Python 3.6–3.13, example tests on 3.13 only
- build: produce sdist and wheel via python -m build
- publish: create GitHub Release and upload to PyPI via twine
- smoke-test: install from PyPI and verify version + live search
@ilyazub ilyazub force-pushed the release-from-gh-actions branch from dfa27ef to fd4b60b Compare March 18, 2026 11:04
@ilyazub ilyazub merged commit c18a946 into master Mar 18, 2026
6 checks passed
@ilyazub ilyazub deleted the release-from-gh-actions branch March 18, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants