From ceed68c298b9eaf2b86777234dd77d64c8395ebd Mon Sep 17 00:00:00 2001 From: ganevgv Date: Sat, 13 Jun 2026 23:04:16 +0100 Subject: [PATCH 1/2] Add SWIFT to discrete_mechanisms innit --- dpsynth/discrete_mechanisms/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dpsynth/discrete_mechanisms/__init__.py b/dpsynth/discrete_mechanisms/__init__.py index 0c47d36..c93a0df 100644 --- a/dpsynth/discrete_mechanisms/__init__.py +++ b/dpsynth/discrete_mechanisms/__init__.py @@ -23,3 +23,4 @@ from dpsynth.discrete_mechanisms.direct import DirectConfig from dpsynth.discrete_mechanisms.independent import IndependentConfig from dpsynth.discrete_mechanisms.mst import MSTConfig +from dpsynth.discrete_mechanisms.swift import SWIFTConfig From 6da995be28597460fac3d506fcff75c5f846b60d Mon Sep 17 00:00:00 2001 From: ganevgv Date: Sun, 14 Jun 2026 08:25:09 +0100 Subject: [PATCH 2/2] Add SWIFT to api.py --- dpsynth/discrete_mechanisms/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dpsynth/discrete_mechanisms/api.py b/dpsynth/discrete_mechanisms/api.py index 15a05bf..f86b233 100644 --- a/dpsynth/discrete_mechanisms/api.py +++ b/dpsynth/discrete_mechanisms/api.py @@ -24,6 +24,7 @@ from . import direct from . import independent from . import mst +from . import swift class DiscreteMechanismConfig(Protocol): @@ -65,6 +66,8 @@ def run_mechanism( run_mechanism_fn = direct.run_mechanism elif isinstance(config, independent.IndependentConfig): run_mechanism_fn = independent.run_mechanism + elif isinstance(config, independent.SWIFTConfig): + run_mechanism_fn = swift.run_mechanism else: raise ValueError(f'Unknown mechanism: {type(config)}')