Skip to content

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

Open
vdusek wants to merge 2 commits into
mainfrom
feat/python-package-check-action
Open

feat: add python-package-check composite action#296
vdusek wants to merge 2 commits into
mainfrom
feat/python-package-check-action

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 13, 2026

Adds a composite action python-package-check that verifies the sdist + wheel in dist/ install and import cleanly into fresh venvs, and that archive contents are correct (metadata files present, full src/<pkg> tree shipped, no tests/ / docs/ / uv.lock leaks). Optional smoke_code runs extra assertions after import <pkg>.

To be used after prepare-pypi-distribution in PR checks and release flows across crawlee-python, apify-sdk-python, apify-client-python, apify-shared-python.

Also adds repo-wide ruff + ty config (pyproject.toml, uv.lock) and a python_checks CI job covering the two Python scripts now in this repo.

Verified locally against built artifacts of all four Python packages.

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels May 13, 2026
@vdusek vdusek self-assigned this May 13, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 13, 2026
@vdusek vdusek force-pushed the feat/python-package-check-action branch from 05b5028 to dfe6669 Compare May 14, 2026 08:11
@vdusek vdusek force-pushed the feat/python-package-check-action branch from ffe0fb0 to 9127410 Compare May 14, 2026 08:59
@vdusek vdusek requested a review from janbuchar May 14, 2026 09:00
Copy link
Copy Markdown
Contributor

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

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

Mostly fine by me, but watch out for https://github.com/apify/actions/ - perhaps you should direct the PR there 🙂

Comment on lines +10 to +18
src_package_dir:
description: Path to the package source directory, relative to the repository root.
required: true
dist_dir:
description: Directory containing the built sdist + wheel.
required: true
python_version:
description: Python version to use for the verification venvs.
required: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't there a sensible default for these?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we always run this with uv run, you can specify typer and rich as script dependencies and make this shorter and more readable (no arcane argparse setup, no custom stdout formatting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants