Git Product home page Git Product logo

gsoc-2022-autowrap's Introduction

For the Google Summer of Code 2022 event, I worked with an Open Bioinformatics Foundation (OBF) subgroup called OpenMS. Specifically, I worked on the Autowrap project, a tool for making C++ libraries available in Python. The following bullet points enuemrate some of the work I accomplished:

  • My progress report page tracks what I've accomplished so far
  • The PR page is a list of pull requests I've made throughough the project
  • The lessons learned is a collection of I've learned during GSoC

My Contributions

The initial goal of this GSoC project was to add support for C++ STL. However, I spent most of the time working on adding support for unsupported operators and the mapping of wrapped classes. Here are some highlights of what I did accomplish over the Summer:

Housekeeping

Ahead of the project, I made a couple of low-tech contributions. The first involved a PR adding a lot documentation. Additionally, I opened a PR adding automated lint checker to the CI pipeline.

Support for Mapping Wrapped Classes

Next, I started work on adding support for wrapped STL classes. An example of such a wrapping would include something like std::map<vector vector>. The initial PR can be viewed here.

Adding Support for Shift and Modulus Operators

The next PR I opened included work for adding support for C++'s shift, modulus, and their equivalent assignment operators. Specifically, support was added for the follow operators: <<, >>, <<=, >>=, %, and %=.

More Mapping Support

Unfortunately, I was never able to finish adding support for the mapping of wrapped classes. You can see my most recent PR here: OpenMS/autowrap#160 As you can see in this PR, there was a lot of conversation about how best to do this. I eventually could not figure out how to implement what the maintainers wanted. Hopefully, I will be able to finish this PR in a way that satisfies the maintainers, even if it does fall inside the GSoC timeline.

std::tuple Support

One PR that is currently unfinished is the beginning of adding support for the standard template library's tuple data structure. As of writing this, the tuple PR adds an StdTupleConverter class to the ConversionProvider file. Once this work is completed, it will set the stage for other library data structures to be added.

Background Info

Here's an overview of this project in general

Open Bioinformatics Foundation

From the OBF website:

The Open Bioinformatics Foundation (OBF) is a non-profit, volunteer-run group that promotes open source software development and Open Science within the biological research community.

Bioinformatics is formally described as the science of collecting and analyzing biological data. It's most often associated with genomics--the scince of mapping genomes--but includes much more.

OpenMS

From the OpenMS website:

OpenMS offers an open-source software C++ library (+ python bindings) for LC/MS data management and analyses. It provides an infrastructure for the rapid development of mass spectrometry related software as well as a rich toolset built on top of it.

Mass spectrometry is a tool used in the life sciences to measure the mass-to-charge ratio of ions. This is useful for determing the structure of a compound, identifying unknown compounds, or determining the isotopic composition of elements in a molecule.

OpenMS is part of deNBI Center for Integrative Bioinformatics, part of an academic laboratory based in Germany.

Autowrap

According to the OpenMS GSoC Project Description:

Autowrap is a python package for the automated wrapping of whole C++ projects into Python via Cython.

Cython is a programming language and superset of Python which supports calling C/C++ functions and types in Python code. The process of properly making C/C++ libraries available as Python modules is a tedious and time consuming process that Autowrap mostly automates for the developer.

The GSoC project

The GSoC Project description was posted here and is described as such:

Autowrap is a python package for the automated wrapping of whole C++ projects into Python via Cython. C++ developers basically need to provide a Cython header file for each C++ header file to specify what needs to be wrapped and how. It then analyses the syntax tree generated by the Cython parser for those “header” files and generates Cython source code for it. Cython then creates the necessary source code to be compiled with e.g. CPython to create a Python extension module to be imported by the end-user. While the wrappers created by autowrap are rather simple, passing templated and nested STL objects like vectors, maps, or tuples between Cython/Python and C++ with autogenerated code can become rather complex. Autowrap offers recursion for nested vectors but cannot handle mixed data structures yet. It also misses support for newer STL containers like tuples and only offers simple vector to (Python) list conversions, while numpy arrays, e.g. via the buffer protocol would sometimes be more suitable. We are seeking for a motivated GSoC contributor proficient in at least Python to tackle those improvements.

Throughout this Summer, I will be working with the helpful developers at OpenMS to complete this project.

Erik

Hey, I'm Erik, the contributor for this project. I'm a Sr. Software Engineer at CallRail and a PhD student at the University of Nebraska - Lincoln. My research interests include scientific computing, nanotechnology, and bioinformatics.

Links

Open Bioinformatics Foundation

OpenMS

Autowrap

Cython

GSoC

Erik's blog

Some Notes on the Project

This was my availability for the Summer

At the beginning of August, my professional obligations stacked up, and then I started my PhD. As such, after then, I neglected the project and was not able to finish nearly as much as I had hoped. My sincerest apologies to the Open Bioinformatics Foundation and to the friendly developers of OpenMS and Autowrap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.