-
Notifications
You must be signed in to change notification settings - Fork 35
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
How to get formatting of 0.5.1 #90
Comments
Could you link the code that generates this table? It's rather hard to understand why this happens without some context 😅 |
I just tried to create a minimal reproducable project for this issue, but wasn't able to do so. I then updated comfy-table in the Here's my patch:
Running |
Thanks for the help. Note that there are no errors. The tables formatting does work, it only has changed. In the example above The tests that fail are the doctests on the python side. They check the output of docstring examples and are thus sensitive to formatting. This is terrible as it is a lot of work to update very method example. 😅 Do you know which settings influences this wrapping? Maybe I can fiddle around. |
Small syntactic sugar: Table now implements
-> `table.add_rows(rows); |
I just managed to reproduce it! Nice. |
Could you check whether the fixes in #92 fix your problem at hand? I actually found two formatting edge-cases while writing test. |
Ping @ritchie46 |
Thanks! And sorry for my delay. I tried the branch in #92, but still have different formatting: example:
|
Here is the updating PR: pola-rs/polars#5077 |
Thanks for sharing that MR. With that, I should be able to debug this until everything works as expected. Still. I don't see the error you posted above. That example works perfectly fine and also doesn't show up in the CI test failure. |
Yes, if we go to Here is an example of such a docstring with a hard-coded table: https://github.com/pola-rs/polars/blob/49898c62f27335cf8fe33f7081dad26ab02a38ec/py-polars/polars/internals/dataframe/frame.py#L2734 |
Thanks! |
I'm closing in on the issue. I'll try to get get the proptest test suite up and running before considering this as fixed. I don't like that this many issues managed to slip in, since I disabled the proptest suite (I had to temporarily do this because of #53) |
Found the issue. I introduced a bug when refactoring the content_width calculation for columns in 6.0. The issue has been fixed in b5f8e76 . As I said above, I'll still try to get the proptest suite up and running again and push a point release once I'm confident that everything's fine. The py-polars python test-suite now seems to succeed with the latest branch head. |
That's great to hear! You have saved us many hours of work! 🙌 |
I just published a point release :) You should be good to go on that update. |
Can confirm it works. 🙏 |
We've tried updating comfytable in polars from 0.5.1 to 0.6.1 and only had to adapt a few method names, so that was great.
However the table formatting changed. This made all our doctests fail. Given that it is a huge undertaking to update all of them, I wonder if we can get the old formatting behavior.
An example of what we had:
And what we got after updating:
Any ideas?
The text was updated successfully, but these errors were encountered: