Skip to content

Commit 8bff704

Browse files
committed
Moved to build as the universal function
1 parent ea823bd commit 8bff704

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pycider/processes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class ProcessAdapt(Generic[EI, CI, S, EO, CO]):
8585
"""Adapt process Commands / Events into new output Commands and Events."""
8686

8787
@classmethod
88-
def adapt(
88+
def build(
8989
cls,
9090
select_event: Callable[[EI], EO | None],
9191
convert_command: Callable[[CO], CI],
@@ -150,7 +150,7 @@ class ProcessCombineWithDecider(Generic[E, C, PS, DS]):
150150
"""Combine a Processor with a Decider together."""
151151

152152
@classmethod
153-
def combine(
153+
def build(
154154
cls, proc: IProcess[E, C, PS], decider: Decider[E, C, DS]
155155
) -> Decider[E, C, tuple[DS, PS]]:
156156
"""Combine a Process and a Decider into a single Decider.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pycider"
3-
version = "0.7.12"
3+
version = "0.8.12"
44
description = "Aggregates composition for domain driven design in Python"
55
authors = ["Melody Asper <melodyaheath@gmail.com>"]
66
readme = "README.md"

tests/test_compositions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ def command_converter(command):
266266
case _:
267267
raise RuntimeError("Improper state")
268268

269-
adapted_process = ProcessAdapt.adapt(select_event, command_converter, CatLight())
270-
cat_bulb = ProcessCombineWithDecider.combine(adapted_process, cat_and_bulb)
269+
adapted_process = ProcessAdapt.build(select_event, command_converter, CatLight())
270+
cat_bulb = ProcessCombineWithDecider.build(adapted_process, cat_and_bulb)
271271
cat_b = InMemory(cat_bulb)
272272
cat_b(Right(BulbCommandFit(max_uses=5)))
273273
cat_b(Left(CatCommandGetToSleep()))

0 commit comments

Comments
 (0)