aleksi

Welcome šŸ‘‹ I'm Alexis Le Baron

I’m a computer engineer passionate about my work and the beauty of perfect well-structured systems.

I value clarity, intention, and simplicity in both code and life.

[project]
name = "Aleksi44"
version = "2025.10.30"
description = "Human in perpetual beta."
authors = [{ name = "Aleksi", email = "alexis@le-baron.com" }]
repository = "https://github.com/Aleksi44"
license = "Open Source"
keywords = ["design patterns", "domain-driven design", "clean architecture"]

[dependencies]
coffee = ">=3.0"
sleep = "<2.0"
running = "100.0"

[preferences]
theme = "dark"
editor = "jetbrains"
music = "*"

[tool.life]
goals = ["create", "learn", "travel"]
status = "refactoring self"
changelog = [
    "v2025.10: growth in progress",
    "v2019.06: compiled as a computer engineer",
    "v2014.09: initialized higher education",
    "v2013.10: survived cold military service in Finland"
]
from datetime import datetime
from lebaron.service_layer import unit_of_work
from lebaron.domain import events, commands, exceptions, adapters


def run_rocket(
    cmd: commands.RunRocket,
    uow: unit_of_work.AbstractUnitOfWork,
    notifier: adapters.AbstractNotification,
    streamhub: adapters.AbstractStreaming,
):
    with uow:
        if not uow.rockets.input.exist(cmd.rocket_id):
            raise exceptions.InputIsNotOnMars(
                rocket_id=cmd.rocket_id,
            )
        rocket = uow.rockets.input.get(cmd.rocket_id)
        rocket.launch_at = datetime.now()
        rocket.add_event(
            events.LaunchSequenceInitiated(
                rocket_id=cmd.rocket_id,
            )
        )
        streamhub.produce(queue="mars", message="Engines roaring across the red dust")
        notifier.send(message="Mission to Mars has launched")
        uow.commit()