Skip to content
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 data constructors and accessors #39

Closed
andrewvyrros opened this issue Mar 16, 2021 · 0 comments · Fixed by #73
Closed

FFI data constructors and accessors #39

andrewvyrros opened this issue Mar 16, 2021 · 0 comments · Fixed by #73
Assignees
Labels
Effort 2 - Medium 🍪 Used for estimation
Milestone

Comments

@andrewvyrros
Copy link
Member

andrewvyrros commented Mar 16, 2021

When calling OpenDP FFI Measurements/Transformations/Relations, the system requires that values are wrapped as an FFIObject (which ensures types compatibility). We need convenience functions to construct and access these from primitive values. These will be used a lot in FFI contexts, so we should think carefully about signatures. Perhaps something like this:

pub extern "C" fn opendp_data__new_scalar(type_args: *const c_char, val: *const c_void) -> FfiResult<*mut FfiObject> ...

(This would be analogous to the existing opendp_data__from_string() & opendp_data__to_string() functions, which should be folded into this.)

This should also include convenience wrappers in Python that automatically Python objects.

@andrewvyrros andrewvyrros added this to Needs Discussion in OpenDP Development via automation Mar 16, 2021
@andrewvyrros andrewvyrros changed the title FFI Data constructors and accessors FFI data constructors and accessors Mar 16, 2021
@andrewvyrros andrewvyrros added the Effort 2 - Medium 🍪 Used for estimation label Mar 19, 2021
@andrewvyrros andrewvyrros moved this from Needs Discussion to In Progress in OpenDP Development Apr 7, 2021
@andrewvyrros andrewvyrros self-assigned this Apr 7, 2021
OpenDP Development automation moved this from In Progress to Done Apr 8, 2021
Shoeboxam pushed a commit that referenced this issue Apr 8, 2021
Closes #39.

    Refactored Type representation and lookup.
    Added common FFI entry points for data marshaling.
    Wrote glue for easy access from Python.


* Restructured Python project:
* Created Python package.
* Reworked library initialization.
* Added unit test skeleton.
* Added pip requirements.

* * Added setuptools config.

* Implemented FFI data constructors and accessors:
* Refactored Type representation and lookup.
* Added common FFI entry points for data marshaling.
* Wrote glue for easy access from Python.
@andrewvyrros andrewvyrros added this to the 0.1.0-M3 milestone Jun 16, 2021
@andrewvyrros andrewvyrros removed the v0.1 label Jun 16, 2021
@andrewvyrros andrewvyrros mentioned this issue Jun 17, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort 2 - Medium 🍪 Used for estimation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant