Changeset - dc126c757dbe
[Not reviewed]
default
1 1 2
drewp@bigasterisk.com - 20 months ago 2023-05-19 21:40:49
drewp@bigasterisk.com
import test for rdfdb
3 files changed with 13 insertions and 4 deletions:
0 comments (0 inline, 0 general)
bin/rdfdb
Show inline comments
 
#!/bin/zsh
 
#pnpm exec vite -c light9/ascoltami/vite.config.ts &
 
pdm run uvicorn --port 8209 light9.rdfdb_setup:app --no-access-log
 
pdm run uvicorn --port 8209 light9.rdfdb.service:app --no-access-log
 
wait
light9/rdfdb/service.py
Show inline comments
 
file renamed from light9/rdfdb_setup.py to light9/rdfdb/service.py
 
#!bin/python
 
from light9.run_local import log
 
import logging
 
log = logging.getLogger('rdfdb_setup')
 
import os
 
from pathlib import Path
 

	
 
import rdfdb.service
 
from rdflib import URIRef
 

	
 
from light9 import showconfig
 
from light9.run_local import log
 

	
 
rdfRoot = Path(os.environ['LIGHT9_SHOW'].rstrip('/') + '/')
 
showUri = URIRef(showconfig.showUri() + '/')
 

	
 
app = rdfdb.service.makeApp(  #
 
    dirUriMap={rdfRoot: showUri},
 
    prefixes={
 
        'show': showUri,
 
        '': URIRef('http://light9.bigasterisk.com/'),
 
        'rdf': URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#'),
 
        'rdfs': URIRef('http://www.w3.org/2000/01/rdf-schema#'),
 
        'xsd': URIRef('http://www.w3.org/2001/XMLSchema#'),
light9/rdfdb/service_test.py
Show inline comments
 
new file 100644
 
import asyncio
 
from light9.run_local import log
 

	
 

	
 
def test_import():
 

	
 
    async def go():
 
        # this sets up some watcher tasks
 
        from service import app
 

	
 
    asyncio.run(go(), debug=True)
0 comments (0 inline, 0 general)