You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #696 (split utils.py), which explicitly deferred this:
The two mega-functions being relocated … are themselves decomposition candidates, but that is out of scope here … Decomposition can follow once each lives in a smaller, single-concern file.
Now that #696/#715 puts each in its own module, decompose them. Current lizard metrics (NLOC / CCN / length):
function
module
NLOC
CCN
length
_type_check_params
_validate.py
291
164
372
_set_color_source_vec
_color.py
196
49
236
_get_collection_shape
_geometry.py
91
39
144
_convert_shapes
_geometry.py
102
22
176
Approach
One function per PR, each its own bisectable commit.
_type_check_params is a flat, sequential per-parameter validator → decompose into in-order per-parameter check helpers. Behavior-preserving constraint: preserve the exact validation order so the first-raised error is identical for any input. Fully covered by the local non-visual suite — lowest risk, do first.
_set_color_source_vec, _get_collection_shape, _convert_shapes produce rendering output → their only behavioral net is the CI visual baselines. Decompose carefully and require a green CI visual run before merge.
Risk
Unlike #696 (verbatim moves), this restructures real logic → behavior-change risk. Keep diffs small and per-function so regressions are easy to bisect/revert.
Activity
refactor(validate): decompose _type_check_params into per-parameter h…
refactor(geometry): lift pure shape converters out of _convert_shapes (…
refactor(color): extract origin/fetch/table helpers from _set_color_s…
refactor(color): extract origin/fetch/table helpers from _set_color_s…