Skip to content

fix(coordinode): move package into coordinode/ subdirectory for correct wheel build#10

Merged
polaz merged 1 commit intomainfrom
fix/#9-coordinode-package-structure
Apr 9, 2026
Merged

fix(coordinode): move package into coordinode/ subdirectory for correct wheel build#10
polaz merged 1 commit intomainfrom
fix/#9-coordinode-package-structure

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Apr 9, 2026

Summary

  • Move coordinode/__init__.py, client.py, _types.pycoordinode/coordinode/ subdirectory
  • Fix Makefile: PROTO_OUT := coordinode/coordinode/_proto
  • Fix pyproject.toml: version-file = "coordinode/_version.py", revert to packages = ["coordinode"]
  • Fix .gitignore: updated paths for generated files

Root Cause

PR #8 changed packages = ["coordinode"] to sources = {"." = "coordinode"} attempting to fix the empty wheel. While this approach partially worked (proto stubs were included), it failed to include the top-level __init__.py, client.py, and _types.py files — they ended up at _proto/ in the wheel without the coordinode/ namespace, leaving coordinode.__init__ absent.

The correct fix is to match the structure used by langchain-coordinode and llama-index-coordinode: the Python package files must live in a named subdirectory (coordinode/coordinode/) so hatchling's packages = ["coordinode"] can discover them.

Verification

Local build produces a wheel with 43 Python files under coordinode/ namespace including coordinode/__init__.py. Import test:

from coordinode import CoordinodeClient  # ✓ works

Closes #9

…ct wheel build

hatchling's packages = ["coordinode"] requires a coordinode/ subdirectory.
Previously __init__.py and other modules were co-located with pyproject.toml,
making the project root the package root — unsupported by hatchling.

Move __init__.py, client.py, _types.py → coordinode/coordinode/
Update pyproject.toml: version-file path, revert sources → packages
Update Makefile: PROTO_OUT points to coordinode/coordinode/_proto/
Update .gitignore: adjusted paths for generated files

The resulting wheel now correctly contains coordinode/__init__.py
and all submodules, making the package importable after pip install.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Warning

Rate limit exceeded

@polaz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 25 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 25 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 90f24f70-4bed-4c86-9661-49ca374eff1c

📥 Commits

Reviewing files that changed from the base of the PR and between 1e613ab and 9328532.

📒 Files selected for processing (6)
  • .gitignore
  • Makefile
  • coordinode/coordinode/__init__.py
  • coordinode/coordinode/_types.py
  • coordinode/coordinode/client.py
  • coordinode/pyproject.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#9-coordinode-package-structure

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 2a63dd0 into main Apr 9, 2026
2 of 7 checks passed
polaz added a commit that referenced this pull request Apr 9, 2026
- ci.yml: use 'uv sync --all-packages' in test jobs so workspace members
  (coordinode, langchain-coordinode, llama-index-graph-stores-coordinode)
  are installed as proper editable packages via .pth files. Without this,
  uv sync only installs dev dependencies and leaves workspace packages
  uninstalled, causing ModuleNotFoundError in tests.

- ruff.toml: update proto stubs exclude path to coordinode/coordinode/_proto/
  (moved in #10); exclude _version.py (generated by hatch-vcs, unformatted)

- tests/unit/test_types.py: fix I001 — remove blank line between same-group
  imports (pytest + coordinode._types are both third-party)

- Makefile: clean target also removes coordinode/coordinode/_proto/google
  (google.api stubs generated alongside coordinode stubs)

- Remove coordinode/_proto/__init__.py that was mistakenly committed to git
  (generated file, should only exist in gitignored coordinode/_proto/)
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