Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
efdf023
Update documentation url
Jan 11, 2026
6745051
[FEATURE] Added Fallback for saga steps with circuit breaker supporti…
vadikko2 Jan 11, 2026
0493c17
Update README badges
Jan 15, 2026
7bd9e09
[HOTFIX] Duplicate Event Processing (#36)
vadikko2 Jan 18, 2026
fe57add
Feature decouple interfaces from pydantic (#37)
vadikko2 Jan 20, 2026
47c2909
[BUGFIX] Fix stream mediator bootstrap method (#39)
vadikko2 Jan 23, 2026
d0a5aeb
[HOTFIX] Fix problem with injection asyncio Futures in DependencyInje…
vadikko2 Jan 23, 2026
eee0166
Add CodSpeed performance benchmarking integration (#41)
codspeed-hq[bot] Jan 23, 2026
c526618
Upgrade orjson version
Jan 23, 2026
a845305
[FEATURE] Enhanced Recursive Type Conversion for DCEvent (#42)
vadikko2 Jan 23, 2026
88a410d
[Feature] Support for customizing saga storage table names through en…
vadikko2 Jan 27, 2026
69e0c9b
[Bugfix] Add saga context dataclass wizard supporitng (#45)
vadikko2 Jan 27, 2026
a1427f3
[Feature] Add saga attemptes supporintg (#46)
vadikko2 Jan 28, 2026
05ee3e0
[Bugfix] Saga recovery: sagas that failed before any step completed (…
vadikko2 Jan 28, 2026
935ec01
[Feature] extend saga storage interface (#48)
vadikko2 Jan 28, 2026
a6c7dd0
Setting project coverage (#51)
vadikko2 Jan 30, 2026
1427c8c
Add new banchmarks (#52)
vadikko2 Jan 30, 2026
245d268
[Refactor] Fix Saga and StramHandler typing (#55)
vadikko2 Jan 31, 2026
976b3ba
[Feature] Add event propagation into event handlers (#58)
vadikko2 Feb 2, 2026
ce4dbdf
[Feature] Add saga id for step result (#59)
vadikko2 Feb 2, 2026
37e723a
Reduce saga storage overhead (#61)
vadikko2 Feb 20, 2026
bf46947
[Refactor] Upgrade README (#63)
vadikko2 Feb 21, 2026
95aed36
[Feature] Fallbacks for requests and events handling (#64)
vadikko2 Feb 21, 2026
c9349cc
Make sqlalchemy an optional dependency. Implement BinaryUUID for Post…
DioneyaCthulhu Feb 22, 2026
5977dd2
compatibility
DioneyaCthulhu Feb 22, 2026
bb538d9
lint fix
DioneyaCthulhu Feb 22, 2026
39e4c8f
lint fix
DioneyaCthulhu Feb 22, 2026
99485f8
save sqlalchemy as required dependency
DioneyaCthulhu Feb 22, 2026
5e6e5eb
lint fix
DioneyaCthulhu Feb 22, 2026
eed1e31
review fixes
DioneyaCthulhu Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CodSpeed

on:
push:
branches:
- "main"
- "master"
pull_request:
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Start infrastructure
run: |
docker compose -f docker-compose-test.yml up -d

- name: Wait for MySQL
run: |
for i in $(seq 1 30); do
if docker compose -f docker-compose-test.yml exec -T mysql_tests mysqladmin ping -h localhost -ucqrs -pcqrs --silent 2>/dev/null; then
echo "MySQL is ready"
exit 0
fi
echo "Waiting for MySQL... ($i/30)"
sleep 2
done
echo "MySQL did not become ready in time"
exit 1

- name: Wait for PostgreSQL
run: |
for i in $(seq 1 30); do
if docker compose -f docker-compose-test.yml exec -T postgres_tests pg_isready -h localhost -U cqrs -q 2>/dev/null; then
echo "PostgreSQL is ready"
exit 0
fi
echo "Waiting for PostgreSQL... ($i/30)"
sleep 2
done
echo "PostgreSQL did not become ready in time"
exit 1

- name: Wait for Redis
run: |
for i in $(seq 1 15); do
if docker compose -f docker-compose-test.yml exec -T redis_tests redis-cli ping 2>/dev/null | grep -q PONG; then
echo "Redis is ready"
exit 0
fi
echo "Waiting for Redis... ($i/15)"
sleep 1
done
echo "Redis did not become ready in time"
exit 1

- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: simulation
run: pytest -c ./tests/pytest-config.ini tests/benchmarks/ --codspeed

- name: Stop infrastructure
if: always()
run: docker compose -f docker-compose-test.yml down -v
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.12" ]
python-version: [ "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4
Expand All @@ -28,6 +28,6 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
if: success() && github.event_name == 'release'
if: success() && github.event_name == 'release' && matrix.python-version == '3.12'
run: |
twine upload dist/* --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
151 changes: 151 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: Tests

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,examples]"

- name: Get changed Python files
id: changed
run: |
git fetch origin main master 2>/dev/null || true
BASE="origin/main"
if ! git rev-parse --verify origin/main >/dev/null 2>&1; then BASE="origin/master"; fi
git diff --name-only $BASE...HEAD -- src/ tests/ examples/ | grep -E '\.py$' > changed.txt || true
if [ -s changed.txt ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
echo "Changed files:"
cat changed.txt || true

- name: Run ruff check
run: |
if [ "${{ steps.changed.outputs.has_changes }}" != "true" ]; then
echo "No Python files changed, skipping ruff check"
exit 0
fi
while IFS= read -r f; do [ -f "$f" ] && echo "$f"; done < changed.txt | xargs -r ruff check --config ruff.toml

- name: Run ruff format check
run: |
if [ "${{ steps.changed.outputs.has_changes }}" != "true" ]; then
echo "No Python files changed, skipping ruff format"
exit 0
fi
while IFS= read -r f; do [ -f "$f" ] && echo "$f"; done < changed.txt | xargs -r ruff format --check --config ruff.toml

- name: Run pyright
run: |
pyright --pythonversion ${{ matrix.python-version }} src tests examples

- name: Check minimum Python version (vermin)
run: |
vermin --target=3.10- --violations --eval-annotations --backport typing_extensions --exclude=venv --exclude=build --exclude=.git --exclude=.venv src examples tests

test:
name: test (py ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Start infrastructure
run: |
docker compose -f docker-compose-test.yml up -d

- name: Wait for MySQL
run: |
for i in $(seq 1 30); do
if docker compose -f docker-compose-test.yml exec -T mysql_tests mysqladmin ping -h localhost -ucqrs -pcqrs --silent 2>/dev/null; then
echo "MySQL is ready"
exit 0
fi
echo "Waiting for MySQL... ($i/30)"
sleep 2
done
echo "MySQL did not become ready in time"
exit 1

- name: Wait for PostgreSQL
run: |
for i in $(seq 1 30); do
if docker compose -f docker-compose-test.yml exec -T postgres_tests pg_isready -h localhost -U cqrs -q 2>/dev/null; then
echo "PostgreSQL is ready"
exit 0
fi
echo "Waiting for PostgreSQL... ($i/30)"
sleep 2
done
echo "PostgreSQL did not become ready in time"
exit 1

- name: Wait for Redis
run: |
for i in $(seq 1 15); do
if docker compose -f docker-compose-test.yml exec -T redis_tests redis-cli ping 2>/dev/null | grep -q PONG; then
echo "Redis is ready"
exit 0
fi
echo "Waiting for Redis... ($i/15)"
sleep 1
done
echo "Redis did not become ready in time"
exit 1

- name: Run all tests with coverage
env:
DATABASE_DSN: mysql+asyncmy://cqrs:cqrs@localhost:3307/test_cqrs
DATABASE_DSN_MYSQL: mysql+asyncmy://cqrs:cqrs@localhost:3307/test_cqrs
DATABASE_DSN_POSTGRESQL: postgresql+asyncpg://cqrs:cqrs@localhost:5433/cqrs
run: |
pytest -c ./tests/pytest-config.ini --cov=src --cov-report=xml --cov-report=term -o cache_dir=/tmp/pytest_cache ./tests/unit ./tests/integration

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

- name: Stop infrastructure
if: always()
run: docker compose -f docker-compose-test.yml down -v
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,5 @@ tmp/

# UV lock
uv.lock

.codspeed/
36 changes: 12 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
repos:
- hooks:
- id: check-toml
- id: check-docstring-first
- id: check-ast
- exclude: (^tests/mock/|^tests/integration/|^tests/fixtures)
- exclude: (^tests/mock/|^tests/integration/|^tests/fixtures|benchmarks)
id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- args:
- --pytest-test-first
exclude: (^tests/mock/|^tests/integration/|^tests/fixtures)
exclude: (^tests/mock/|^tests/integration/|^tests/fixtures|conftest\.py$)
id: name-tests-test
- id: check-merge-conflict
- id: check-json
Expand All @@ -21,25 +19,6 @@ repos:
- id: add-trailing-comma
repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
- hooks:
- args:
- --autofix
- --indent
- '2'
files: ^.*\.yaml$
id: pretty-format-yaml
- args:
- --autofix
- --indent
- '2'
id: pretty-format-toml
repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
- hooks:
- id: toml-sort
- id: toml-sort-fix
repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
- hooks:
- id: pycln
name: pycln
Expand All @@ -52,15 +31,24 @@ repos:
rev: v1.0.1
- hooks:
- id: ruff
args: [--fix]
args: [--fix, --config, ruff.toml]
- id: ruff-format
args: [--config, ruff.toml]
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.380
hooks:
- id: pyright
args: [--project, .]
types: [python]
- repo: https://github.com/netromdk/vermin
rev: v1.6.0
hooks:
- id: vermin
args: [--target=3.10-, --violations, --eval-annotations, --backport typing_extensions, --exclude=venv, --exclude=build, --exclude=.git, --exclude=.venv, src, examples, tests]
language: python
additional_dependencies: [vermin]
- repo: local
hooks:
- id: pytest-unit
Expand Down
Loading
Loading