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

Switch to content based comparison #854

Merged
merged 6 commits into from Jun 4, 2020

Commits on May 20, 2020

  1. Add missing reference PDFs

    Just hope things are working as expected on my machine.
    
    Signed-off-by: Stephen Finucane <stephen@that.guru>
    stephenfin committed May 20, 2020
    Configuration menu
    Copy the full SHA
    238d739 View commit details
    Browse the repository at this point in the history
  2. Resolve issues with reference PDFs

    There are three issues to resolve here, one with an input file and two
    with reference PDFs.
    
    rst2pdf/tests/input/test_issue_175.txt
      This attempts to insert a large enough spacer to force a header to the
      bottom of the first page and the text onto the next page, in order to
      ensure the header will be moved to the next page to group it with its
      text. However, the spacer wasn't large enough and led to both the
      header and text being included on the first page.
    
    rst2pdf/tests/reference/test_aafigure.pdf
      It doesn't appear possible to format a backtick as a literal without
      including the escape character. The escape character wasn't included
      in the reference PDF.
    
    rst2pdf/tests/reference/test_issue_288.pdf
      This contained a different number of block elements on Python 3 than
      on Python 2. Update the PDF but disable the build until Python 2 is
      dropped.
    
    Signed-off-by: Stephen Finucane <stephen@that.guru>
    stephenfin committed May 20, 2020
    Configuration menu
    Copy the full SHA
    b6430ed View commit details
    Browse the repository at this point in the history
  3. Start using pymupdf to compare PDFs

    Previously, we were assessing whether a PDF was correct by comparing a
    checksum of the file against a list of known valid checksums. When a
    different checksum was seen, which was quite often given the amount of
    moving pieces here, it was up to the user to determine whether there was
    a bug or simply a small but valid change in the output PDF. Let's
    simplify this. Instead of storing checksums, use the pymupdf library to
    compare the PDFs programmatically. We need to use a bit of fuzzing here,
    since blocks can get moved around and text rewrapped, but it should be
    mostly bullet proof otherwise.
    
    Signed-off-by: Stephen Finucane <stephen@that.guru>
    stephenfin committed May 20, 2020
    Configuration menu
    Copy the full SHA
    9558647 View commit details
    Browse the repository at this point in the history
  4. Resolve issues with various Sphinx tests

    Resolve issues with the Sphinx tests.
    
    Signed-off-by: Stephen Finucane <stephen@that.guru>
    stephenfin committed May 20, 2020
    Configuration menu
    Copy the full SHA
    4a795de View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2020

  1. travis: Drop testing of Python 2.7

    It seems there are issues with the Python 2.7 wheels for PyMuPDF [1]. We
    could wait for a fix, but given the next version of rst2pdf is expected
    to be Python 3 only it's as easy to just drop testing for this now.
    
    [1] pymupdf/PyMuPDF#511
    
    Signed-off-by: Stephen Finucane <stephen@that.guru>
    stephenfin committed Jun 2, 2020
    Configuration menu
    Copy the full SHA
    e152e1f View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2020

  1. Update CHANGES for rst2pdf#854

    akrabat committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    e2debb4 View commit details
    Browse the repository at this point in the history