Skip to content

fix: include examples README in wheel package (#226) - #378

Open
EMPLORES wants to merge 1 commit into
ARPAHLS:mainfrom
EMPLORES:issue-226-examples-readme
Open

EMPLORES wants to merge 1 commit into
ARPAHLS:mainfrom
EMPLORES:issue-226-examples-readme

Conversation

@EMPLORES

Copy link
Copy Markdown

Summary

Fixes #226(Phase A)Ship the examples index with the wheel so skillware examples and skillware list --examples can work for pip-only installs without relying on GitHub raw access.

Changes

  • Copy examples/README.md to skillware/resources/examples/README.md during the build.
  • Register the custom build_py command in pyproject.toml.
  • Update _examples_readme_path() to check the packaged copy before checkout/cwd discovery and GitHub fallback.

Verification

  • python -m build --wheel
  • Installed the built wheel into an isolated directory.
  • Ran python -m skillware examples outside the repository.
  • Ran python -m skillware list --examples.
  • Verified that the packaged README is discovered through package resources.

@rosspeili

Copy link
Copy Markdown
Contributor

Hi @EMPLORES, the approach is on the right track yet a few technical blockers before this is ready to merge:

  1. Resolution Order: Per [Feat]: Ship examples/README.md in wheel; optional skillware examples --sync fallback #226, the resolution order must be local checkout → wheel bundled index → GitHub raw. Currently, the packaged resource check runs before the local checkout walk, which breaks live editing in local checkouts / editable installs.
  2. Source Distribution (sdist) Bug: examples/README.md was not added to MANIFEST.in. When building from an sdist archive, examples/ won't exist in the tarball, causing build_hooks.py to raise FileNotFoundError. Please add include examples/README.md to MANIFEST.in.
  3. Packaging Simplicity: Consider avoiding [tool.setuptools.cmdclass] / build_hooks.py if possible in favor of standard declarative package-data / MANIFEST.in to prevent build-isolation edge cases.
  4. Missing Tests & Docs:
    • Add unit test coverage in tests/test_cli.py verifying that the bundled resource is resolved when local files are absent.
    • Update docs/usage/cli.md mentioning offline bundled examples index support.
    • Add an entry under ## [Unreleased] in CHANGELOG.md.

Please update the PR with these fixes so we can get this merged cleanly!

This branch has not been deployed

No deployments
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.

[Feat]: Ship examples/README.md in wheel; optional skillware examples --sync fallback

2 participants