Allow labelsGap to be a number (constant) or array (variable gaps)#265
Allow labelsGap to be a number (constant) or array (variable gaps)#265ilizaran wants to merge 3 commits into
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
Udayraj123
left a comment
There was a problem hiding this comment.
please make this PR brief and to the point with minimal diffs
User description
This enhancement allows field blocks to have different spacing between
consecutive field labels, providing more flexibility in OMR template
configuration for non-uniform layouts.
PR Type
Enhancement
Description
Support
labelsGapas number or array for flexible field spacingNormalize single number to repeated list in field block setup
Validate array length matches expected gaps count
Update dimension calculation to sum variable gaps
Modify bubble grid generation to use indexed gaps
Diagram Walkthrough
File Walkthrough
template_schema.py
Schema support for variable labelsGapsrc/schemas/template_schema.py
labelsGapschema from singlepositive_numbertooneOfallowingboth number and array
len(fieldLabels) - 1template.py
Implement variable gaps logic in field blocksrc/template.py
setup_field_blockcalculate_block_dimensionsto sum all gaps instead ofmultiplication
generate_bubble_gridto use indexed gaps from the list foreach label transition