Skip to content

[SC-16431] Limit build contents to reduce PyPI package size#520

Merged
juanmleng merged 2 commits into
mainfrom
juan/sc-16431/limit-build-contents-to-reduce-pypi-package-size
May 27, 2026
Merged

[SC-16431] Limit build contents to reduce PyPI package size#520
juanmleng merged 2 commits into
mainfrom
juan/sc-16431/limit-build-contents-to-reduce-pypi-package-size

Conversation

@juanmleng
Copy link
Copy Markdown
Contributor

Pull Request Description

What and why?

Restricted the Hatch build outputs so published artifacts only include the validmind package and required release metadata. This reduces the source distribution from over PyPI’s 100 MB limit to about 20 MB, preventing upload failures, and removes a stale console-script reference plus outdated docs for a non-existent test-generation script.

How to test

Run uv build and confirm the generated dist/*.tar.gz and dist/*.whl files are created successfully. Verify the source distribution is below PyPI’s 100 MB limit and does not include repo-only directories such as notebooks/, docs/, .github/, scripts/, or the top-level tests/.

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

Restrict Hatch build outputs to the package and required metadata so release artifacts stay under PyPI's file size limit. Remove the stale test-generation CLI reference to keep contributor docs aligned with the current repo layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@juanmleng juanmleng self-assigned this May 26, 2026
@juanmleng juanmleng added internal Not to be externalized in the release notes chore Chore tasks that aren't bugs or new features labels May 26, 2026
@juanmleng juanmleng changed the title build: limit package contents for PyPI uploads [SC-16431] Limit build contents to reduce PyPI package size May 26, 2026
@juanmleng juanmleng requested review from cachafla and johnwalz97 May 26, 2026 20:44
Copy link
Copy Markdown
Contributor

@johnwalz97 johnwalz97 left a comment

Choose a reason for hiding this comment

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

nice!

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown
Contributor

PR Summary

This PR introduces several changes that affect the packaging configuration and the test creation workflow:

• The version numbers have been updated from 2.13.3 to 2.13.4 in various project files (pyproject.toml, DESCRIPTION, uv.lock, version.py). (Note: Version bumps are considered trivial and are not the focus of this summary.)

• A new packaging configuration has been added using Hatch. The PR defines explicit sdist and wheel targets with specified inclusion and exclusion rules. This ensures that only the necessary files are packaged, helping to maintain a clean distribution.

• The project’s test creation mechanism has been modified. The console script registration for generating new tests (vm-create-new-test) has been removed from pyproject.toml, and the corresponding documentation in scripts/README.md has been updated. Users are now instructed to manually create new tests by adding files to the appropriate directory and following the established naming and structure patterns.

Test Suggestions

  • Test that the sdist and wheel packages include only the intended files and correctly exclude the specified directories and patterns.
  • Verify that the manual test creation process works by creating a sample test file in the validmind/tests/ directory and ensuring it is recognized correctly.
  • Confirm that the removed test generation script is no longer available as a console command and that any dependency on it has been properly handled.
  • Check that the version information in built and deployed packages reflects the updated version (2.13.4).

@juanmleng juanmleng merged commit e49a008 into main May 27, 2026
21 checks passed
@juanmleng juanmleng deleted the juan/sc-16431/limit-build-contents-to-reduce-pypi-package-size branch May 27, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore tasks that aren't bugs or new features internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants