示例#1
0
def main():
    from docopt import docopt
    args = docopt(__doc__, version='ontload .5')
    args = {k: None if v == 'None' else v for k, v in args.items()}
    setPS1(__file__)
    if args['--debug']:
        print(args)
    try:
        run(args)
    except NotBuiltError:
        if args['--check-built']:
            print('Not built')
        os.sys.exit(1)
示例#2
0
from pyontutils.utils import setPS1
from nifstd_tools.ontree import server

setPS1('ontree')

app = server()
示例#3
0
from docopt import parse_defaults
from joblib import Parallel, delayed
from pyontutils.utils import makeGraph, makePrefixes, memoryCheck, noneMembers, TODAY, setPS1, refile  # TODO make prefixes needs an all...
from pyontutils.utils import rdf, rdfs, owl, skos, oboInOwl
from pyontutils.hierarchies import creatTree
from collections import namedtuple
from IPython import embed

defaults = {
    o.name: o.value if o.argcount else None
    for o in parse_defaults(__doc__)
}

COMMIT_HASH_HEAD_LEN = 7

setPS1(__file__)

bigleaves = 'go.owl', 'uberon.owl', 'pr.owl', 'doid.owl', 'taxslim.owl', 'chebislim.ttl', 'ero.owl'

Query = namedtuple('Query', ['root', 'relationshipType', 'direction', 'depth'])


class NotBuiltError(FileNotFoundError):
    pass


@contextmanager
def execute_regardless(function, only_exception=False):
    try:
        yield
    except BaseException as e: