Skip to content
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

Feat gt show #379

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Feat gt show #379

merged 2 commits into from
Jun 18, 2024

Conversation

machow
Copy link
Collaborator

@machow machow commented Jun 17, 2024

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

  • notebook-like environment: display table in cell output
  • repl environment (e.g. ipython shell, python repl): open a browser with table

Fixes: #100

Copy link

codecov bot commented Jun 17, 2024

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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@machow
Copy link
Collaborator Author

machow commented Jun 17, 2024

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. 😓

Copy link
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rich-iannone
Copy link
Member

rich-iannone commented Jun 17, 2024

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

@machow machow merged commit 813f3f3 into main Jun 18, 2024
11 of 13 checks passed
@rich-iannone rich-iannone deleted the feat-gt-show branch June 18, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return browsable gt object in Python repl
2 participants