biocore/qiita — pull request #29 by josenavas (2014-03-01 00:41:32+00:00)
Title: Re-define the API to handle dynamic objects (i.e. no in-memory representation)

This is another huge PR (hopefully the last one).

I've re-defined the entire project structure in order to handle all the objects dynamically. I ported the `mapping-file-adder` functionality to work with the current structure.

I've also fixed a reasonable amount of bugs and the PR is fully functional. There is still no test code, as I still don't really know how the tests have to be done (I know the idea, but not how to do it).

A short summary in how this works:
The objects are no longer on Qiita-core. They live now on Qiita-db. Qiita-db has base classes for all the objects that we want to use, and all the backends should implement them. However, the implemented classes cannot add new public functions; otherwise there won't be backend independence. If a new function is needed, it should be specified on the base classes and all the backends should implement it.

If in the future we want to include in-memory representation, the interface of the object won't change, just their implementation.

The interfaces of the objects are not complete: we can add new functionality to the base classes as we think we need it, I just put in place a minimum of it and the `metadata_map.py` is a good example on how this should work.

Fixes #20.
Fixes #26.
Fixes #13.