camelot icon indicating copy to clipboard operation
camelot copied to clipboard

Update stream.py

Open CartierPierre opened this issue 6 years ago • 7 comments

Make the stream grouping row recursively, not only 2 by 2

CartierPierre avatar Apr 25 '19 09:04 CartierPierre

@CartierPierre The change you made is failing a test, can you look into it? And is there an issue associated with this PR?

vinayak-mehta avatar May 27 '19 17:05 vinayak-mehta

I just changed a tab ... It'm not a github expert yet, I don't know how to pass the test

CartierPierre avatar May 28 '19 07:05 CartierPierre

It's easy :) most of the tests in here are checking if the actual table extracted from a PDF is the same as the expected table. Your change fails test_stream_columns test because the the output after the change isn't matching the expected output.

The fix for this would be to check if the actual output that you're getting from your change, on your local machine, is in fact better/more correct than the current expected output. And then change the expected output in the file above, if that's the case.

vinayak-mehta avatar May 28 '19 07:05 vinayak-mehta

I was able to find the failing test by clicking on the Details link on the Travis check.

vinayak-mehta avatar May 28 '19 07:05 vinayak-mehta

Also, what do you mean by making stream row grouping recursive and not 2 by 2? Is there an issue associated with this?

vinayak-mehta avatar May 28 '19 07:05 vinayak-mehta

Before the fix, if the file is like :

Line1
Line2
Line3

Line4

The output was :

Line1\nLine2
Line3
Line4

But the expected output was :

Line1\nLine2\Line3
Line4

CartierPierre avatar May 28 '19 07:05 CartierPierre

Cool, I'll look into and and see if the test needs fixing.

vinayak-mehta avatar May 28 '19 16:05 vinayak-mehta