Skip to content

Commit

Permalink
# This is a combination of 18 commits.
Browse files Browse the repository at this point in the history
parent 289b85b
author samadpls <[email protected]> 1710875966 +0500
committer samadpls <[email protected]> 1712146472 +0500

# This is a combination of 13 commits.
parent 289b85b
author samadpls <[email protected]> 1710875966 +0500
committer samadpls <[email protected]> 1712146405 +0500

# This is a combination of 4 commits.tree de20b388c64cca5a81e713c9270d6c1a3af12f93
parent 289b85b
author samadpls <[email protected]> 1710875966 +0500
committer samadpls <[email protected]> 1712146383 +0500

# This is a combination of 3 commits.
# This is the 1st commit message:

Added `kwargs` options to `plot_spikes_hist`

Signed-off-by: samadpls <[email protected]>

Updated `whats_new.rst` with changes to plot_spikes_hist options using kwargs.

Signed-off-by: samadpls <[email protected]>

refactored

Co-authored-by: Mainak Jas <[email protected]>

refactored `kwargs_hist`

Signed-off-by: samadpls <[email protected]>

Updated `test_cell_response` with `kwargs_hist`

Signed-off-by: samadpls <[email protected]>

Update doc/whats_new.rst

Co-authored-by: Mainak Jas <[email protected]>

removed linewidth param

Signed-off-by: GitHub <[email protected]>

Added assertion

Signed-off-by: samadpls <[email protected]>

Added `kwargs` options to `plot_spikes_hist`

Signed-off-by: samadpls <[email protected]>

# This is the commit message #2:

refactored

Co-authored-by: Mainak Jas <[email protected]>
# This is the commit message #3:

refactored `kwargs_hist`

Signed-off-by: samadpls <[email protected]>

# This is the commit message jonescompneurolab#4:

Update doc/whats_new.rst

Co-authored-by: Mainak Jas <[email protected]>
# This is the commit message jonescompneurolab#7:

[MRG] Fix dipole plot scale and smooth factors  (jonescompneurolab#730)

* reorganizing visualization tab widgets. adding two additional float fields for data comparison

* fixing gui test and funciton args name

* fix linting errors

* fix lint errors in gui.py

* fixing gui tests

* adding scaling and smooth input parameters for data comparison visualization

* applied code review suggestions. Added functio to avoid repeated code

* adding docustring to new funtion. removing unused is_loaded_data

* fixing flake8 erros

* removed logic to determine if data is a sim or loaded data

* MAINT: commenting out try-except block

* MAINT: uncommenting atry-except dev code in viz_manager

* MAINT: remove try-except block
# This is the commit message jonescompneurolab#8:

[MRG] Added Virtual Environment Directories to `.gitignore` (jonescompneurolab#740)

* Added virtual env

* Updated

* Refactored
# This is the commit message jonescompneurolab#9:

fix: correct pick_connection error where connections not relevant to the search criteria were returned when a search for non-existent connections was preformed

# This is the commit message #10:

style: clarify comments

# This is the commit message jonescompneurolab#11:

tests: added test for searching for a cell connection that is not configured in the network.

# This is the commit message jonescompneurolab#12:

style: flake8 edits

# This is the commit message #13:

refactor: convert to lists

# This is the commit message jonescompneurolab#15:

chore: Corrected whats_new.rst tense.

# This is the commit message jonescompneurolab#17:

refactor: simplified logic

# This is the commit message #18:

reorganizing visualization tab widgets. adding two additional float fields for data comparison

fix linting errors

fix lint errors in gui.py

adding scaling and smooth input parameters for data comparison visualization

applied code review suggestions. Added functio to avoid repeated code

adding docustring to new funtion. removing unused is_loaded_data

MAINT: commenting out try-except block

MAINT: uncommenting atry-except dev code in viz_manager
  • Loading branch information
samadpls committed Apr 3, 2024
2 parents 0b7191b + 2d3bd21 commit 05328fa
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions hnn_core/gui/_viz_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,25 @@ def unlink_relink(attribute):
def _unlink_relink(f):
@wraps(f)
def wrapper(self, *args, **kwargs):
# Unlink the widgets using the provided link object
link_attribute: link = getattr(self, attribute)
link_attribute.unlink()

# Call the original function
result = f(self, *args, **kwargs)
# For development purposes only
# Remove after gui development
try:
# Unlink the widgets using the provided link object
link_attribute: link = getattr(self, attribute)
link_attribute.unlink()

# Re-link the widgets
link_attribute.link()
# Call the original function
result = f(self, *args, **kwargs)

# Re-link the widgets
link_attribute.link()

return result
except Exception as e:
# Handle the exception and print it
print(f"An error occurred: {e}")

return result
return wrapper
return _unlink_relink

Expand Down Expand Up @@ -884,4 +892,4 @@ def _simulate_edit_figure(self, fig_name, ax_name, simulation_name,
if operation == "plot":
buttons.children[0].click()
elif operation == "clear":
buttons.children[1].click()
buttons.children[1].click()

0 comments on commit 05328fa

Please sign in to comment.