Skip to content

Commit 2766c4c

Browse files
committed
Revert "Refactor processor method names for clarity and consistency"
This reverts commit b2405b1.
1 parent b2405b1 commit 2766c4c

File tree

25 files changed

+1482
-730
lines changed

25 files changed

+1482
-730
lines changed

CHANGELOG.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@
22

33
See DataLab [roadmap page](https://datalab-platform.com/en/contributing/roadmap.html) for future and past milestones.
44

5-
## DataLab Version 0.21.0 ##
6-
7-
💥 New features and enhancements:
8-
9-
* Generic processing types refactoring:
10-
* Refactored the naming convention of core `BaseProcessor` methods implementing generic data processing patterns (e.g. one input ➝ one output, n inputs ➝ one output, etc.)
11-
* New method names are now based on their input/output signature for better clarity and extensibility:
12-
* `compute_1_to_1`: transforms each selected object independently
13-
* `compute_1_to_0`: performs a measurement or analysis without generating a new object
14-
* `compute_1_to_n`: generates multiple outputs from a single input (e.g. ROI extraction)
15-
* `compute_n_to_1`: combines multiple inputs into a single output (e.g. sum, mean); supports pairwise mode
16-
* `compute_2_to_1`: applies a binary operation between an object and a second operand (object or constant); supports pairwise mode
17-
* These methods are internal and used by advanced developers (e.g. plugin authors); hence, **no backward compatibility is maintained**
18-
* This closes [Issue #180](https://github.com/DataLab-Platform/DataLab/issues/180) - Rationalize `BaseProcessor` method names for core processing types
19-
205
## DataLab Version 0.20.0 ##
216

227
💥 New features and enhancements:

cdl/computation/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ class ConstantParam(gds.DataSet):
174174
# MARK: Helper functions for creating result objects -----------------------------------
175175

176176

177-
def dst_1_to_1(
177+
def dst_11(
178178
src: SignalObj | ImageObj, name: str, suffix: str | None = None
179179
) -> SignalObj | ImageObj:
180180
"""Create a result object, as returned by the callback function of the
181-
:func:`cdl.core.gui.processor.base.BaseProcessor.compute_1_to_1` method
181+
:func:`cdl.core.gui.processor.base.BaseProcessor.compute_11` method
182182
183183
Args:
184184
src: source signal or image object
@@ -212,7 +212,7 @@ def dst_n1n(
212212
suffix: str | None = None,
213213
) -> SignalObj | ImageObj:
214214
"""Create a result object, as returned by the callback function of the
215-
:func:`cdl.core.gui.processor.base.BaseProcessor.compute_2_to_1` method
215+
:func:`cdl.core.gui.processor.base.BaseProcessor.compute_n1n` method
216216
217217
Args:
218218
src1: input signal or image object
@@ -241,9 +241,9 @@ def new_signal_result(
241241
units: tuple[str, str] | None = None,
242242
labels: tuple[str, str] | None = None,
243243
) -> SignalObj:
244-
"""Create new signal object as a result of a `compute_1_to_1` function
244+
"""Create new signal object as a result of a compute_11 function
245245
246-
As opposed to the `dst_1_to_1` functions, this function creates a new signal object
246+
As opposed to the `dst_11` functions, this function creates a new signal object
247247
without copying the original object metadata, except for the "source" entry.
248248
249249
Args:

0 commit comments

Comments
 (0)