neuroinformatics-unit / HowTo

NIU website on common software problems and their troubleshooting
http://howto.neuroinformatics.dev/
Creative Commons Attribution 4.0 International
9 stars 1 forks source link

Add 'Electrophysiology at the SWC' page. #55

Open JoeZiminski opened 2 months ago

JoeZiminski commented 2 months ago

As discussed in #53, this PR adds a 'Electrophysiology at the SWC' page and changes 'Data Analysis' to 'Behaviour at the SWC' page.

On the SWC page are added:

TODO:

JoeZiminski commented 2 months ago

Hey @adamltyson I've added a very rough version of the example pipelines just to get an idea of the layout. Basically the type of pipeline in use in the building that it would be nice to include roughly falls into three categories:

1) spikeinterface scripts for preprocessing and sorting (suitable for sphinx-gallery) 2) full project repos that use python (often spikeinterface) but are fully integrated with multimodal analysis (e.g. Steve's pipeline) 3) (2) but for MATLAB pipelines (e.g. Mateo's pipeline)

It seems important to include all three categories on the website (e.g. even though we recommend SI there is a lot of valuable methods in those matlab pipelines). But i'm not sure how best to display the information in a non-clunky way. ATM the front page of the sphinx gallery contains preprocessing/sorting scripts in the usual gallery way, but also links to two other pages detailing python and matlab repos. Do you think this works? (and the general approach, giving some backround of named researchers, their setups and studies).

JoeZiminski commented 2 months ago

Ah, now understand that incredibly annoying error! Build was failing with unpinned sphinx with the below error. I was lazily ignoring warnings because it was building fine locally, I think because I had contaminated my env with ipykernel. However CI was failing with the below error:

Notebook error:
NoSuchKernel in ephys_at_swc/gallery/sara_mederos.ipynb:
No such kernel named python3

and was fixed by pinning to sphinx<7.2. The problem was I ignored the following error in latest shpinx:

WARNING: multiple files found for the document "ephys_at_swc/gallery/sara_mederos": ['ephys_at_swc/gallery/sara_mederos.py', 'ephys_at_swc/gallery/sara_mederos.ipynb', 'ephys_at_swc/gallery/sara_mederos.rst']
Use '/Users/joeziminski/git_repos/HowTo/docs/source/ephys_at_swc/gallery/sara_mederos.ipynb' for the build.

so it was trying to use .ipynb for the build by default in later sphinx. In earlier sphinx, it uses the .rst by default:

WARNING: multiple files found for the document "ephys_at_swc/gallery/sara_mederos": ['ephys_at_swc/gallery/sara_mederos.py', 'ephys_at_swc/gallery/sara_mederos.ipynb', 'ephys_at_swc/gallery/sara_mederos.rst']
Use '/Users/joeziminski/git_repos/HowTo/docs/source/ephys_at_swc/gallery/sara_mederos.rst' for the build.

and fixing the warning with the below means it builds okay on most recent sphinx :tada:. I guess a good lesson to always fix warnings first even if they seem unrelated to the error!

exclude_patterns = [
   ...
    "ephys_at_swc/gallery/*.ipynb",
    "ephys_at_swc/gallery/*.py",
]
adamltyson commented 2 months ago

@JoeZiminski I think the general idea is good, with the obvious caveats that: