AIFDR/inasafe — pull request #1445 by akbargumbira (2014-12-19 10:59:01+00:00)
Title: InaSAFE Refactor

# Key Changes
- Removing all retired IFs in safe.extras and IFs for testing in safe.engine (here is all the archive https://github.com/AIFDR/inasafe/wiki/Retired-Impact-Function)
- Removing geoprocessing algs (and their related tests which are not being used)
- Deleting files directory under safe and move all the necessary files to resources instead
- Creating top level safe package, moving packages under safe_qgis into safe package (with the consequences e.g having i18n in just one package now)
- No more safe_interface and safe_api. Moved all the functions inside these modules and just use directly all those functions now.
- Getting rid of resources.qrc and using file based resources directly
- Dynamically loading UI files (see get_ui_class)
- Consolidating i18n (not finished). In other words: removing gettext and use PyQT translator instead
- Moving ResourceParameter from parameter library and just inherit from parameter library
- Moving tests in dock related to testing impact function to safe.impact_functions.test. Please see how we test the IF now.
- Merging Ole’s code into one directory (safe.gis package)
- Making directory layout and test file naming consistent throughout the code. There should be test package for testing the modules under the parent of test package e.g for safe.impact_functions.earthquake:
![selection_003](https://cloud.githubusercontent.com/assets/992519/5503226/32a6bfc0-87a7-11e4-8f69-3a55c7fd6830.png)
- The tests data follows this structure:
![selection_004](https://cloud.githubusercontent.com/assets/992519/5503255/8e18e5cc-87a7-11e4-8df1-7d7f89e3c577.png)
An API to get the path to the test_data or dir is created (see safe.test.utilities.test_data_path). Hence we should getting rid of UNITDATA, EXPDATA, HAZDATA, etc in the future (not finished removing the usage of those variables)
- Changing the tests that check the hash from the size of the output

# TO DO
- Creating contrived test data
- Removing reliance on inasafe_data repository for testing (inasafe_data will still be used to run the tests weekly)
- Finishing consolidating translation
- Moving application document to inasafe-dev
- Fixing scripts e.g for packaging