Skip to content

Fix pricing file not included in pip wheel#17

Merged
anilmurty merged 2 commits into
mainfrom
fix-pricing-packaging
Apr 8, 2026
Merged

Fix pricing file not included in pip wheel#17
anilmurty merged 2 commits into
mainfrom
fix-pricing-packaging

Conversation

@anilmurty
Copy link
Copy Markdown
Contributor

Summary

pricing/models.toml lives at the repo root, outside the ocw/ package. The wheel only includes ocw/, so pip install openclawwatch results in:

CostEngine hook failed: [Errno 2] No such file or directory: '.../site-packages/pricing/models.toml'

All costs show $0.000000.

Fix: Copy models.toml into ocw/pricing/ (inside the package) and update the path in pricing.py. The original pricing/ at repo root is kept for reference.

Test plan

  • All 243 tests pass
  • python3 -c "from ocw.core.pricing import load_pricing_table; print(load_pricing_table())" works
  • After release: pip install --upgrade openclawwatch && python3 -c "from ocw.core.pricing import load_pricing_table; print('ok')" succeeds

🤖 Generated with Claude Code

anilmurty and others added 2 commits April 8, 2026 11:24
Move pricing/models.toml into ocw/pricing/ so it's packaged in the
wheel. Update path in pricing.py from parent.parent.parent (repo root)
to parent.parent (package root). Fixes CostEngine "No such file"
error when installed via pip.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@anilmurty anilmurty merged commit 3cf744e into main Apr 8, 2026
4 checks passed
@anilmurty anilmurty deleted the fix-pricing-packaging branch April 8, 2026 20:57
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