# HG changeset patch # User drewp@bigasterisk.com # Date 1650782935 25200 # Node ID 1eac256693335958e6b5c28adf09685ced0da1db # Parent 8d6ba6d372c8242aa6b3761fe42b55e62b694c53 rm some docker browser demo code that i'm not going to port diff -r 8d6ba6d372c8 -r 1eac25669333 Dockerfile --- a/Dockerfile Sat Apr 23 23:45:45 2022 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -FROM bang5:5000/base_basic - -WORKDIR /opt - -COPY browser_test_requirements.txt ./ - -RUN pip3 install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -r browser_test_requirements.txt -# not sure why this doesn't work from inside requirements.txt -RUN pip3 install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -U 'https://github.com/drewp/cyclone/archive/python3.zip?v2' - -COPY ./patchablegraph.py ./patchsource.py ./setup.py __init__.py patchablegraph/ -RUN pip3 install patchablegraph/ - -COPY browser_test.py ./ - -EXPOSE 8021 - -CMD [ "python3", "browser_test.py" ] diff -r 8d6ba6d372c8 -r 1eac25669333 browser_test.py --- a/browser_test.py Sat Apr 23 23:45:45 2022 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -""" -see how a browser talks to this PatchableGraph -""" - -from rdflib import Namespace, Literal, ConjunctiveGraph, URIRef, RDF -from twisted.internet import reactor -import cyclone.web - -from standardservice.logsetup import log, verboseLogging -from patchablegraph import PatchableGraph, CycloneGraphEventsHandler, CycloneGraphHandler - -verboseLogging(True) - -graph = PatchableGraph() -g = ConjunctiveGraph() -g.add((URIRef('http://example.com/s'), - URIRef('http://example.com/p'), - URIRef('http://example.com/o'), - URIRef('http://example.com/g'))) -graph.setToGraph(g) - -class Application(cyclone.web.Application): - def __init__(self): - handlers = [ - (r'/graph', CycloneGraphHandler, {'masterGraph': graph}), - (r'/graph/events', CycloneGraphEventsHandler, - {'masterGraph': graph}), - ] - cyclone.web.Application.__init__(self, handlers) - - -reactor.listenTCP(8021, Application()) -reactor.run() diff -r 8d6ba6d372c8 -r 1eac25669333 browser_test_requirements.txt --- a/browser_test_requirements.txt Sat Apr 23 23:45:45 2022 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -rdflib==4.2.2 -Twisted -cyclone - -https://github.com/drewp/cyclone/archive/python3.zip - -twisted_sse==0.3.0 -cycloneerr -rdfdb==0.8.0 -standardservice==0.4.0 diff -r 8d6ba6d372c8 -r 1eac25669333 tasks.py --- a/tasks.py Sat Apr 23 23:45:45 2022 -0700 +++ b/tasks.py Sat Apr 23 23:48:55 2022 -0700 @@ -7,18 +7,3 @@ @task def release(ctx): local_release(ctx) - -@task -def browser_test_build(ctx): - ctx.run(f'docker build --network=host -t bang5:5000/patchable_graph_browser_test .') - -@task(pre=[browser_test_build]) -def browser_test(ctx): - ctx.run(f'docker run ' - f'--name patchable_graph_browser_test ' - f'--rm -it ' - f'--net=host ' - f'-v `pwd`:/opt ' - f'bang5:5000/patchable_graph_browser_test ' - f'/bin/bash', #f'python3 browser_test.py', - pty=True)