def test_export_model(self): m = pipes.ApiNATOMY(Path(self.source, 'apinatomy-model.json')) # FIXME need a way to combine this that doesn't require # the user to know how to compose these, just send a message # to one of them they should be able to build the other from # the information at hand r = pipes.ApiNATOMY_rdf(m) r.data
def test_export(self): m = pipes.ApiNATOMY(self.source / 'keast-spinal-map.json') # FIXME need a way to combine this that doesn't require # the user to know how to compose these, just send a message # to one of them they should be able to build the other from # the information at hand r = pipes.ApiNATOMY_rdf(m) graph = r.data assert list(graph[:apinat.readable.name:]), graph.ttl
def route_apinat_demo(ext=None): source = Path('~/ni/sparc/apinat/sources/').expanduser() # FIXME config probably rm = pipes.ApiNATOMY(source / 'apinatomy-resourceMap.json') r = pipes.ApiNATOMY_rdf(rm.data) # FIXME ... should be able to pass the pipeline if ext == '.ttl': return r.data.ttl, 200, {'Content-Type': 'text/turtle; charset=utf-8',} return hfn.htmldoc(r.data.ttl_html, styles=(hfn.ttl_html_style,), title='ApiNATOMY demo')
def test_export_rm(self): rm = pipes.ApiNATOMY(Path(self.source, 'apinatomy-resourceMap.json')) r = pipes.ApiNATOMY_rdf( rm) # FIXME ... should be able to pass the pipeline r.data