Skip to content

Include tests and examples in sub-package source distributions#1618

Open
skrawcz wants to merge 2 commits into
mainfrom
stefan/add-tests-examples-to-sdist
Open

Include tests and examples in sub-package source distributions#1618
skrawcz wants to merge 2 commits into
mainfrom
stefan/add-tests-examples-to-sdist

Conversation

@skrawcz
Copy link
Copy Markdown
Contributor

@skrawcz skrawcz commented Jun 1, 2026

Problem

Vote feedback on RC0: tests and examples were excluded from the source tarballs. Per Apache release policy, voters need to be able to build from source and run tests to validate.

Changes

Tests included in sdist (all 4 packages):

  • ui/sdk: removed tests/** from exclude, added to include
  • dev_tools/language_server: same
  • contrib: removed tests/** from exclude
  • ui/backend: already included (no change)

Examples included via symlinks (SDK + Contrib):

  • ui/sdk/examples../../examples/hamilton_ui/
  • contrib/examples../examples/contrib/

Binary files excluded from sdist:

  • *.parquet, *.pkl, *.ipynb, *.png excluded to keep tarballs source-only

Verification

Built all 4 sdists and confirmed:

  • Tests present in all 4 source tarballs
  • Examples present in SDK and Contrib tarballs (source files only, no binaries)
  • All included files have Apache license headers

Context

Addresses feedback from Jernej Frank's -1 votes on SDK, LSP, and Contrib RC0:

In the main package we add tests to the source tarball and sdist, but here they are omitted.

Per Apache release policy, tests should be included in the sdist so
voters can build from source and run tests to validate.

- ui/sdk: removed tests/** from exclude, added to include
- dev_tools/language_server: same
- contrib: removed tests/** from exclude (tests live inside the package)
- ui/backend: already includes tests/** (no change needed)
@skrawcz skrawcz force-pushed the stefan/add-tests-examples-to-sdist branch from 2df93a8 to 78e4829 Compare June 1, 2026 06:04
@skrawcz skrawcz deployed to github-pages June 1, 2026 06:04 — with GitHub Actions Active
Copy link
Copy Markdown
Collaborator

@Dev-iL Dev-iL left a comment

Choose a reason for hiding this comment

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

The PR change is verified:

  • tests are present in all 4 sdists.
  • The contrib package has 4 test files co-located inside the package (not a top-level tests/ dir), which is correct given how that package is structured.

Copy link
Copy Markdown
Contributor

@jernejfrank jernejfrank left a comment

Choose a reason for hiding this comment

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

Great, there's this one script that seems like we need to include in the source in the contrib package. Otherwise, rest looks all good!

Comment thread contrib/pyproject.toml
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.

in th emain pacakge we all include scripts folder. contrib package also has script, do we wan to include them?

- Add prerequisite check for gpg, java, flit, uv, svn at script start
  (fails early with clear error instead of cryptic flit-not-found)
- Fix contrib verify: cd to /tmp before running python imports to avoid
  CWD shadowing installed hamilton package with local repo directory
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.

3 participants