Skip to content

Commit a094aa1

Browse files
committed
Refined DCB code and updated docs.
1 parent d717d9e commit a094aa1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2057
-1692
lines changed

.github/workflows/runtests.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
PGPASSWORD=postgres psql -c "ALTER DATABASE eventsourcing OWNER TO eventsourcing;" -U postgres -h localhost
4848
PGPASSWORD=postgres psql eventsourcing -c "CREATE SCHEMA myschema AUTHORIZATION eventsourcing" -U postgres -h localhost
4949
50+
- name: Start UmaDB
51+
run: make start-umadb
52+
5053
- name: Install Poetry
5154
run: make install-poetry
5255

@@ -62,6 +65,10 @@ jobs:
6265
- name: Benchmark
6366
run: make benchmark
6467

68+
- name: Stop UmaDB
69+
run: make stop-umadb
70+
71+
6572
# - name: Coveralls
6673
# uses: AndreMiras/coveralls-python-action@develop
6774
# with:

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,13 @@ docs-pdf:
242242
# .PHONY: ramdisk
243243
# ramdisk:
244244
# diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://204800`
245+
246+
.PHONY: start-umadb
247+
start-umadb:
248+
docker run --rm -d --name my-umadb -p 50051:50051 umadb/umadb:latest
249+
sleep 1
250+
251+
252+
.PHONY: stop-umadb
253+
stop-umadb:
254+
docker stop my-umadb

docs/topics/dcb.rst

Lines changed: 972 additions & 4 deletions
Large diffs are not rendered by default.

docs/topics/examples.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,14 @@ Example systems
7070

7171
.. _Dynamic consistency boundaries:
7272

73-
Dynamic consistency boundaries
74-
==============================
73+
DCB examples
74+
============
7575

7676
.. toctree::
7777
:maxdepth: 2
7878

79-
examples/coursebooking
80-
examples/coursebooking-dcb
81-
examples/coursebooking-dcb-postgres-tt
82-
examples/coursebooking-dcb-umadb
83-
examples/coursebooking-dcb-refactored
84-
examples/coursebooking-dcb-slices
79+
examples/dcb-enrolment-introduction
80+
examples/dcb-enrolment-with-basic-objects
81+
examples/dcb-enrolment-with-enduring-objects
82+
examples/dcb-enrolment-with-vertical-slices
83+
examples/dcb-enrolment-speedrun

docs/topics/examples/aggregate10.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Application
3535
-----------
3636

3737
The :class:`~examples.aggregate10.application.DogSchool` application in this example uses the
38-
:class:`~examples.aggregate9.msgspecstructs.MsgspecApplication` class
38+
:class:`~examples.aggregate9.msgpack.MsgspecApplication` class
3939
from :doc:`example 9 </topics/examples/aggregate9>`.
4040

4141
.. literalinclude:: ../../../examples/aggregate10/application.py

docs/topics/examples/aggregate9.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,21 @@ The benchmarks were done with pytest-benchmark.
5353
- 296 (0.21x)
5454

5555

56-
Msgspec mapper
57-
--------------
56+
MessagePack mapper
57+
------------------
5858

59-
The :class:`~examples.aggregate9.msgspecstructs.MsgspecMapper` class is a :ref:`mapper<Mapper>` that supports
59+
The :class:`~examples.aggregate9.msgpack.MessagePackMapper` class is a :ref:`mapper<Mapper>` that supports
6060
msgspec structs. It is responsible for converting domain model objects to Python bytes objects, and for
6161
reconstructing model objects from Python bytes objects.
6262

63-
.. literalinclude:: ../../../examples/aggregate9/msgspecstructs.py
64-
:pyobject: MsgspecMapper
63+
.. literalinclude:: ../../../examples/aggregate9/msgpack.py
64+
:pyobject: MessagePackMapper
6565

66-
The :class:`~examples.aggregate9.msgspecstructs.MsgspecApplication` class is a
66+
The :class:`~examples.aggregate9.msgpack.MsgspecApplication` class is a
6767
subclass of the library's :class:`~eventsourcing.application.Application` class
68-
which is configured to use :class:`~examples.aggregate9.msgspecstructs.MsgspecMapper`.
68+
which is configured to use :class:`~examples.aggregate9.msgpack.MessagePackMapper`.
6969

70-
.. literalinclude:: ../../../examples/aggregate9/msgspecstructs.py
70+
.. literalinclude:: ../../../examples/aggregate9/msgpack.py
7171
:pyobject: MsgspecApplication
7272

7373

@@ -91,7 +91,7 @@ Application
9191
-----------
9292

9393
The :class:`~examples.aggregate9.application.DogSchool` application in this example uses the
94-
:class:`~examples.aggregate9.msgspecstructs.MsgspecApplication`. It must receive the new events that are returned
94+
:class:`~examples.aggregate9.msgpack.MsgspecApplication`. It must receive the new events that are returned
9595
by the aggregate command methods, and pass them to its :func:`~eventsourcing.application.Application.save`
9696
method. The aggregate projector function must also be supplied when reconstructing an aggregate from the
9797
repository, and when taking snapshots.
@@ -119,7 +119,7 @@ Code reference
119119
:members:
120120
:undoc-members:
121121

122-
.. automodule:: examples.aggregate9.msgspecstructs
122+
.. automodule:: examples.aggregate9.msgpack
123123
:show-inheritance:
124124
:member-order: bysource
125125
:members:

docs/topics/examples/coursebooking-dcb-postgres-tt.rst

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)