-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GT.write_html()
as a helper function for easier HTML output
#485
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #485 +/- ##
==========================================
+ Coverage 88.88% 88.89% +0.01%
==========================================
Files 44 44
Lines 5216 5225 +9
==========================================
+ Hits 4636 4645 +9
Misses 580 580 ☔ View full report in Codecov by Sentry. |
I've found that utilizing the parameters of |
Thanks for this @jrycw -- @rich-iannone and I are pairing on this right now, and thinking about the use of both We noticed that polars Basically, it seems like there are 3 possible approaches:
Would love to get your input! |
Hello team, I’m inclined to go with the first option as the higher-level abstraction while retaining Here’s my draft implementation below. |
To issue a deprecation message to users, we could take a similar approach to what Polars uses. We might consider decorating class GT(GTData):
...
as_raw_html = deprecate_function("Use `GT.write_html()` instead.", version="0.15.0")(as_raw_html)
write_html = write_html This method avoids directly decorating |
Hello team,
I've noticed that some users expect an easier way to interact with our tables. While
GT.as_raw_html()
is great, it doesn’t fully meet those expectations. To address this, I’d like to propose addingGT.write_html()
as a helper function, simplifying the process of writing the table’s HTML directly to a file without needing to useopen()
.I believe this is a useful addition, and if necessary, we could even rename it to
GT._write_html()
for unofficial use.