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 pip install pydata-sphinx-theme
|
||||
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 traced_example.py traced_example.py
|
||||
COPY ptvp35 ptvp35
|
||||
RUN python traced_example.py > traced_example.txt
|
||||
RUN python traced_example.py all > traced_example_all.txt
|
||||
COPY docs/source source
|
||||
COPY docs/source docs/source
|
||||
WORKDIR /app/docs/
|
||||
RUN make html
|
||||
WORKDIR /app/build/html/
|
||||
WORKDIR /app/docs/build/html/
|
||||
CMD [ "http-server", "-p", "80" ]
|
||||
|
@ -17,4 +17,6 @@ help:
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
python ../traced_example.py > ../traced_example.txt
|
||||
python ../traced_example.py all > ../traced_example_all.txt
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
@ -9,7 +9,7 @@
|
||||
project = 'ptvp35'
|
||||
copyright = '2022, PARRRATE TNV'
|
||||
author = 'PARRRATE TNV'
|
||||
with open('../setup.py') as f:
|
||||
with open('../../setup.py') as f:
|
||||
_src = f.read()
|
||||
_src = _src[_src.index('version=\'') + 9:]
|
||||
_src = _src[:_src.index('\'')]
|
||||
@ -37,4 +37,4 @@ html_static_path = ['_static']
|
||||
import sys
|
||||
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
|
||||
------
|
||||
|
||||
.. literalinclude :: ../traced_example.py
|
||||
.. literalinclude :: ../../traced_example.py
|
||||
:language: python3
|
||||
|
||||
Writes/reads log
|
||||
----------------
|
||||
|
||||
.. literalinclude :: ../traced_example.txt
|
||||
.. literalinclude :: ../../traced_example.txt
|
||||
:language: plain
|
||||
|
||||
Everything log
|
||||
--------------
|
||||
|
||||
.. literalinclude :: ../traced_example_all.txt
|
||||
.. literalinclude :: ../../traced_example_all.txt
|
||||
:language: plain
|
||||
|
@ -763,7 +763,6 @@ class TransactionView(VirtualConnection):
|
||||
"""do something (inside of async with), then wait for submitted changes to be committed."""
|
||||
return FutureContext(self.__subfuture)
|
||||
|
||||
@nightly
|
||||
def rollback(self, /) -> None:
|
||||
"""clear unsubmitted changes."""
|
||||
self.__delta.clear()
|
||||
@ -963,6 +962,8 @@ class Transaction:
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
if exc_type is None:
|
||||
await self.__view.commit()
|
||||
else:
|
||||
self.__view.rollback()
|
||||
self._clean()
|
||||
|
||||
def _clean(self, /) -> None:
|
||||
@ -978,4 +979,6 @@ class Transaction:
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
if exc_type is None:
|
||||
self.__view.submit()
|
||||
else:
|
||||
self.__view.rollback()
|
||||
self._clean()
|
||||
|
Loading…
Reference in New Issue
Block a user