Functions renaming
In 1.0, remains an inconsistency regarding the public interface : each connector can use two decorators : get_database and create_database. However, the corresponding heimdall module functions are getDatabase and ... serialize.
Serialize is presumably not a comonly used word among heimdall's target userbase. Plus, the current heimdall.serialize really creates a database, and sould be renamed heimdall.createDatabase, so there is a clear symmetry between the 2.
In addition to that, this might open the way to future functions heimdall.updateDatabase, heimdall.deleteDatabase and son on in future versions, with consistent HERA names.
In the meanwhile, heimdall.createDatabase already exists, and just creates an empty tree.
This should be refactored :
- either in an
emptyconnector or something, - or as an utility method, ie. in package
heimdall.util
I prefer solution 2., because empty databases can potentially make sense for all connectors, and this would be decided by passing an empty tree parameter.
Thus:
-
heimdall.createDatabaseshould be moved asheimdall.util.tree.create_Database_empty_tree, so that -
heimdall.serializeshould be renamed asheimdall.createDatabase
The problem is ... as this means a public interface break, this would imply a version 2.0, although pyheimdall 1.0 was published just one month ago.