openworm / tracker-commons

Compilation of information and code bases related to open-source trackers for C. elegans
11 stars 12 forks source link

Python-Side C/C++ wrapper interface codes #88

Closed cheelee closed 8 years ago

cheelee commented 8 years ago

Am kinda "planting the flag" with this pull request.

The work is still incomplete, but a Python-embedded C/C++ library wrapper prototype can be "played-with" as a standalone half-tool. The key components of WCONWorms involving data still need their basic access methods implemented, after which special considerations need to be made on how Python dict, and pandas Data Frames should be accessed from an Octave user's standpoint.

MeasurementUnits wrapping is fully implemented as C/C++.

The other half of the wrapper library (that of Octave-to-C/C++ bindings) has example code in place, and does not look too complicated to implement - almost a one-to-one mapping to the already available C-to-Python wrapper interface. The key design decisions on that front will almost certainly be data access, transfer and mapping.

Needless to say, this prototype is very much pre-alpha. A lot of liberties were taken for quick coding effort, much refactoring remains to be done.

Testing: The prototype was tested against an Ubuntu 14.04 LTS VM via VirtualBox on Mac OS X, following basic OWAT and WCON setup. It requires the tracker-commons repository to be present.

The prototype will NOT work on Mac OS X for a number of annoying reasons - mostly due to the Mac not liking psutils for Python 3 that WCON needs, and some bizarre python3.5-config behavior under miniconda3 (works fine with Python3 under Homebrew however).

This prototype has NOT been tested with Python 2.

MichaelCurrie commented 8 years ago

Once #93 is merged, can you please rebase to master and then re-run the final travis test?

git checkout master
git pull
git checkout octave
git rebase master
git push -f

Just gave you push rights to the openworm/tracker-commons repository.

Actually this might be tricky since this is a branch on your forked repository. I'm not sure how to accomplish the above in that situation.

If everything passes (which it should unless your couple of Python scripts violate PEP-8) then we can merge this one as well.

MichaelCurrie commented 8 years ago

OK I just merged it then ran autopep8 and cleaned up the couple of PEP-8 violations, with commit 51f4a78951196482172bb1e082379f73ac2b6552.

MichaelCurrie commented 8 years ago

@cheelee from now on you can drop your fork and just develop from branches on openworm/tracker-commons if you like, since you have push rights now.

cheelee commented 8 years ago

Ah cool! I tend to do PR and have some other pair of eyes approve it, but I'll just be double sure it is a safe PR before I act on it from now on. Thanks!