Skip to content

fix(coordinode): fix empty wheel — use sources mapping instead of packages#8

Merged
polaz merged 1 commit intomainfrom
fix/#8-coordinode-empty-wheel
Apr 9, 2026
Merged

fix(coordinode): fix empty wheel — use sources mapping instead of packages#8
polaz merged 1 commit intomainfrom
fix/#8-coordinode-empty-wheel

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Apr 9, 2026

Summary

  • Fix coordinode wheel containing 0 Python files (package was unimportable after PyPI install)

Root Cause

packages = ["coordinode"] in coordinode/pyproject.toml tells hatchling to look for a coordinode/coordinode/ subdirectory. Since pyproject.toml lives inside the coordinode/ project directory (alongside __init__.py), no such subdirectory exists — resulting in an empty wheel.

Fix

# Before (broken):
[tool.hatch.build.targets.wheel]
packages = ["coordinode"]

# After (correct):
[tool.hatch.build.targets.wheel]
sources = {"." = "coordinode"}

sources = {"." = "coordinode"} maps the current directory (.) as the coordinode package root, so all .py files are included under the coordinode/ namespace in the wheel.

Test Plan

  • Build wheel locally: uv run python -m build in coordinode/ — verify wheel contains coordinode/__init__.py and other modules
  • After merge and release, verify pip install coordinode && python -c "from coordinode import CoordinodeClient" succeeds

Closes #8

packages = ["coordinode"] looks for coordinode/coordinode/ subdir which
does not exist — pyproject.toml is inside the package directory itself.
sources = {"." = "coordinode"} maps the current dir as the coordinode
package, producing a wheel with actual Python files.

The 0.4.1 wheel contained 0 Python files, making the package unimportable.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ffa82ffd-ecfc-47db-b6f2-b6a38cd8e45f

📥 Commits

Reviewing files that changed from the base of the PR and between 2f55798 and 9a1204a.

📒 Files selected for processing (1)
  • coordinode/pyproject.toml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated build configuration to optimize package distribution in releases.

Walkthrough

The wheel build configuration in coordinode/pyproject.toml is updated from packages = ["coordinode"] to sources = {"." = "coordinode"}. This corrects how hatchling resolves the package directory, ensuring Python files are properly included in the built wheel.

Changes

Cohort / File(s) Summary
Build Configuration
coordinode/pyproject.toml
Changed wheel build target from packages declaration to sources mapping to correctly reference the package root and include all Python files in the distribution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main fix: changing wheel build configuration from packages to sources mapping to fix empty wheel issue.
Description check ✅ Passed The description thoroughly explains the root cause, the fix applied, and the test plan, all directly related to the changeset.
Linked Issues check ✅ Passed The PR directly addresses issue #8 by replacing packages = ["coordinode"] with sources = {".": "coordinode"} as specified, matching all coding requirements.
Out of Scope Changes check ✅ Passed The PR contains only the required pyproject.toml change to fix the wheel build configuration; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#8-coordinode-empty-wheel

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 9, 2026

@polaz polaz merged commit 93aba40 into main Apr 9, 2026
6 of 7 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.

1 participant