feat: wrapped tables#9
Conversation
There was a problem hiding this comment.
The body rows and header rows perhaps could be cached properties and extracted only when called. Or alternatively, populated in __post_init__ (calling some of the private helper functions extracting rows from documentai.Table).
There was a problem hiding this comment.
what would be the benefit of populating it in __post_init__
There was a problem hiding this comment.
The code for populating lines, paragraphs, and tables could go into post_init, since then the user could also instantiate a wrapped_page by just passing in a documentai_page message (useful when we support in-memory documents).
There was a problem hiding this comment.
I don't believe we can support both, since populating the things in post_init would require me to remove them from init. Also there would be no difference between from_documentai_page and using DocumentWrapper()

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕
BEGIN_COMMIT_OVERRIDE
chore: wrapped tables
END_COMMIT_OVERRIDE