Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Decluttering python.rst #36

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

Helveg
Copy link
Contributor

@Helveg Helveg commented Jan 15, 2021

This file is linked to as a "basic programming" page and should supposedly show basic how to's with the Python interface. It has several problems:

  • It is not written in an introductory style, but rather in a complete reference guide style with very detailed explanations of various non introductory topics.
  • I have removed all installation as pip install NEURON supercedes them all for any introduction.
  • I am planning to still remove basically everything on this page and instead write an introduction with examples of how to use NEURON Python interface, starting from creating a few sections, inserting some mechanisms, compiling & loading their own mechanisms, connecting them together up to loading a morphology with Import3D and instantiating it. The basic necessities for creating a neuron model.

This file is linked to as a "basic programming" page and should supposedly show basic how to's with the Python interface. It has several problems:

* It is not written in an introductory style, but rather in a complete reference guide style with very detailed explanations of various non introductory topics.
* I have removed all installation as `pip install NEURON` supercedes them all for any introduction.
* I am planning to still remove basically everything on this page and instead write an introduction with examples of how to use NEURON Python interface, starting from creating a few sections, inserting some mechanisms, connecting them together up to loading a morphology with Import3D and instantiating it. The basic necessities for creating a neuron model.
@ramcdougal
Copy link
Member

ramcdougal commented Jan 15, 2021

Almost all of this page was ancient, so I think deleting most of it and starting over is a good plan.

However:

  • How is what you are describing different from the scripting neuron tutorial?
  • Would it be better to just add links from the programmers reference directly into the tutorials?
  • pip install neuron does not work for Windows yet.

@Helveg
Copy link
Contributor Author

Helveg commented Jan 15, 2021

Good point, the tutorial should do! And the build process described here doesn't work on Windows either I assume ;p Either way for an introduction I'd skip it and say pip install/MSI-Installer.

So, let's change the link to the tutorial and delete this document? I'll keep the commits on this Draft PR for a rework of these Python docs. They're built by Sphinx correct? How come there doesn't seem to be any autodoc of the docstrings?

Why aren't all the NEURON docs unified into a single doc project?

Too many questions, sorry ;D

ramcdougal added a commit that referenced this pull request Jan 15, 2021
@ramcdougal
Copy link
Member

There's very little autodoc because there isn't really docstrings because NEURON has a dynamically created interface through the cPython API not pure Python code.

@nrnhines
Copy link
Member

A perhaps useless historical note. Circa 1994, some docstring like syntax was added to some of the c++ and hoc code along with a help system (The latter also available from NEURONMainMenu/Help where the cursor would change to a question mark and pressing a button or menu item would pop up a document window) . This all languished eventually into nothingness. But the doc strings for that old code remains. e.g in share/lib/hoc/showmech.hoc

/*
?0 UserClasses ShowMechanism
Show where a membrane mechanism exists on the cell and allow setting of
parameters as constants whereever the mechanism exists.

The currently displayed mechanism is named in the label at the top of the
lower portion of the panel.

The top part uses a Shape scene to color red all the sections that have
insert'ed the mechanism.  Colors black all the sections where the
mechanism does not exist.

When a valueeditor showing a parmameter is changed in the lower portion
the value is used to set the corresponding range variable to a constant
forall sections that contain the mechanism.

? MechType
Menu for selecting the currently displayed mechanism.
?0 User HocCode ShowMechanism
*/
help ?0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants