diff --git a/docs/source/tutorials/vfb_neurons.ipynb b/docs/source/tutorials/vfb_neurons.ipynb index 17f2da86..93f02800 100644 --- a/docs/source/tutorials/vfb_neurons.ipynb +++ b/docs/source/tutorials/vfb_neurons.ipynb @@ -33,13 +33,15 @@ "\u001b[32mEstablishing connections to https://VirtualFlyBrain.org services...\u001b[0m\n", "\u001b[32mSession Established!\u001b[0m\n", "\n", - "\u001b[33mType \u001b[35mvfb. \u001b[33mand press \u001b[35mtab\u001b[33m to see available queries. You can run help against any query e.g. \u001b[35mhelp(vfb.get_TermInfo)\u001b[0m\n" + "\u001b[33mType \u001b[35mvfb. \u001b[33mand press \u001b[35mtab\u001b[33m to see available queries. You can run help against any query e.g. \u001b[35mhelp(vfb.terms)\u001b[0m\n" ] } ], "source": [ "# Import the VFBConnect class\n", - "from vfb_connect import vfb" + "from vfb_connect import vfb\n", + "\n", + "vfb._load_limit = 10 # Limit the number of results returned to speed things up" ] }, { @@ -51,7 +53,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "VFBTerm(term=Term(term=MinimalEntityInfo(name=LPC1, short_form=VFB_jrchk011), link=https://n2t.net/vfb:VFB_jrchk011))\n" + "LPC1\n" ] } ], @@ -62,37 +64,22 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "['Entity',\n", - " 'Adult',\n", - " 'Anatomy',\n", - " 'Cell',\n", - " 'Cholinergic',\n", - " 'Individual',\n", - " 'Nervous_system',\n", - " 'Neuron',\n", - " 'Visual_system',\n", - " 'has_image',\n", - " 'has_neuron_connectivity',\n", - " 'has_region_connectivity',\n", - " 'FlyEM_HB',\n", - " 'NBLAST',\n", - " 'NBLASTexp',\n", - " 'neuronbridge']" + "['Adult', 'Cholinergic', 'Nervous_system', 'Visual_system']" ] }, - "execution_count": 4, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "vfb_neuron.term.core.types" + "vfb_neuron.types" ] }, { @@ -155,7 +142,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "VFBTerms(terms=VFBTerms(terms=[VFBTerm(term=Term(term=MinimalEntityInfo(name=LPC1, short_form=FBbt_00111767), link=https://n2t.net/vfb:FBbt_00111767))]))\n" + "VFBTerms(['LPC1'])\n" ] } ], diff --git a/src/vfb_connect.egg-info/PKG-INFO b/src/vfb_connect.egg-info/PKG-INFO index bc8ccb89..dd36d679 100644 --- a/src/vfb_connect.egg-info/PKG-INFO +++ b/src/vfb_connect.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vfb_connect -Version: 2.1.17.dev23+9a116b9.dirty +Version: 2.1.17.dev24+b4d46e5.dirty Summary: Wrapper for querying VirtualFlyBrain servers. Home-page: https://github.com/VirtualFlyBrain/VFB_connect Author: David Osumi-Sutherland diff --git a/src/vfb_connect/schema/vfb_term.py b/src/vfb_connect/schema/vfb_term.py index 4bc736d1..45c469af 100644 --- a/src/vfb_connect/schema/vfb_term.py +++ b/src/vfb_connect/schema/vfb_term.py @@ -1,7 +1,6 @@ import json import os import sys -from types import NoneType from typing import Iterable, List, Optional, Union import navis import numpy as np @@ -2951,7 +2950,7 @@ def __init__(self, terms: Union[List[VFBTerm], List[str], pandas.core.frame.Data print(f"\033[33mWarning:\033[0m Term with ID {term} not found") if verbose else None return - if isinstance(terms, list) and all(isinstance(term, NoneType) for term in terms): + if isinstance(terms, list) and all(isinstance(term, type(None)) for term in terms): self.terms = [] return