changeset 24:1eac25669333

rm some docker browser demo code that i'm not going to port
author drewp@bigasterisk.com
date Sat, 23 Apr 2022 23:48:55 -0700
parents 8d6ba6d372c8
children e11d407c46f8
files Dockerfile browser_test.py browser_test_requirements.txt tasks.py
diffstat 4 files changed, 0 insertions(+), 76 deletions(-) [+]
line wrap: on
line diff
--- 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" ]
--- 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()
--- 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
--- 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)