Skip to content

bug: fix PyPI packaging metadata validation in CI/CD#17

Merged
k-alphonse merged 3 commits into
stagingfrom
ka/fix-pypi-metadata-release-failure
Apr 17, 2026
Merged

bug: fix PyPI packaging metadata validation in CI/CD#17
k-alphonse merged 3 commits into
stagingfrom
ka/fix-pypi-metadata-release-failure

Conversation

@k-alphonse
Copy link
Copy Markdown
Member

@k-alphonse k-alphonse commented Apr 17, 2026

🥇 Generic Pull Request 🥇

Elizabeth Consulting International Inc

Purpose & Objective

This PR fixes the PyPI/TestPyPI packaging validation issue that previously caused production deployment to fail with:

InvalidDistribution: Metadata is missing required fields: Name, Version

The goal of this change is to harden the CI/CD packaging flow so release artifacts are validated before upload, helping prevent the same production deployment failure from happening again on the next release.

What Changed

  • Added README.md to MANIFEST.in so required packaging metadata files are included in source distributions.
  • Updated .github/workflows/cd.yml to:
    • install/upgrade both build and twine
    • clean previous build artifacts before packaging
    • verify that VERSION and README.md are present
    • run python -m twine check dist/* before uploading to PyPI
  • Updated .github/workflows/ci.yml to apply the same validation flow before uploading to TestPyPI

Why This Change Is Needed

A previous production deployment failed during the PyPI upload step because the built distribution was missing required metadata fields. This PR adds validation and cleanup steps so packaging issues are caught earlier in the pipeline rather than failing at the final upload stage.

Validation

This fix was verified locally by:

  • building fresh distributions successfully
  • passing python -m twine check dist/* for both the wheel and sdist

Expected Outcome

This update should prevent the previous packaging-related production deployment failure from recurring and improve confidence in future releases by validating build artifacts before upload.


  • This PR satisfies the PR checklist.

Copy link
Copy Markdown
Member

@cmbengue-ec-intl cmbengue-ec-intl left a comment

Choose a reason for hiding this comment

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

Good work on this. A few changes are needed.

Comment thread .github/workflows/cd.yml Outdated
Comment thread .github/workflows/ci.yml
Copy link
Copy Markdown
Member

@cmbengue-ec-intl cmbengue-ec-intl left a comment

Choose a reason for hiding this comment

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

LGTM

@k-alphonse k-alphonse added this pull request to the merge queue Apr 17, 2026
Merged via the queue into staging with commit 9dd3578 Apr 17, 2026
3 checks passed
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