From 2f9f82371cbc3ce10852db2b62b5a2580163f98a Mon Sep 17 00:00:00 2001 From: Constantin Chaumet <16308584+Jekannadar@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:45:58 +0200 Subject: [PATCH 1/5] Wrap MockTargets in benchmark in dicts --- benchmarks/test_benchmark_chain_100.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/test_benchmark_chain_100.py b/benchmarks/test_benchmark_chain_100.py index 013666c..9560f50 100644 --- a/benchmarks/test_benchmark_chain_100.py +++ b/benchmarks/test_benchmark_chain_100.py @@ -11,10 +11,10 @@ class ChainLink(CoSyLuigiTask, ABC): chain_link: CoSyLuigiTaskParameter | None def output(self): - return MockTarget("ChainLink") + return {"chain_output": MockTarget("ChainLink")} def run(self): - self.output().open("w").write("Ok.") + self.output()["chain_output"].open("w").write("Ok.") class StartingLink(ChainLink): @@ -29,10 +29,10 @@ class FinalLink(CoSyLuigiTask): chain_link = CoSyLuigiTaskParameter(ChainLink) def output(self): - return MockTarget("FinalLink") + return {"final_output": MockTarget("ChainLink")} def run(self): - self.output().open("w").write("Ok.") + self.output()["final_output"].open("w").write("Ok.") @pytest.fixture From bff133b788221e7818bc90629779c9e1c1650f07 Mon Sep 17 00:00:00 2001 From: Constantin Chaumet <16308584+Jekannadar@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:47:00 +0200 Subject: [PATCH 2/5] Remove unused subclass hook --- src/cosy_luigi/core/combinatorics.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/cosy_luigi/core/combinatorics.py b/src/cosy_luigi/core/combinatorics.py index fb09bd7..69b5e8f 100644 --- a/src/cosy_luigi/core/combinatorics.py +++ b/src/cosy_luigi/core/combinatorics.py @@ -26,10 +26,6 @@ def __init__(self, required_task: type[CoSyLuigiTask], *, unique_across_prior_ta class CoSyLuigiTask(luigi.Task): - def __init_subclass__(cls, **kwargs): - super().__init_subclass__(**kwargs) - cls.self = cls - @classmethod @cache def get_all_variants(cls): From e2662b111fee561c9eb3e1be07603981420e7202 Mon Sep 17 00:00:00 2001 From: Constantin Chaumet <16308584+Jekannadar@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:54:44 +0200 Subject: [PATCH 3/5] Benchmark does not require dicts at all (no scheduling) --- benchmarks/test_benchmark_chain_100.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/benchmarks/test_benchmark_chain_100.py b/benchmarks/test_benchmark_chain_100.py index 9560f50..c5fbf74 100644 --- a/benchmarks/test_benchmark_chain_100.py +++ b/benchmarks/test_benchmark_chain_100.py @@ -10,12 +10,6 @@ class ChainLink(CoSyLuigiTask, ABC): chain_link: CoSyLuigiTaskParameter | None - def output(self): - return {"chain_output": MockTarget("ChainLink")} - - def run(self): - self.output()["chain_output"].open("w").write("Ok.") - class StartingLink(ChainLink): chain_link = None @@ -28,12 +22,6 @@ class RepeatingLink(ChainLink): class FinalLink(CoSyLuigiTask): chain_link = CoSyLuigiTaskParameter(ChainLink) - def output(self): - return {"final_output": MockTarget("ChainLink")} - - def run(self): - self.output()["final_output"].open("w").write("Ok.") - @pytest.fixture def repo(): From 5aa1f57bcc9c3c4c98825acc5f1a54a42e7f3bc1 Mon Sep 17 00:00:00 2001 From: Constantin Chaumet <16308584+Jekannadar@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:55:42 +0200 Subject: [PATCH 4/5] Format source --- benchmarks/test_benchmark_chain_100.py | 1 - 1 file changed, 1 deletion(-) diff --git a/benchmarks/test_benchmark_chain_100.py b/benchmarks/test_benchmark_chain_100.py index c5fbf74..0359f29 100644 --- a/benchmarks/test_benchmark_chain_100.py +++ b/benchmarks/test_benchmark_chain_100.py @@ -2,7 +2,6 @@ import pytest from cosy.maestro import Maestro -from luigi.mock import MockTarget from cosy_luigi import CoSyLuigiRepo, CoSyLuigiTask, CoSyLuigiTaskParameter From bf3b72c50599108cbd86db7ad00dccc82ad847e1 Mon Sep 17 00:00:00 2001 From: Constantin Chaumet <16308584+Jekannadar@users.noreply.github.com> Date: Fri, 17 Apr 2026 15:03:11 +0200 Subject: [PATCH 5/5] Update workflow to not push commits made in PRs --- .github/workflows/benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index cc23fa3..fe71edc 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -72,7 +72,7 @@ jobs: git config user.email "269699678+cls-python-workflows[bot]@users.noreply.github.com" - name: Determine Push Or Not - if: github.event_name != 'pull_request' + if: github.event_name == 'push' run: | echo "PUSH_TO_BENCHMARKS=true" >> $GITHUB_ENV