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

Implemented formatting of floats when printing Expressions #22

Conversation

kjartan-at-bravos
Copy link
Collaborator

Usage:

>>> x = Variable(pl.DataFrame({"t": [1,2]})
>>> y = 1.234 * x
>>> printy.to_str(float_format="%0.1f")
[1]: 1.2 x1
[2]: 1.2 x2

The most important use case is when comparing the string representation of Expressions with expected representations in unit tests.

@kjartan-at-bravos kjartan-at-bravos force-pushed the kh/to-str-with-float-format branch from cc0a0f9 to f013975 Compare April 10, 2024 13:10
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 73.17073% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 93.03%. Comparing base (235103b) to head (dcb2dac).

❗ Current head dcb2dac differs from pull request most recent head 0455a56. Consider uploading reports for the commit 0455a56 to get more accurate results

Files Patch % Lines
src/pyoframe/util.py 71.05% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   94.12%   93.03%   -1.10%     
==========================================
  Files          13       13              
  Lines         766      804      +38     
==========================================
+ Hits          721      748      +27     
- Misses         45       56      +11     
Flag Coverage Δ
smart-tests 93.03% <73.17%> (-1.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

1 participant