-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFI Wrapper #403
FFI Wrapper #403
Conversation
Hey had a quick look at this, should this have master merged into it now? or master merged into the ffi-groundwork PR? Would make it a bit easier to review in a ui diff I think. |
Yeah sorry for the review being difficult. It's built on top of the FFI groundwork, hence why it has a lot of extra commits. Only the last commit, 0afc711, is new. |
no need to apologise, wasn't sure if it was because of some git merge mastery that you have lined up. i ended up merging master in locally in the previous #395 as I wanted to run the examples, after running and checking the PR as it was |
0afc711
to
c41b470
Compare
c41b470
to
efa3c15
Compare
I have rebased this PR on top of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good stuff!
99f7657
to
6e9db03
Compare
efa3c15
to
8217ab0
Compare
Import close to 400 functions exposed by the Rust library into the `ffi.py` file. All of them (save `version`) solely raise a `NotImplementedError`. The documentation of the functions has been automatically imported from the exposed docstring by the `pact.h` header. Some more minor changes includes: - Adding the `py.typed` marker file (see [PEP 561](https://peps.python.org/pep-0561/)) - Move all tests relating to `v3` into `tests/v3` - Minor fixes toe the `ruff.toml` lint rules for tests - Update type dependencies Signed-off-by: JP-Ellis <josh@jpellis.me>
8217ab0
to
d8705e7
Compare
Rebased on top of |
📝 Summary
Implement a
pact.v3.ffi
module which exposes functions to cover all of the functions exposed by the Pact library.Due to the number of functions, most of these are simply:
and they will be filled in as the implementation proceeds.
Most of the code in this PR was automatically created, and then modified slightly to ensure conformance with Ruff's lints.
🚨 Breaking Changes🔨 Test Plan
As the rest of the
pact.v3
module gets populated, more of these functions will get tested. At this stage, onlyversion
is defined and tested.All tests for the new
pact.v3
modules will be stored under the correspondingtests/v3/
directory.🔗 Related issues/PRs
Resolves: Implement a thin wrapper for all the FFI functions in the core library #399
Turns out that implementing a wrapper for all functions was a bit ambitious given the number of functions.
FFI Groundwork #395
That PR must be merged before this PR.