NeuroML / NeuroML2

This repository hosts the NeuroML 2 Schema, the ComponentType definitions in LEMS and the core documentation of NeuroML2.
https://docs.neuroml.org
GNU Lesser General Public License v3.0
50 stars 24 forks source link

Create C++ API for NeuroML 2 #102

Closed pgleeson closed 7 years ago

pgleeson commented 7 years ago

C++ API for reading/editing/writing NeuroML2

Priorities will be:

An initial version of this be worked on by @jonc125 under https://github.com/NeuroML/NeuroML_API

One option to be explored is a quick C++ API with Codesynthesis XSD...

jonc125 commented 7 years ago

Note that with CodeSynthesis we can distribute the required bits of their code with the NeuroML API under an open source licence provided that our code "does something useful" rather than just being a wrapper around the auto-generated code. See http://www.codesynthesis.com/projects/xsd/FLOSSE for details. So we'd probably need some utility stuff similar to the Python libNeuroML before we could do this. But if we can then I think the only external dependency would be Xerces-C++ which is pretty standard.

(People wanting to regenerate the bindings would need to install CodeSynthesis XSD themselves.)

jonc125 commented 7 years ago

Initial demo created in https://github.com/NeuroML/NeuroML_API/commit/7ce61dbb198d50deb963a6120e28c02c3ba31e14

Some questions:

jonc125 commented 7 years ago

Done some work on adding custom methods; latest in NeuroML/NeuroML_API@c170898. I haven't done everything from the Python library as some of them appear to be for classes that are now deprecated, and I couldn't see test files using them in the Python repo.

The next step would probably be to package this as a CMake project that can be installed as library + headers, with the hooks for other CMake projects to find it easily.

It could also do with some more thorough testing, including of creating models from scratch. We should agree on a naming convention to follow before doing much more coding around the APi though!

pgleeson commented 7 years ago

@jonc125 See above for answers... I have it successfully installed locally and have managed to write another example for creating nml files, but just saw some refactoring for cmake before I could commit.. Let me know when updated version is stable.

jonc125 commented 7 years ago

@pgleeson Everything should be in the right place now and ready to use. Just some fine-tuning of options, but that shouldn't prevent you adding another example. Would be useful to see what you've done in creating something from scratch to see what kinds of helpers would be wanted there.

Another question - do you have a preference for licence to use? I think we discussed MIT last week? Then I can add the appropriate "Copyright UCL" notices.

pgleeson commented 7 years ago

Closing this issue and new ones can be create for refinements.

jonc125 commented 7 years ago

Probably best to put any new issues in https://github.com/NeuroML/NeuroML_API/issues