feat: add python-package-check composite action#296
Conversation
05b5028 to
dfe6669
Compare
ffe0fb0 to
9127410
Compare
janbuchar
left a comment
There was a problem hiding this comment.
Mostly fine by me, but watch out for https://github.com/apify/actions/ - perhaps you should direct the PR there 🙂
| 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 |
There was a problem hiding this comment.
Isn't there a sensible default for these?
There was a problem hiding this comment.
It makes sense, I'm just not sure about the Python version (it would be good to update this when adding support for a new Python version of that package, and it will be done package by package gradually). The other options make sense. I'll address it in apify/actions#11.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Yeah, good point, I'll address it in apify/actions#11.
|
closing in favor of apify/actions#11 |
## Summary Adds an end-to-end check that the built sdist and wheel install cleanly, ship the expected sources and data files, and that `import apify` works — via the shared [apify/workflows/python-package-check](apify/workflows#296) action. Wired into every PR via `_check_package.yaml`, and into both stable and beta release workflows so the exact artifact about to hit PyPI is verified first. ## Verified locally Built `dist/` and ran the verification — all checks pass (`apify==3.4.0`, sdist + wheel both install cleanly into a fresh Python 3.14 venv).
## Summary Adds an end-to-end check that the built sdist and wheel install cleanly, ship the expected sources and data files, and that `import apify_client` works — via the shared [apify/workflows/python-package-check](apify/workflows#296) action. Wired into every PR via `_check_package.yaml`, and into both stable and beta release workflows so the exact artifact about to hit PyPI is verified first.
## Summary Adds an end-to-end check that the built sdist and wheel install cleanly, ship the expected sources and data files, and that `import apify_shared` works — via the shared [apify/workflows/python-package-check](apify/workflows#296) action. Wired into every PR via `_check_package.yaml`, and into both stable and beta release workflows so the exact artifact about to hit PyPI is verified first.
Adds a composite action
python-package-checkthat verifies the sdist + wheel indist/install and import cleanly into fresh venvs, and that archive contents are correct (metadata files present, fullsrc/<pkg>tree shipped, notests//docs//uv.lockleaks). Optionalsmoke_coderuns extra assertions afterimport <pkg>.To be used after
prepare-pypi-distributionin 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 apython_checksCI job covering the two Python scripts now in this repo.Verified locally against built artifacts of all four Python packages.