Skip to content
Merged

Dev #450

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
33 changes: 18 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,23 @@ jobs:
ref: ${{ github.ref }}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.10.11'

# - name: Upgrading pip
# run: pip install --upgrade pip

- name: Install deps
run: pip install cython numpy==1.26
# - name: Install deps
# run: pip install cython numpy==1.26

- name: Installing package
run: pip install -e .

- name: Installing packages again (this prevents a weird error in cell matching nb)
# Some git-based dependencies (e.g., ophys-nway-matching) in requirements.txt
# are not reliably installed via `pip install -e .` due to setuptools limitations.
# This second install ensures all such dependencies are properly installed.
- name: Installing packages again (to avoid setuptools limitations)
run: pip install -r requirements.txt

- name: Installing build dependencies
Expand All @@ -53,6 +56,16 @@ jobs:
- name: Printing environment
run: pip freeze

- name: Testing Embargoed Notebooks
run: |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/embargoed"
rm ./docs/embargoed/*.nwb

- name: Testing Higher-Order Notebooks
run: |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/higher-order" --ignore docs/higher-order/behavioral_state.ipynb
rm ./docs/higher-order/*.nwb

- name: Testing Basics Notebooks
run: |
pytest --nbmake --nbmake-timeout=100000 -n=auto "./docs/basics"
Expand All @@ -68,21 +81,11 @@ jobs:
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/first-order"
rm ./docs/first-order/*.nwb

- name: Testing Higher-Order Notebooks
run: |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/higher-order"
rm ./docs/higher-order/*.nwb

- name: Testing Project Notebooks
run: |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/projects"
rm ./docs/projects/*.nwb

- name: Testing Embargoed Notebooks
run: |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/embargoed"
rm ./docs/embargoed/*.nwb

- name: Printing log
run: |
git config --global --add safe.directory /__w/openscope_databook/openscope_databook
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9.13'

# - name: Upgrading pip
# run: pip install --upgrade pip

- name: Install cython
run: pip install cython numpy==1.26

- name: Installing requirements
run: pip install -r ./requirements.txt

Expand Down
83 changes: 26 additions & 57 deletions docs/embargoed/cell_matching.ipynb

Large diffs are not rendered by default.

67 changes: 41 additions & 26 deletions docs/visualization/visualize_neuropixels_probes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@
"source": [
"import numpy as np\n",
"\n",
"from ccfwidget import CCFWidget"
"from ccfwidget import CCFWidget\n",
"\n",
"# required because CCFwidgets is not using latest version of collections.abc\n",
"import collections\n",
"import collections.abc\n",
"collections.Sequence = collections.abc.Sequence"
]
},
{
Expand Down Expand Up @@ -72,13 +77,6 @@
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"A newer version (0.62.2) of dandi/dandi-cli is available. You are using 0.61.2\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand Down Expand Up @@ -157,31 +155,48 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"metadata": {
"tags": [
"skip-execution"
]
},
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mThe Kernel crashed while executing code in the current cell or a previous cell. \n",
"\u001b[1;31mPlease review the code in the cell(s) to identify a possible cause of the failure. \n",
"\u001b[1;31mClick <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. \n",
"\u001b[1;31mView Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
]
}
],
"source": [
"# the 'markers' parameter will expect an iterable where each point is represented as [x,y,z]\n",
"ccf = CCFWidget(markers=[points])"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"execution_count": 1,
"metadata": {
"tags": [
"skip-execution"
]
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "683c4a818ea14ff69df65c1d0d563866",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"CCFWidget(children=(VBox(children=(Viewer(background=(0.85, 0.85, 0.85), camera=array([[ 1.3441567e+03, -2.172…"
]
},
"metadata": {},
"output_type": "display_data"
"ename": "NameError",
"evalue": "name 'ccf' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[1], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mccf\u001b[49m\n",
"\u001b[1;31mNameError\u001b[0m: name 'ccf' is not defined"
]
}
],
"source": [
Expand All @@ -191,7 +206,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -205,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
15 changes: 9 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
autograd==1.7
ccfwidget==0.5.3
cebra
cython
dandi==0.67.2
elephant==1.1.1
h5py>=3.8
ipympl==0.9.4
ipywidgets==7.8.1
itkwidgets==0.32.6
jupyter==1.0.0
markupsafe==2.0.1
matplotlib==3.6.2
mpl-interactions==0.22.0
nbmake==1.5.3
neo==0.13.0
numpy==1.26
numcodecs==0.11.0
numpy==1.26.0
nwbwidgets
ophys-nway-matching @ git+https://github.com/AllenInstitute/ophys_nway_matching@545504ab55922717ab623f8ede2c521a60aa1458
ophys-nway-matching @ git+https://github.com/AllenInstitute/ophys_nway_matching.git
pandas==1.5.2
Pillow==11
pynwb==2.6.0
pytest-xdist==3.5.0
quantities==0.14.1
remfile==0.1.10
scikit-image==0.25
scipy==1.15
ssm @ git+https://github.com/lindermanlab/ssm
scikit-image==0.18.3
scipy==1.13.1
# ssm @ git+https://github.com/lindermanlab/ssm
statsmodels==0.14.0
suite2p==0.14
tensortools==0.4
Expand Down
Loading