Skip to content

feat(parameters): validate bounds and add brightness/contrast - #59

Merged
ThomasMalletCodra merged 3 commits into
developfrom
feat/dataset-parameter-bounds
Sep 10, 2026
Merged

feat(parameters): validate bounds and add brightness/contrast#59
ThomasMalletCodra merged 3 commits into
developfrom
feat/dataset-parameter-bounds

Conversation

@PierreRaybaut

@PierreRaybaut PierreRaybaut commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an optional relational and context-aware validation hook for parameter DataSets and invoke it before decorated computations and object creation paths.
  • Define precise bounds and cross-field constraints for signal and image parameter families.
  • Add a numerically stable, ROI-aware brightness and contrast adjustment with portable histogram context and dtype preservation.

Integration

Depends on PlotPyStack/guidata#114 for HistogramRangeItem and the slider-enabled editing primitives.

Downstream PR: DataLab-Platform/DataLab#368.

Before merge

  • Raise the minimum guidata dependency to the released version containing HistogramRangeItem.

Validation

Focused validation and exposure tests: 148 passed, 4 skipped.

Add unconditional numeric bounds and contextual validation while
preserving signed coordinates and descending domains.

Assisted-by: GPT-5.6 Sol
@PierreRaybaut

Copy link
Copy Markdown
Contributor Author

CI tests are failing only because this PR needs the changes implemented in this guidata PR.

@PierreRaybaut
PierreRaybaut marked this pull request as ready for review September 10, 2026 07:34
@ThomasMalletCodra ThomasMalletCodra added this to the V1.3.0 milestone Sep 10, 2026
The `getattr(super(), "validate_parameters", None)` guard was duplicated
verbatim across five parameter classes. `validate_dataset()` already performs
exactly that lookup, so it now documents and accepts a `super()` proxy and
becomes the single place resolving the optional parent hook.

Behaviour is unchanged: `super()` still resolves against the caller's MRO bound
to `self`, and cooperative chains still terminate silently when no ancestor
defines the hook. Verified on the multiple-inheritance case
(`UniformDistribution2DParam`), which is why a plain helper call was kept
instead of introducing a mixin that would have altered MRO linearization.
Side effect: five `not-callable` false positives disappear, the dynamic lookup
no longer being visible to Pylint at each call site.

Replace the scattered `no-value-for-parameter` suppressions with a documented
module-level disable in the three test modules exercising the expanded-keyword
call style, which `@computation_function` enables by rewriting the signature at
import time -- something Pylint cannot follow.

Resync the translation catalogs, which were out of date on this branch: the
brightness/contrast strings had been appended manually instead of scanned, and
the `sigima.objects.annotations` doc entries were missing.

Assisted-by: Claude Opus 5
@ThomasMalletCodra
ThomasMalletCodra merged commit 00db591 into develop Sep 10, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants