vls-lab/inselect — pull request #65 by aliceh75 (2014-09-18 15:31:29+00:00)
Title: Refactor file structure

Motivation
-------------
1. Make it easier to identify the various components of the application;
2. In preparation for other refactoring, make it easier and simpler to separate the GUI and application code from the generic functionality;
3. Prepare the way for plugin architecture.

Changes
-----------
- Added two folders, 'gui' and 'lib' and moved files where they belonged;
- Removed relative imports. This means that all imports from inselect must now be prepended with `inselect` (eg. `inselect.gui.graphics.BoxResizable`). Developers must ensure that inselect is in the python path - this can be done by running `pip install -e ...` or `python setup develop.py`. Because new modules were added, this should be run in any case on existing setups;
- Removed `_docopt.py` file. Could not find any reason in the git log why this was there - the version from PyPi seems to work fine;
- Renamed `image_viewer.image_viewer` to `inselect.gui.app.InselectMainWindow` to make the purpose clearer;
- Moved `ListItem` and `SegmentListWidget` into a file of their own (`sidebar.py`) and renamed `ListItem` to `SegmentListItem`;
- Changed the way the settings are accessed as that made refactoring easier. `inselect.settings.get('setting')` and `inselect.settings.set_value('setting', 'value')`. It is still possible to use a QSettings object directly: `q = QSettings(*inselect.settings.namespace)`