A hands-on workshop covering practical scientific computing tools and the Spyglass neuroscience data framework.
Please complete all of the following before arriving.
-
Create a GitHub account if you do not already have one.
-
Bring laptop. Linux or macOS preferred. Spyglass may have issues on Windows; Windows users are welcome to attend and report any problems they encounter.
-
Install Spyglass using its installer script:
May take up to 45 minutes on a new machine.
git clone https://github.com/LorenFrankLab/spyglass cd spyglass python scripts/install.py --minimal # full install not required
This creates a
spyglassconda environment containing Spyglass and its core dependencies.Skip the database setup step — credentials will be provided on the day.
-
Verify the install:
conda activate spyglass python -c "import spyglass; print('OK')"You should see
OK. If you see anImportError, re-run the installer or ask for help before the workshop day:Chris.Broz[at]ucsf.edu -
Brush up on Python basics: functions, classes,
forloops,if/else,try/except, and shell commands (pip install,conda activate).
Click Fork at the top-right of this page → Create fork, then:
git clone https://github.com/<your-username>/SpyglassWorkshop2026
cd SpyglassWorkshop2026conda activate spyglass
pip install -e .
pre-commit installThis installs the workshop package and its tools (ruff, pytest,
pre-commit, jupytext) into the spyglass environment you set up before the
workshop.
code .When VS Code opens, accept any prompts to install the recommended extensions
listed in .vscode/extensions.json. Select the spyglass conda environment as
your Python interpreter (Ctrl+Shift+P → Python: Select Interpreter).
G6, Hugh Robson Building, University of Edinburgh
| Time | Session |
|---|---|
| 10:00 – 11:30 | Session 1: Tools for Scientific Computing |
| 11:30 – 12:30 | Break |
| 12:30 – 14:00 | Session 2: Spyglass & DataJoint Infrastructure |
Practical tools and workflows for scientific Python development:
- Overview of GitHub: repositories, branches, forks, pull requests, and issues
- Setting up VS Code for Python and Jupyter development
- Working interactively with Jupyter notebooks
- Code style and quality tools:
ruff(replacesblackandisort) - Debugging your first installable Python package
Introduction to relational databases and the Spyglass framework:
- DataJoint infrastructure: Python–MySQL connection
- Table tiers and declaration syntax
- Spyglass design patterns: Parameter, Selection, Analysis, and Merge tables
- Ingesting data into Spyglass
- Designing a custom Spyglass pipeline