move scripts
This commit is contained in:
parent
c520ef646a
commit
f3703c634e
@ -28,11 +28,18 @@ RUN cp -r /app/legacy/ptvp35/docs/build/html/ /app/docs/build/html/1.1rc0/
|
|||||||
RUN rm -r /app/legacy/ptvp35/docs/build/
|
RUN rm -r /app/legacy/ptvp35/docs/build/
|
||||||
WORKDIR /app/legacy/ptvp35/
|
WORKDIR /app/legacy/ptvp35/
|
||||||
|
|
||||||
|
RUN git fetch && git checkout 1.1rc2
|
||||||
|
WORKDIR /app/legacy/ptvp35/docs/
|
||||||
|
RUN make html
|
||||||
|
RUN cp -r /app/legacy/ptvp35/docs/build/html/ /app/docs/build/html/1.1rc2/
|
||||||
|
RUN rm -r /app/legacy/ptvp35/docs/build/
|
||||||
|
WORKDIR /app/legacy/ptvp35/
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
COPY docs/Makefile docs/Makefile
|
COPY docs/Makefile docs/Makefile
|
||||||
COPY setup.py setup.py
|
COPY setup.py setup.py
|
||||||
COPY traced_example.py traced_example.py
|
COPY docs/scripts docs/scripts
|
||||||
COPY ptvp35 ptvp35
|
COPY ptvp35 ptvp35
|
||||||
COPY docs/source docs/source
|
COPY docs/source docs/source
|
||||||
WORKDIR /app/docs/
|
WORKDIR /app/docs/
|
||||||
|
@ -17,6 +17,6 @@ help:
|
|||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile
|
||||||
python ../traced_example.py > ../traced_example.txt
|
python scripts/traced_example.py > scripts/traced_example.txt
|
||||||
python ../traced_example.py all > ../traced_example_all.txt
|
python scripts/traced_example.py all > scripts/traced_example_all.txt
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
@ -4,8 +4,13 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
from contextlib import ExitStack
|
from contextlib import ExitStack
|
||||||
|
|
||||||
|
try:
|
||||||
|
sys.path.append('/app/')
|
||||||
|
|
||||||
from ptvp35 import *
|
from ptvp35 import *
|
||||||
from ptvp35.instrumentation import *
|
from ptvp35.instrumentation import *
|
||||||
|
except:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
async def aprint(*args, **kwargs):
|
async def aprint(*args, **kwargs):
|
||||||
@ -135,7 +140,7 @@ run_all = 'all' in sys.argv
|
|||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
(path := pathlib.Path('dev.db')).unlink(missing_ok=True)
|
(path := pathlib.Path(__file__).parent / 'trace_example.db').unlink(missing_ok=True)
|
||||||
|
|
||||||
with ExitStack() as es:
|
with ExitStack() as es:
|
||||||
LogWrites().enter(es)
|
LogWrites().enter(es)
|
@ -18,3 +18,5 @@ These apply both to the internal PARRRATE TNV team behind Persistence 5 and to e
|
|||||||
* Forking of the repository is encouraged.
|
* Forking of the repository is encouraged.
|
||||||
* Usage of the repository as a reference for custom data storage solutions is encouraged.
|
* Usage of the repository as a reference for custom data storage solutions is encouraged.
|
||||||
* Instrumentation code base is more open to direct code contributions.
|
* Instrumentation code base is more open to direct code contributions.
|
||||||
|
* Main way of instrumentation is code injection.
|
||||||
|
* Instrumentation on its own shouldn't require changes to the core code, even though instrumentation-allowing core code is preferred.
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
Historical notes
|
Historical notes
|
||||||
================
|
================
|
||||||
|
|
||||||
Persistence 1.
|
Persistence 1/2. CmbPrst.
|
||||||
--------------
|
|
||||||
|
|
||||||
* Used by CMB.
|
|
||||||
|
|
||||||
Persistence 2. CmbPrst.
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
* Internal storage of CMB.
|
* Internal storage of CMB.
|
||||||
|
@ -9,6 +9,7 @@ Memory-Resident DataBase for simple single-process asynchronous Python applicati
|
|||||||
|
|
||||||
motivation
|
motivation
|
||||||
usage
|
usage
|
||||||
|
structure
|
||||||
guarantees
|
guarantees
|
||||||
ordering
|
ordering
|
||||||
projects
|
projects
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ptvp35
|
Modules
|
||||||
======
|
=======
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 4
|
:maxdepth: 4
|
||||||
|
@ -4,17 +4,17 @@ Traced example of how ordering works in persistence5
|
|||||||
Source
|
Source
|
||||||
------
|
------
|
||||||
|
|
||||||
.. literalinclude :: ../../traced_example.py
|
.. literalinclude :: ../scripts/traced_example.py
|
||||||
:language: python3
|
:language: python3
|
||||||
|
|
||||||
Writes/reads log
|
Writes/reads log
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
.. literalinclude :: ../../traced_example.txt
|
.. literalinclude :: ../scripts/traced_example.txt
|
||||||
:language: plain
|
:language: plain
|
||||||
|
|
||||||
Everything log
|
Everything log
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. literalinclude :: ../../traced_example_all.txt
|
.. literalinclude :: ../scripts/traced_example_all.txt
|
||||||
:language: plain
|
:language: plain
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ptvp35 package
|
ptvp35 (API Reference)
|
||||||
==============
|
======================
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
|
17
docs/source/structure.rst
Normal file
17
docs/source/structure.rst
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Inner structure
|
||||||
|
===============
|
||||||
|
|
||||||
|
Main-Memory DataBase
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
DataBase Stream File
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Request Queue
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Transaction View
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Transaction
|
||||||
|
-----------
|
@ -23,7 +23,7 @@ Basic functionality
|
|||||||
.. code-block:: python3
|
.. code-block:: python3
|
||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
from ptvp35 import DbFactory, KVJson
|
from ptvp35 import *
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
async with DbFactory(pathlib.Path('example.db'), kvfactory=KVJson()) as connection:
|
async with DbFactory(pathlib.Path('example.db'), kvfactory=KVJson()) as connection:
|
||||||
@ -33,7 +33,7 @@ Different ways to get/set a value:
|
|||||||
|
|
||||||
.. code-block:: python3
|
.. code-block:: python3
|
||||||
|
|
||||||
from ptvp35 import DbConnection
|
from ptvp35 import *
|
||||||
|
|
||||||
async def _main(connection: DbConnection):
|
async def _main(connection: DbConnection):
|
||||||
value0 = connection.get('increment-0', 0)
|
value0 = connection.get('increment-0', 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user