Skip to content

test: verify layout placements against rendered artifacts - #53

Merged
dzhalaevd merged 1 commit into
mainfrom
issue-23
Sep 16, 2026
Merged

dzhalaevd merged 1 commit into
mainfrom
issue-23

Conversation

@dzhalaevd

@dzhalaevd dzhalaevd commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

Added a contract test ensuring compiled placements match rendered XLSX artifacts across ordinary, grouped, and matrix blocks

Related issue

Closes #23

Summary by CodeRabbit

  • Tests
    • Expanded spreadsheet export coverage across supported rendering backends.
    • Added validation for table and matrix layouts, including grouped fields, merged cells, calculated values, anchors, and used ranges.
    • Confirmed that rendered spreadsheets accurately reflect their defined layout blocks and merged-cell structure.

@dzhalaevd dzhalaevd self-assigned this Sep 16, 2026
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: df130cd9-2404-4ccc-b815-b43a42fb7d3a

📥 Commits

Reviewing files that changed from the base of the PR and between b623ff4 and 5b22772.

📒 Files selected for processing (1)
  • tests/test_architecture_invariants.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The test suite adds a round-trip contract test for ordinary, grouped, and matrix blocks. The test runs with both xlsxwriter and openpyxl and compares layout anchors, used ranges, and merged ranges with rendered artifact metadata.

Changes

Artifact round-trip validation

Layer / File(s) Summary
Placement contract test
tests/test_architecture_invariants.py
Imports field and matrix. Adds a parametrized test that compares layout block ranges and anchors with rendered artifact metadata for both backends. It also validates merged ranges for ordinary, grouped, and matrix blocks.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 5b227

The change adds round-trip placement coverage without a demonstrated correctness or runtime regression. It is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: a test that verifies layout placements against rendered artifacts.
Description check ✅ Passed The description includes the required Summary and Related issue sections. It explains the contract test scope and links issue #23 for closure.
Linked Issues check ✅ Passed The added parametrized test test_placements_match_rendered_artifact in tests/test_architecture_invariants.py covers ordinary, grouped, and matrix blocks. It renders with both xlsxwriter and `ope…
Out of Scope Changes check ✅ Passed The pull request changes only the architecture-invariant test module. The added field and matrix imports support the new contract test. No unrelated production behavior or unrelated test behavior …
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-23

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.29%. Comparing base (b623ff4) to head (5b22772).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   89.27%   89.29%   +0.01%     
==========================================
  Files         121      121              
  Lines        7564     7564              
  Branches      995      995              
==========================================
+ Hits         6753     6754       +1     
+ Misses        548      547       -1     
  Partials      263      263              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dzhalaevd
dzhalaevd merged commit 80d6847 into main Sep 16, 2026
36 of 43 checks passed
@dzhalaevd
dzhalaevd deleted the issue-23 branch September 16, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add a compiler artifact round-trip contract test

1 participant