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

Ipysurfer #31

Merged
merged 17 commits into from
Aug 12, 2018
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ python:
sudo: false
install:
- pip install codespell flake8 ipyvolume matplotlib mne numpy nibabel pydocstyle pythreejs scipy bqplot
- pip install pytest pytest-cov
script:
- make pep
- python -c "import mne_g3d" # just a smoke test for now
- pytest # unit tests
- python -c "import ipysurfer" # a smoke test
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PYTHON ?= python
PYTESTS ?= py.test
CTAGS ?= ctags
CODESPELL_SKIPS ?= "*.fif"
CODESPELL_DIRS ?= mne_g3d/
CODESPELL_DIRS ?= ipysurfer/
all: clean inplace test test-doc

clean-pyc:
Expand All @@ -32,12 +32,12 @@ inplace:
$(PYTHON) setup.py build_ext -i

test:
pytest mne_g3d
pytest ipysurfer

pep: flake pydocstyle codespell-error

flake:
flake8 --count mne_g3d
flake8 --count ipysurfer

pydocstyle:
pydocstyle
Expand Down
211 changes: 0 additions & 211 deletions examples/brain-mesh.ipynb

This file was deleted.

101 changes: 101 additions & 0 deletions examples/ipysurfer.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ipysurfer examples"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Basic Visualization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Initialize a basic visualization session.\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import os.path as path\n",
"\n",
"import mne\n",
"\n",
"from ipysurfer import Brain"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b46cf42ca2cb4fedb351d354a5137e1c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HTML(value='<p style=\"color: None\"><b>Sample</b></p>'), HBox(children=(Figure(animation=0.0, ca…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data_path = mne.datasets.sample.data_path()\n",
"\n",
"subject_id = 'sample'\n",
"subjects_dir = path.join(data_path, 'subjects')\n",
"\n",
"hemi = 'both'\n",
"surf = 'inflated'\n",
"\n",
"# Call the Brain object constructor with\n",
"# parameters to initialize the visualization session.\n",
"brain = Brain(subject_id, hemi, surf, size=300, subjects_dir=subjects_dir)\n",
"brain.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python (mne_g3d)",
"language": "python",
"name": "mne_g3d"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}