1.1rc0: rollback + new docs
This commit is contained in:
parent
ee7659bda2
commit
0e55f88adb
33
Dockerfile
33
Dockerfile
@ -7,13 +7,36 @@ RUN apt-get install -y npm
|
|||||||
RUN npm install -g http-server
|
RUN npm install -g http-server
|
||||||
RUN pip install pydata-sphinx-theme
|
RUN pip install pydata-sphinx-theme
|
||||||
RUN pip install git+https://gitea.parrrate.ru/PTV/rainbowadn.git@e9fba7b064902ceedee0dd5578cb47030665a6aa
|
RUN pip install git+https://gitea.parrrate.ru/PTV/rainbowadn.git@e9fba7b064902ceedee0dd5578cb47030665a6aa
|
||||||
COPY docs/Makefile Makefile
|
|
||||||
|
RUN mkdir /app/docs/
|
||||||
|
RUN mkdir /app/docs/build/
|
||||||
|
RUN mkdir /app/docs/build/html/
|
||||||
|
WORKDIR /app/legacy/
|
||||||
|
RUN git clone --branch 1.0 https://gitea.parrrate.ru/PTV/ptvp35.git
|
||||||
|
WORKDIR /app/legacy/ptvp35/
|
||||||
|
RUN python traced_example.py > traced_example.txt
|
||||||
|
RUN python traced_example.py all > traced_example_all.txt
|
||||||
|
RUN cp -r docs/source/ ./source/
|
||||||
|
RUN cp docs/Makefile ./Makefile
|
||||||
|
RUN make html
|
||||||
|
RUN cp -r /app/legacy/ptvp35/build/html/ /app/docs/build/html/1.0/
|
||||||
|
RUN git reset --hard
|
||||||
|
|
||||||
|
RUN git fetch && git checkout 1.1rc0
|
||||||
|
WORKDIR /app/legacy/ptvp35/docs/
|
||||||
|
RUN make html
|
||||||
|
RUN cp -r /app/legacy/ptvp35/docs/build/html/ /app/docs/build/html/1.1rc0/
|
||||||
|
RUN rm -r /app/legacy/ptvp35/docs/build/
|
||||||
|
WORKDIR /app/legacy/ptvp35/
|
||||||
|
|
||||||
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY docs/Makefile docs/Makefile
|
||||||
COPY setup.py setup.py
|
COPY setup.py setup.py
|
||||||
COPY traced_example.py traced_example.py
|
COPY traced_example.py traced_example.py
|
||||||
COPY ptvp35 ptvp35
|
COPY ptvp35 ptvp35
|
||||||
RUN python traced_example.py > traced_example.txt
|
COPY docs/source docs/source
|
||||||
RUN python traced_example.py all > traced_example_all.txt
|
WORKDIR /app/docs/
|
||||||
COPY docs/source source
|
|
||||||
RUN make html
|
RUN make html
|
||||||
WORKDIR /app/build/html/
|
WORKDIR /app/docs/build/html/
|
||||||
CMD [ "http-server", "-p", "80" ]
|
CMD [ "http-server", "-p", "80" ]
|
||||||
|
@ -17,4 +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 ../traced_example.py all > ../traced_example_all.txt
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
project = 'ptvp35'
|
project = 'ptvp35'
|
||||||
copyright = '2022, PARRRATE TNV'
|
copyright = '2022, PARRRATE TNV'
|
||||||
author = 'PARRRATE TNV'
|
author = 'PARRRATE TNV'
|
||||||
with open('../setup.py') as f:
|
with open('../../setup.py') as f:
|
||||||
_src = f.read()
|
_src = f.read()
|
||||||
_src = _src[_src.index('version=\'') + 9:]
|
_src = _src[_src.index('version=\'') + 9:]
|
||||||
_src = _src[:_src.index('\'')]
|
_src = _src[:_src.index('\'')]
|
||||||
@ -37,4 +37,4 @@ html_static_path = ['_static']
|
|||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
|
@ -4,17 +4,17 @@ Traced example of how ordering works in persistence5
|
|||||||
Source
|
Source
|
||||||
------
|
------
|
||||||
|
|
||||||
.. literalinclude :: ../traced_example.py
|
.. literalinclude :: ../../traced_example.py
|
||||||
:language: python3
|
:language: python3
|
||||||
|
|
||||||
Writes/reads log
|
Writes/reads log
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
.. literalinclude :: ../traced_example.txt
|
.. literalinclude :: ../../traced_example.txt
|
||||||
:language: plain
|
:language: plain
|
||||||
|
|
||||||
Everything log
|
Everything log
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. literalinclude :: ../traced_example_all.txt
|
.. literalinclude :: ../../traced_example_all.txt
|
||||||
:language: plain
|
:language: plain
|
||||||
|
@ -763,7 +763,6 @@ class TransactionView(VirtualConnection):
|
|||||||
"""do something (inside of async with), then wait for submitted changes to be committed."""
|
"""do something (inside of async with), then wait for submitted changes to be committed."""
|
||||||
return FutureContext(self.__subfuture)
|
return FutureContext(self.__subfuture)
|
||||||
|
|
||||||
@nightly
|
|
||||||
def rollback(self, /) -> None:
|
def rollback(self, /) -> None:
|
||||||
"""clear unsubmitted changes."""
|
"""clear unsubmitted changes."""
|
||||||
self.__delta.clear()
|
self.__delta.clear()
|
||||||
@ -963,6 +962,8 @@ class Transaction:
|
|||||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||||
if exc_type is None:
|
if exc_type is None:
|
||||||
await self.__view.commit()
|
await self.__view.commit()
|
||||||
|
else:
|
||||||
|
self.__view.rollback()
|
||||||
self._clean()
|
self._clean()
|
||||||
|
|
||||||
def _clean(self, /) -> None:
|
def _clean(self, /) -> None:
|
||||||
@ -978,4 +979,6 @@ class Transaction:
|
|||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
if exc_type is None:
|
if exc_type is None:
|
||||||
self.__view.submit()
|
self.__view.submit()
|
||||||
|
else:
|
||||||
|
self.__view.rollback()
|
||||||
self._clean()
|
self._clean()
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='ptvp35',
|
name='ptvp35',
|
||||||
version='1.0',
|
version='1.1rc0',
|
||||||
packages=['ptvp35'],
|
packages=['ptvp35'],
|
||||||
url='https://gitea.ongoteam.net/PTV/ptvp35',
|
url='https://gitea.ongoteam.net/PTV/ptvp35',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
|
Loading…
Reference in New Issue
Block a user