-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphy_config.py
32 lines (28 loc) · 1.08 KB
/
phy_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This will load all the plugins in /auto/users/lbhb/Code/multichannel_sorting/phy-plugins/
# If you want to try out your own plugins, add them to ~/.phy/plugins/ and add them to user_plugins below (line 22)
# You can also add the code for plugins directly at the bottom
from phy import IPlugin
from phy import __version__
import os
isV2 = float(__version__[:3])>=2
if not isV2:
try:
import phycontrib
except:
pass
c = get_config()
if isV2:
lbhb_plugin_dir = '/auto/users/lbhb/Code/multichannel_sorting/phy-plugins/'
lbhb_plugins = files = os.listdir(lbhb_plugin_dir)
lbhb_plugins = [file[:-3] for file in lbhb_plugins if file[-3:] == '.py']
c.Plugins.dirs = [r'~/.phy/plugins/', lbhb_plugin_dir]
user_plugins = [] # Put the names to any new plugins you want to try out here
c.TemplateGUI.plugins = lbhb_plugins + user_plugins
else:
raise RuntimeError("Fix this if we want to go back to phy1")
# Plugin example:
#
# class MyPlugin(IPlugin):
# def attach_to_cli(self, cli):
# # you can create phy subcommands here with click
# pass