posit-dev / great-tables

Make awesome display tables using Python.
https://posit-dev.github.io/great-tables/
MIT License
1.42k stars 48 forks source link

Feat gt show #379

Closed machow closed 2 weeks ago

machow commented 2 weeks ago

This PR addresses #100 by adding a GT.show() method, which does the following:

Fixes: #100

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 59.57447% with 19 lines in your changes missing coverage. Please review.

Project coverage is 86.52%. Comparing base (8167ad8) to head (6f9ce58).

Files Patch % Lines
great_tables/_export.py 57.77% 19 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #379 +/- ## ========================================== - Coverage 86.80% 86.52% -0.29% ========================================== Files 42 42 Lines 4548 4594 +46 ========================================== + Hits 3948 3975 +27 - Misses 600 619 +19 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

machow commented 2 weeks ago

One trick with this pull request is that we've tested paths up to running get_ipython(), and it's tricky testing the cases where (1) we display in ipython, or (2) some of the bits around serving the table in the browser.

We use .show() in our executed docs code, which helps as a kind of smoketest. So the codecov is low. I think hopefully we've gotten close enough to things with our tests, but we might need to either eat codecov being mad or mark some of the parts as deliberately untested in unit tests. 😓

rich-iannone commented 2 weeks ago

I’m generally in favor with marking parts that cannot be tested easily with comments signaling their omission from codecov consideration.