# HG changeset patch # User drewp@bigasterisk.com # Date 1652654863 25200 # Node ID 12bffd51450fd54e4ed45af13fe03fa06b16ff6f # Parent f9282b33b8d0361a6c0c4ce937819f685b827ae3 project config diff -r f9282b33b8d0 -r 12bffd51450f .flake8 --- a/.flake8 Tue Apr 05 09:20:20 2022 -0700 +++ b/.flake8 Sun May 15 15:47:43 2022 -0700 @@ -1,3 +1,3 @@ [flake8] max-line-length=160 -ignore=E722,W503,E741,E201,E202,E241,E231 +ignore=W504,E722,W503,E741,E201,E202,E241,E231 diff -r f9282b33b8d0 -r 12bffd51450f .hgignore --- a/.hgignore Tue Apr 05 09:20:20 2022 -0700 +++ b/.hgignore Sun May 15 15:47:43 2022 -0700 @@ -1,3 +1,4 @@ __pypackages__ rdfdb/__pycache__ .pytest_cache +__pycache__ diff -r f9282b33b8d0 -r 12bffd51450f README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Sun May 15 15:47:43 2022 -0700 @@ -0,0 +1,26 @@ +# What's here + +## GraphFile + +Connect a subgraph to a file, loading data from that file at starting, rewriting that file upon graph changes, and rereading it upon file changes (e.g. from your text editor). + +## SyncedGraph + +An rdf graph container with these features: +- CurrentStateGraphApi: get a readonly rdflib.Graph-like +- GraphEditApi: higher-level API for editing the graph, including patchObject, patchSubgraph, patchMapping +- AutoDepGraphApi: experimental API that watches what graph reads your code makes, then calls your code again if those results would have changed (see knockoutjs, mobx, mopyx) + +# Usage + +Configure and run with your own launcher file like this: + +``` +(look at demo.py) +``` + +Then run like this: + +``` +uvicorn launcher:app +``` \ No newline at end of file diff -r f9282b33b8d0 -r 12bffd51450f pyproject.toml --- a/pyproject.toml Tue Apr 05 09:20:20 2022 -0700 +++ b/pyproject.toml Sun May 15 15:47:43 2022 -0700 @@ -2,9 +2,7 @@ name = "rdfdb" version = "0.22.0" description = "" -authors = [ - {name = "Drew Perttula", email = "drewp@bigasterisk.com"}, -] +authors = [{ name = "Drew Perttula", email = "drewp@bigasterisk.com" }] license-expression = "MIT" dependencies = [ 'rdflib', @@ -19,10 +17,12 @@ [project.urls] Homepage = "" - # url='https://projects.bigasterisk.com/rdfdb/rdfdb-0.21.0.tar.gz', +# url='https://projects.bigasterisk.com/rdfdb/rdfdb-0.21.0.tar.gz', [project.optional-dependencies] + [tool.pdm] + [tool.pdm.dev-dependencies] dev = [ "flake8>=4.0.1", @@ -41,4 +41,8 @@ 'ignore:Code. pytest_mock_example_attribute_that_shouldnt_exist is not defined in namespace .*:UserWarning', # The below warning is a consequence of how pytest detects fixtures and how DefinedNamespace behaves when an undefined attribute is being accessed. 'ignore:Code. _pytestfixturefunction is not defined in namespace .*:UserWarning', -] \ No newline at end of file +] +asyncio_mode = "strict" +log_cli = 1 +log_cli_level = "INFO" +addopts = "--tb=short" diff -r f9282b33b8d0 -r 12bffd51450f tasks.py --- a/tasks.py Tue Apr 05 09:20:20 2022 -0700 +++ b/tasks.py Sun May 15 15:47:43 2022 -0700 @@ -26,4 +26,4 @@ @task def demo(ctx): - ctx.run('PYTHONPATH=. pdm run python3 rdfdb/service.py -v', pty=True) + ctx.run('PYTHONPATH=. pdm run uvicorn --reload --port 8082 demo:app', pty=True)