Skip to content

ship cspdk--sample-projects in wheel - #311

Open
jackgdsf wants to merge 2 commits into
gdsfactory:mainfrom
jackgdsf:310-ship-sample-projects-in-wheel
Open

ship cspdk--sample-projects in wheel#311
jackgdsf wants to merge 2 commits into
gdsfactory:mainfrom
jackgdsf:310-ship-sample-projects-in-wheel

Conversation

@jackgdsf

Copy link
Copy Markdown
Contributor

Closes #310

Migrates the build backend from flit to hatchling and uses force-include to ship the cspdk--sample-projects directory in the published wheel.

Reminder: AI-created PRs still require human review of the actual code changes before merge. I'll open the PR, but a human must review and approve it.

Migrate build backend from flit to hatchling and use
force-include to ship the cspdk--sample-projects directory
in the published wheel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the build system in pyproject.toml from flit_core to hatchling and configures wheel targets. The review feedback points out that force-including 'cspdk--sample-projects' at the root of the wheel will pollute the global site-packages namespace, and suggests nesting it under the main 'cspdk' package instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread pyproject.toml Outdated
packages = ["cspdk"]

[tool.hatch.build.targets.wheel.force-include]
"cspdk--sample-projects" = "cspdk--sample-projects"

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.

medium

Including 'cspdk--sample-projects' at the root of the wheel will install it directly into the user's 'site-packages' directory as a top-level directory, polluting the global namespace. It is highly recommended to nest the sample projects under the main package namespace (e.g., 'cspdk/sample-projects') to keep the environment clean and allow programmatic access using importlib.resources.

Suggested change
"cspdk--sample-projects" = "cspdk--sample-projects"
"cspdk--sample-projects" = "cspdk/sample-projects"

Move [tool.hatch.*] sections to correct alphabetical position
among [tool.*] sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

sample-projects directory not included in published wheel

1 participant