v0.27.2#
This patch release improves error messaging for optional-extra imports, adds
bounds validation and warnings for RandomCropPerturber and
WaterDropletPerturber, and includes corresponding test coverage.
Updates#
Updated import guard error messages across all optional-extra modules to surface the original upstream
ImportErrorwhen an extra is installed but fails to import due to a transitive dependency issue. Previously, users would only see a message to install the extra even when it was already installed.Updated
crop_sizecheck inRandomCropPerturber.perturbto check width and height by element and to warn the user ifcrop_sizeis greater than image size.
Additions#
Added
test_crop_size_boundstoTestRandomCropPerturberto checkcrop_sizewarning.Added a
UserWarninginWaterDropletPerturberwhensize_rangevalues are below the minimum effective droplet size of0.1. The water droplet model enforces a minimum droplet radius of0.1in glass coordinate units; values below this threshold are clamped to0.1. Updated docstrings to document this constraint and advise usingnum_dropsto control the number of droplets instead.Added
test_size_range_below_minimum_warnsandtest_size_range_above_minimum_no_warningtoTestWaterDropletPerturberto verify the new warning behavior.