fix: map mace imports to mace-torch - #10594
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Pull request overview
This PR fixes dependency inference for the mace import namespace by mapping it to the correct PyPI distribution (mace-torch) instead of the unrelated mace package. This improves the accuracy of marimo’s “missing import → installable package” resolution, including when writing PEP 723 script metadata.
Changes:
- Add
"mace": "mace-torch"to the module→PyPI package mapping registry. - Add unit tests covering both module→package and package→module resolution for the new mapping.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
marimo/_runtime/packages/module_name_to_pypi_name.py |
Adds the mace → mace-torch mapping entry used by canonicalization logic. |
tests/_runtime/packages/test_pypi_package_manager.py |
Extends existing mapping tests to validate forward and reverse resolution for mace-torch. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks @alchem0x2A. Can you add a comment with I have read the CLA Document and I hereby sign the CLA to sign the CLA? |
|
thx @akshayka I have read the CLA. cheers |
| assert mgr.module_to_package("marimo") == "marimo" | ||
| assert mgr.module_to_package("123_456_789") == "123-456-789" | ||
| assert mgr.module_to_package("sklearn") == "scikit-learn" | ||
| assert mgr.module_to_package("mace") == "mace-torch" |
There was a problem hiding this comment.
I don't think we need the test- but thank you!
There was a problem hiding this comment.
Thx! Was just testing the CI. Indeed can revert to the minimal tests marimo currently has
|
I have read the CLA Document and I hereby sign the CLA |
📝 Summary
Closes #10585
marimo currently infers the missing
maceimport as the unrelated PyPI packagemace. Themacenamespace used bymace.calculatorsis provided bymace-torch.This PR adds the
mace→mace-torchpackage mapping and tests both the forward and reverse mappings.📋 Pre-Review Checklist
module_name_to_pypi_name.py#10585.✅ Merge Checklist