diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..8995650 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +recursive-include spykeviewer/plugins *.py diff --git a/README.rst b/README.rst index 04426d5..f7735d5 100644 --- a/README.rst +++ b/README.rst @@ -7,12 +7,4 @@ analyzing and visualizing electrophysiological datasets. Based on the wide variety of data formats. For more information, see the documentation at -http://spyke-viewer.readthedocs.org - -Dependencies -============ -* A least Python 2.7 -* spykeutils -* guiqwt -* guidata -* PyTables \ No newline at end of file +http://spyke-viewer.readthedocs.org \ No newline at end of file diff --git a/doc/source/extending.rst b/doc/source/extending.rst index b2daf9b..3fa8c63 100644 --- a/doc/source/extending.rst +++ b/doc/source/extending.rst @@ -2,11 +2,15 @@ Extending Spyke Viewer ====================== -How to make it do more! +There are two ways of extending Spyke Viewer: Analysis plugins and IO plugins. +Both are created by placing a Python file with an appropriate class into one +of the plugin directories defined in the :ref:`settings`. This section +describes how to create them. Analysis plugins ---------------- -Creating a plugin by example. Links to spykeutils docs. + +Guide with example coming soon... .. _ioplugins: diff --git a/setup.py b/setup.py index 24f4dc0..df5df6e 100644 --- a/setup.py +++ b/setup.py @@ -29,8 +29,9 @@ def find_version(): version = find_version() plugin_files = [] - for path, dirs, files in os.walk('plugins'): - plugin_files.append((path, [os.path.join(path,f) for f in files])) + for path, dirs, files in os.walk(os.path.join('spykeviewer', 'plugins')): + p = path.split(os.sep, 1)[1] + plugin_files.extend([os.path.join(p,f) for f in files]) setup( name="spykeviewer", @@ -43,7 +44,7 @@ def find_version(): 'gui_scripts': ['spyke-viewer = spykeviewer.start:main'] }, - data_files = plugin_files, + package_data = {'': plugin_files}, zip_safe=False, author='Robert Pröpper', maintainer='Robert Pröpper', diff --git a/spykeviewer/__init__.py b/spykeviewer/__init__.py index c12f34c..a9fdc5c 100644 --- a/spykeviewer/__init__.py +++ b/spykeviewer/__init__.py @@ -1 +1 @@ -__version__ = '0.1.1' \ No newline at end of file +__version__ = '0.2.0' \ No newline at end of file diff --git a/plugins/Raw Data/signal.py b/spykeviewer/plugins/Raw Data/signal.py similarity index 100% rename from plugins/Raw Data/signal.py rename to spykeviewer/plugins/Raw Data/signal.py diff --git a/plugins/Raw Data/spikes.py b/spykeviewer/plugins/Raw Data/spikes.py similarity index 100% rename from plugins/Raw Data/spikes.py rename to spykeviewer/plugins/Raw Data/spikes.py diff --git a/plugins/Spike Trains/correlogram.py b/spykeviewer/plugins/Spike Trains/correlogram.py similarity index 100% rename from plugins/Spike Trains/correlogram.py rename to spykeviewer/plugins/Spike Trains/correlogram.py diff --git a/plugins/Spike Trains/interspike_intervals.py b/spykeviewer/plugins/Spike Trains/interspike_intervals.py similarity index 100% rename from plugins/Spike Trains/interspike_intervals.py rename to spykeviewer/plugins/Spike Trains/interspike_intervals.py diff --git a/plugins/Spike Trains/psth.py b/spykeviewer/plugins/Spike Trains/psth.py similarity index 100% rename from plugins/Spike Trains/psth.py rename to spykeviewer/plugins/Spike Trains/psth.py diff --git a/plugins/Spike Trains/raster_plot.py b/spykeviewer/plugins/Spike Trains/raster_plot.py similarity index 100% rename from plugins/Spike Trains/raster_plot.py rename to spykeviewer/plugins/Spike Trains/raster_plot.py diff --git a/plugins/Spike Trains/sde.py b/spykeviewer/plugins/Spike Trains/sde.py similarity index 100% rename from plugins/Spike Trains/sde.py rename to spykeviewer/plugins/Spike Trains/sde.py diff --git a/spykeviewer/ui/main_window.py b/spykeviewer/ui/main_window.py index 080d674..5b0ec35 100644 --- a/spykeviewer/ui/main_window.py +++ b/spykeviewer/ui/main_window.py @@ -97,8 +97,9 @@ def restore_state(self): module_path = os.path.dirname(sys.executable) else: file_path = os.path.abspath(os.path.dirname(__file__)) - module_path = os.path.dirname(os.path.dirname(file_path)) + module_path = os.path.dirname(file_path) plugin_path = os.path.join(module_path, 'plugins') + if os.path.isdir(plugin_path): self.plugin_paths.append(plugin_path) else: @@ -257,14 +258,16 @@ def on_actionExit_triggered(self): @pyqtSignature("") def on_actionAbout_triggered(self): - QMessageBox.about(self, u'About Spyke Viewer', - u'Spyke Viewer is an application for navigating, ' + - u'analyzing and visualizing electrophysiological datasets.\n\n' + - u'Copyright 2012 \xa9 Robert Pr\xf6pper\n' + - u'Neural Information Processing Group\n' + - u'TU Berlin, Germany\n\n' + - u'Licensed under the terms of the BSD license.\n\n' + - u'Icons from the Crystal Project ' + + from .. import __version__ + + QMessageBox.about(self, u'About Spyke Viewer ' + __version__, + u'Spyke Viewer is an application for navigating, ' + u'analyzing and visualizing electrophysiological datasets.\n\n' + u'Copyright 2012 \xa9 Robert Pr\xf6pper\n' + u'Neural Information Processing Group\n' + u'TU Berlin, Germany\n\n' + u'Licensed under the terms of the BSD license.\n\n' + u'Icons from the Crystal Project ' u'(\xa9 2006-2007 Everaldo Coelho)') @pyqtSignature("")