Hintzelab / MABE

Modular Agent Based Evolution Framework
Other
77 stars 24 forks source link

Refactor pythonTools/mbuild.py #291

Closed Shalmezad closed 5 years ago

Shalmezad commented 5 years ago

Needed to make some changes to mbuild.py for a small thing I'm working on, found it was a bit messy so I refactored it a bit.

Main changes are:

I did test generating each of the projects on my machine, however I'm unable to check whether there's any issues with them, so please be sure to thoroughly test before merging in please.

JorySchossau commented 5 years ago

Nice! This looks better, for sure. What change did you require for your own work? I can't find this easily from your commit history. I am nearing completion of a new mbuild to eschew the dependency on python for configuration and building. We will leave the python one as an alternative so this PR is definitely useful.

Shalmezad commented 5 years ago

@JorySchossau The small change I needed was to add extern "C" to the function configureDefaultsAndDocumentation() in modules.h like so: https://github.com/Shalmezad/MABE/blob/pythonBindings/pythonTools/mbuild.py#L198 So that it can be bound to a python method: https://github.com/Shalmezad/MABE/blob/pythonBindings/pythonBindings/ModulesWrapper.py

Playing around a bit trying to make python bindings for MABE as a small side project.

cliff-bohm commented 5 years ago

checks out... merging.