diff --git a/README.md b/README.md index ab022482..bbdc18af 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Dedoc +[![image](https://img.shields.io/pypi/pyversions/dedoc.svg)](https://pypi.python.org/pypi/dedoc) [![GitHub release](https://img.shields.io/github/release/ispras/dedoc.svg)](https://github.com/ispras/dedoc/releases/) [![PyPI version](https://badge.fury.io/py/dedoc.svg)](https://badge.fury.io/py/dedoc) [![PyPI downloads](https://pepy.tech/badge/dedoc)](https://pepy.tech/project/dedoc) diff --git a/VERSION b/VERSION index ecf00d90..1506473e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.5 \ No newline at end of file +2.2.6 \ No newline at end of file diff --git a/dedoc/readers/pdf_reader/pdf_image_reader/table_recognizer/table_utils/img_processing.py b/dedoc/readers/pdf_reader/pdf_image_reader/table_recognizer/table_utils/img_processing.py index 5671794c..f8cda475 100644 --- a/dedoc/readers/pdf_reader/pdf_image_reader/table_recognizer/table_utils/img_processing.py +++ b/dedoc/readers/pdf_reader/pdf_image_reader/table_recognizer/table_utils/img_processing.py @@ -117,7 +117,7 @@ def get_contours_cells(img: np.ndarray, table_type: str, *, config: dict) -> [An def __get_contours_for_table_wo_external_bounds(img: np.ndarray, img_with_contours: np.ndarray, contours: List, hierarchy: List, config: dict) -> [Any, Any]: # get children (get table counters) - contours = np.array(contours) + contours = np.array(contours, dtype=object) list_contours, table_contours = __get_table_contours(contours, hierarchy) filtered_cont_id = [] diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index dd5cfcbc..eb6c2437 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,6 +1,12 @@ Changelog ========= +v2.2.6 (2024-07-22) +------------------- +Release note: `v2.2.6 `_ + +* Upgrade dependencies: `numpy<2.0` and `dedoc-utils==0.3.7`. + v2.2.5 (2024-07-15) ------------------- Release note: `v2.2.5 `_ diff --git a/requirements.txt b/requirements.txt index 0f5d1b03..9ddd1350 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ beautifulsoup4>=4.10.0,<=4.12.2 charset-normalizer>=2.0.12,<=3.2.0 Cython>=0.29.28,<=3.0.2 -dedoc-utils==0.3.6 +dedoc-utils==0.3.7 fastapi>=0.77.0,<1.0 huggingface-hub>=0.14.1,<1.0 imutils==0.5.4 itsdangerous>=2.1.0,<=2.1.2 -numpy>=1.22.0,<=1.22.3 +numpy>=1.22.0,<2.0 olefile~=0.46 opencv-python>=4.5.5.64,<4.6.0 orjson>=3.8.11,<4.0 diff --git a/tests/api_tests/test_api_doctype_fintoc.py b/tests/api_tests/test_api_doctype_fintoc.py index 7a70ca56..8c6179b7 100644 --- a/tests/api_tests/test_api_doctype_fintoc.py +++ b/tests/api_tests/test_api_doctype_fintoc.py @@ -25,7 +25,7 @@ def test_article_en(self) -> None: def test_article_fr(self) -> None: file_name = "fintoc/prospectus_fr.pdf" - result = self._send_request(file_name, dict(document_type="fintoc", pdf_with_text_layer="true", language="fr")) + result = self._send_request(file_name, dict(document_type="fintoc", pdf_with_text_layer="true", language="fr", need_pdf_table_analysis="false")) tree = result["content"]["structure"] self._check_tree_sanity(tree) @@ -45,7 +45,7 @@ def test_article_fr(self) -> None: def test_article_sp(self) -> None: file_name = "fintoc/prospectus_sp.pdf" - result = self._send_request(file_name, dict(document_type="fintoc", pdf_with_text_layer="true", language="sp")) + result = self._send_request(file_name, dict(document_type="fintoc", pdf_with_text_layer="true", language="sp", need_pdf_table_analysis="false")) tree = result["content"]["structure"] self._check_tree_sanity(tree)