Conversation
Pull Request Test Coverage Report for Build 21974702219Details
💛 - Coveralls |
0d0077f to
b44717f
Compare
|
This only includes a few modules in the mypyc compilation. We should be able to add more. |
There was a problem hiding this comment.
Pull request overview
This PR introduces mypyc compilation support to the plum-dispatch package to improve performance by compiling critical Python modules to C extensions. The changes include configuring the build system for mypyc, updating CI/CD workflows to build and test compiled wheels for multiple platforms, and making necessary code adjustments for mypyc compatibility.
Changes:
- Added mypyc build configuration with hatch-mypyc and cibuildwheel for cross-platform wheel builds
- Introduced
COMPILEDflag to detect if the package is running as compiled code - Fixed type compatibility issues for mypyc compilation (bool wrapping, frozenset conversion)
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds mypyc and cibuildwheel configuration, test markers, and build dependencies |
| src/plum/init.py | Implements COMPILED flag to detect mypyc-compiled modules |
| src/plum/_resolver.py | Wraps return values with bool() for mypyc type inference compatibility |
| tests/test_method.py | Fixes type mismatch by wrapping sets with frozenset() |
| tests/test_resolver.py | Marks test incompatible with mypyc (uses monkeypatch on compiled module) |
| .github/workflows/publish.yml | Complete rewrite to build both pure Python and mypyc-compiled wheels, use trusted publishing |
| .github/workflows/ci.yml | Adds mypyc wheel testing job, updates actions versions and coverage paths |
| noxfile.py | Fixes pylint path from "plum" to "src/plum" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
|
@wesselb the more we can get into mypyc the faster things should get! |
|
@nstarman Let's go! That's awesome. Do we need to somehow test |
|
Yeah, I'm not entirely sure how to test publish.yml except by trying it... |
|
Let's go for it and see what happens! |
|
After a bit of trial and error, I think the builds succeeded! :) |
|
Excellent. Now we can a todo to feed more modules to mypyc. |
A
very earlystarting implementation of mypyc builds.