Skip to content

feat: add python-package-check composite action#11

Merged
vdusek merged 5 commits into
mainfrom
feat/python-package-check-action
May 18, 2026
Merged

feat: add python-package-check composite action#11
vdusek merged 5 commits into
mainfrom
feat/python-package-check-action

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 18, 2026

Summary

Adds a new python-package-check composite action that verifies built sdist + wheel artifacts in dist/ install and import correctly. It runs against any Python package built via uv build / hatch / similar and is intended to run after building (e.g. via prepare-pypi-distribution).

Checks performed:

  • dist/ contains exactly one .whl and one .tar.gz.
  • Sdist includes all expected source/data/metadata files and excludes tests/, docs/, website/, examples/, .github/, and uv.lock.
  • Wheel includes all expected source/data files and a *.dist-info/METADATA entry.
  • Wheel installs into a fresh venv and the package imports.
  • Sdist installs into a fresh venv (forces pip to rebuild the wheel from sdist contents) and the package imports.

Also adds repo-wide Python lint/type-check tooling (pyproject.toml + uv.lock with ruff + ty) and a python_checks CI job so the helper scripts in python-package-check/ and git-cliff-release/ stay clean. git-cliff-release/enhance_context.py has been reformatted to satisfy the new lint config.

Adds a composite action that verifies built sdist + wheel artifacts in `dist/` install and import correctly. Includes Python lint/type-check tooling (ruff + ty) to keep the helper scripts in good shape.
@vdusek vdusek self-assigned this May 18, 2026
@vdusek vdusek requested review from janbuchar and removed request for janbuchar May 18, 2026 08:20
vdusek and others added 4 commits May 18, 2026 10:27
Address PR feedback: `dist_dir` defaults to `dist` and `src_package_dir`
falls back to `src/<package>`, so callers only need to pass `package_name`
and `python_version`. Rewrite the verifier with a PEP 723 inline script
spec so `uv run --script` pulls in `typer` and `rich` for a typed CLI and
styled output instead of argparse + manual print formatting.
`package_layout` (default `src`) accepts `src` or `flat` and the action
derives both the source directory and the sdist member prefix from it.
This is cleaner than passing a path and also fixes flat-layout checking,
where the hardcoded `src/` sdist prefix made the source/data file
presence checks always fail.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…an install deps

The action invokes the verifier via `uv run --no-project --script`, which only
reads dependencies from the inline `# /// script` block — the repo's
pyproject.toml dev group is ignored under `--no-project`. Without the block,
`import typer` fails in CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vdusek
Copy link
Copy Markdown
Contributor Author

vdusek commented May 18, 2026

This was already reviewed in apify/workflows#296, merging

@vdusek vdusek merged commit cafe9c0 into main May 18, 2026
3 checks passed
@vdusek vdusek deleted the feat/python-package-check-action branch May 18, 2026 09:18
fnesveda pushed a commit that referenced this pull request May 18, 2026
🤖 I have created a release *beep* *boop*
---


## [1.1.0](v1.0.0...v1.1.0)
(2026-05-18)


### Features

* add mongodb-query-index-check action
([#3](#3))
([e288951](e288951))
* add python-package-check composite action
([#11](#11))
([cafe9c0](cafe9c0))
* bump max-turns default to 100 and stream full Claude output
([#7](#7))
([812c5cb](812c5cb))
* expand allowed-tools list for mongodb-query-index-check
([#6](#6))
([42e0fe2](42e0fe2))
* make the review prompt directive instead of descriptive
([#8](#8))
([910af2a](910af2a))
* mention [@mtrunkat](https://github.com/mtrunkat) in the review summary
on findings ([#12](#12))
([2f0becd](2f0becd))


### Bug Fixes

* move state files into workspace and address bash sandbox denials
([#9](#9))
([6e2aa05](6e2aa05))
* Stop using `@octokit/rest` in scripts
([#10](#10))
([232b613](232b613))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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