Skip to content

Commit

Permalink
Merge pull request #156 from jstockwin/release-0.7.0
Browse files Browse the repository at this point in the history
[release] v0.7.0
  • Loading branch information
jstockwin authored Jan 15, 2021
2 parents fcb0c5c + 35bf1bb commit 4725b55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.7.0] - 2021-01-15
### Changed
- Ensure we only accept LTTextBoxes at the top level (not LTTextLines) ([#155](https://github.com/jstockwin/py-pdf-parser/pull/155))
## [0.6.0] - 2020-12-11
Expand Down
8 changes: 4 additions & 4 deletions py_pdf_parser/visualise/sections.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import TYPE_CHECKING, Optional, List, Tuple, Dict

from pyvoronoi import Pyvoronoi
import pyvoronoi
from shapely import geometry, ops
from matplotlib import cm

Expand Down Expand Up @@ -47,7 +47,7 @@ class SectionVisualiser:
all_elements: List["PDFElement"]
document: "PDFDocument"
page: "PDFPage"
pv: Optional["Pyvoronoi"]
pv: Optional["pyvoronoi.Pyvoronoi"]
pv_segments: Optional[List]

__ax: "Axes"
Expand Down Expand Up @@ -212,7 +212,7 @@ def __plot_section(self, section: "Section"):

self.__plot_edges(to_plot, edges, vertices, label=section.unique_name)

def __get_voronoi(self) -> Tuple[Pyvoronoi, List]:
def __get_voronoi(self) -> Tuple[pyvoronoi.Pyvoronoi, List]:
all_segments = self.__get_segments_for_elements(self.all_elements)
# Add the page boundary as segments:
all_segments += [
Expand All @@ -222,7 +222,7 @@ def __get_voronoi(self) -> Tuple[Pyvoronoi, List]:
[(self.page.width, 0), (self.page.width, self.page.height)],
]

pv = Pyvoronoi(10)
pv = pyvoronoi.Pyvoronoi(10)
for segment in all_segments:
pv.AddSegment(segment)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
name="py-pdf-parser",
packages=find_packages(),
exclude=["tests.*", "tests", "docs", "docs.*"],
version="0.6.0",
version="0.7.0",
url="https://github.com/jstockwin/py-pdf-parser",
license="BSD",
description="A tool to help extracting information from structured PDFs.",
Expand Down

0 comments on commit 4725b55

Please sign in to comment.