Skip to content

Evaluate if wrapping functions that accept std::function (callbacks) are easily possible #165

@jpfeuffer

Description

@jpfeuffer

Should work with wrapped extension and primitive types.

https://stackoverflow.com/questions/45943940/cython-stdfunction-callbacks-with-custom-parameter-types
https://stackoverflow.com/questions/39044063/pass-a-closure-from-cython-to-c/39052204#39052204
https://github.com/hildensia/py_c_py

If possible without using boost::python, but it would not be a dealbreaker, if it can be made optional.

Some similar manual things were done here:
https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/extra_includes/python_ms_data_consumer.hpp
https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/pxds/PythonMSDataConsumer.pxd
https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/addons/MzMLFile.pyx

Applications for e.g. OpenMS would be apply functions for large in-memory MSExperiments, to apply an algorithm (written in Python via our wrappers) to each spectrum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions