Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't look for KSChan channel __doc__ string with ModelView. #3075

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions share/lib/python/neuron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,11 @@ def nrn_dll(printpath=False):

def _modelview_mechanism_docstrings(dmech, tree):
if dmech.name not in ("Ra", "capacitance"):
docs = getattr(h, dmech.name).__doc__
if docs.strip():
for line in docs.split("\n"):
tree.append(line, dmech.location, 0)
if hasattr(nrn, dmech.name): # KSChan not listed (and has no __doc__)
docs = getattr(h, dmech.name).__doc__
if docs.strip():
for line in docs.split("\n"):
tree.append(line, dmech.location, 0)


_sec_db = {}
Expand Down
8 changes: 8 additions & 0 deletions test/hoctests/tests/test_mview.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# see PR #3075
# Don't look for KSChan channel __doc__ string with ModelView.

from neuron import h, gui

h.load_file(h.neuronhome() + "/demo/dynclamp.hoc")
h.load_file("mview.hoc")
h.mview()
Loading