Skip to content

Commit

Permalink
MAINT: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmainak committed Jul 21, 2022
1 parent a307fc6 commit 5e0cb9f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 36 deletions.
2 changes: 1 addition & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ GUI (:py:mod:`hnn_core.gui`):
:toctree: generated/

HNNGUI
launch

49 changes: 16 additions & 33 deletions hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class HNNGUI:
The width of the left side bar (in pixel).
drive_widget_width: str
The width of network drive tab (in pixel).
Attributes
----------
layout: dict
Expand Down Expand Up @@ -194,8 +195,10 @@ def __init__(self, theme_color="#8A2BE2", log_window_height="100px",
self._init_ui_components()

def _init_ui_components(self):
"""Initialize larger UI components and dynamical output windows. It's
not encouraged for users to modify or access attributes in this part.
"""Initialize larger UI components and dynamical output windows.
It's not encouraged for users to modify or access attributes in this
part.
"""
# Reloading status.
self._load_info = {"count": 0, "prev_param_data": b""}
Expand Down Expand Up @@ -390,9 +393,7 @@ def create_expanded_button(description, button_style, height, disabled=False,


def _get_connectivity_widgets(conn_data):
"""Create connectivity box widgets from specified weight and probability
data.
"""
"""Create connectivity box widgets from specified weight and probability."""

style = {'description_width': '150px'}
style = {}
Expand All @@ -404,9 +405,7 @@ def _get_connectivity_widgets(conn_data):
style=style)

w_slider = FloatLogSlider(value=conn_data[receptor_name]['weight'],
min=-5,
max=1,
step=0.2,
min=-5, max=1, step=0.2,
description=" ",
disabled=False,
continuous_update=False,
Expand Down Expand Up @@ -499,14 +498,8 @@ def _get_cell_specific_widgets(layout, style, location, data=None):
return widgets_list, widgets_dict


def _get_rhythmic_widget(name,
tstop_widget,
layout,
style,
location,
data=None,
default_weights_ampa=None,
default_weights_nmda=None,
def _get_rhythmic_widget(name, tstop_widget, layout, style, location, data=None,
default_weights_ampa=None, default_weights_nmda=None,
default_delays=None):
default_data = {
'tstart': 0.,
Expand Down Expand Up @@ -572,14 +565,8 @@ def _get_rhythmic_widget(name,
return drive, drive_box


def _get_poisson_widget(name,
tstop_widget,
layout,
style,
location,
data=None,
default_weights_ampa=None,
default_weights_nmda=None,
def _get_poisson_widget(name, tstop_widget, layout, style, location, data=None,
default_weights_ampa=None, default_weights_nmda=None,
default_delays=None):
default_data = {
'tstart': 0.0,
Expand Down Expand Up @@ -647,13 +634,8 @@ def _get_poisson_widget(name,
return drive, drive_box


def _get_evoked_widget(name,
layout,
style,
location,
data=None,
default_weights_ampa=None,
default_weights_nmda=None,
def _get_evoked_widget(name, layout, style, location, data=None,
default_weights_ampa=None, default_weights_nmda=None,
default_delays=None):
default_data = {
'mu': 0,
Expand Down Expand Up @@ -1309,8 +1291,9 @@ def initialize_viz_window(viz_window, simulation_data, plot_outputs,


def launch():
"""Launch voila with hnn_widget.ipynb. You can pass voila commandline
parameters as usual.
"""Launch voila with hnn_widget.ipynb.
You can pass voila commandline parameters as usual.
"""
from voila.app import main
notebook_path = op.join(op.dirname(__file__), 'hnn_widget.ipynb')
Expand Down
4 changes: 2 additions & 2 deletions hnn_core/gui/hnn_widget.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 3.8.12 ('gsoc')",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -57,7 +57,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.7.4"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 5e0cb9f

Please sign in to comment.