diff --git a/CHANGELOG.md b/CHANGELOG.md index 821e10d9f..a14c4c3af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ -## 0.10.15 +## 0.10.16-dev0 +### Enhancements + +### Features + +### Fixes + +## 0.10.15 ### Enhancements diff --git a/example-docs/fake.odt b/example-docs/fake.odt index 905049972..411a785b5 100644 Binary files a/example-docs/fake.odt and b/example-docs/fake.odt differ diff --git a/test_unstructured/partition/odt/test_odt.py b/test_unstructured/partition/odt/test_odt.py index 2747f9b43..9fe9b4b99 100644 --- a/test_unstructured/partition/odt/test_odt.py +++ b/test_unstructured/partition/odt/test_odt.py @@ -2,7 +2,7 @@ import os import pathlib from unstructured.chunking.title import chunk_by_title -from unstructured.documents.elements import Title +from unstructured.documents.elements import Table, Title from unstructured.partition.json import partition_json from unstructured.partition.odt import partition_odt from unstructured.staging.base import elements_to_json @@ -14,7 +14,16 @@ EXAMPLE_DOCS_DIRECTORY = os.path.join(DIRECTORY, "..", "..", "..", "example-docs def test_partition_odt_from_filename(): filename = os.path.join(EXAMPLE_DOCS_DIRECTORY, "fake.odt") elements = partition_odt(filename=filename) - assert elements == [Title("Lorem ipsum dolor sit amet.")] + assert elements == [ + Title("Lorem ipsum dolor sit amet."), + Table( + text="\nHeader row Mon Wed" + " Fri\nColor Blue" + " Red Green\nTime 1pm" + " 2pm 3pm\nLeader " + "Sarah Mark Ryan", + ), + ] for element in elements: assert element.metadata.filename == "fake.odt" @@ -29,8 +38,16 @@ def test_partition_odt_from_file(): filename = os.path.join(EXAMPLE_DOCS_DIRECTORY, "fake.odt") with open(filename, "rb") as f: elements = partition_odt(file=f) - - assert elements == [Title("Lorem ipsum dolor sit amet.")] + assert elements == [ + Title("Lorem ipsum dolor sit amet."), + Table( + text="\nHeader row Mon Wed" + " Fri\nColor Blue" + " Red Green\nTime 1pm" + " 2pm 3pm\nLeader " + "Sarah Mark Ryan", + ), + ] def test_partition_odt_from_file_with_metadata_filename(): diff --git a/test_unstructured/partition/test_auto.py b/test_unstructured/partition/test_auto.py index 9137f2ae4..4b1d7cb2c 100644 --- a/test_unstructured/partition/test_auto.py +++ b/test_unstructured/partition/test_auto.py @@ -554,7 +554,7 @@ def test_auto_partition_works_with_unstructured_jsons_from_file(): def test_auto_partition_odt_from_filename(): filename = os.path.join(EXAMPLE_DOCS_DIRECTORY, "fake.odt") elements = partition(filename=filename, strategy="hi_res") - assert elements == [Title("Lorem ipsum dolor sit amet.")] + assert elements[0] == Title("Lorem ipsum dolor sit amet.") def test_auto_partition_odt_from_file(): @@ -562,7 +562,7 @@ def test_auto_partition_odt_from_file(): with open(filename, "rb") as f: elements = partition(file=f, strategy="hi_res") - assert elements == [Title("Lorem ipsum dolor sit amet.")] + assert elements[0] == Title("Lorem ipsum dolor sit amet.") @pytest.mark.parametrize( diff --git a/unstructured/__version__.py b/unstructured/__version__.py index ce219a9bf..9048b6de1 100644 --- a/unstructured/__version__.py +++ b/unstructured/__version__.py @@ -1 +1 @@ -__version__ = "0.10.15" # pragma: no cover +__version__ = "0.10.16-dev0" # pragma: no cover