Skip to content

Commit

Permalink
feat/add deprecation warning to all embed code (#3614)
Browse files Browse the repository at this point in the history
### Description
Related PR to move the code over:
Unstructured-IO/unstructured-ingest#92

Also removed the console script that exposes ingest.
  • Loading branch information
rbiseck3 authored Sep 10, 2024
1 parent e9690b2 commit ebf1605
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
## 0.15.11

### Enhancements

* **Add deprecation warning to embed code**
* **Remove ingest console script**

## 0.15.10

### Enhancements

* **Enhance `pdfminer` element cleanup** Expand removal of `pdfminer` elements to include those inside all `non-pdfminer` elements, not just `tables`.
* **Modified analysis drawing tools to dump to files and draw from dumps** If the parameter `analysis` of the `partition_pdf` function is set to `True`, the layout for Object Detection, Pdfminer Extraction, OCR and final layouts will be dumped as json files. The drawers now accept dict (dump) objects instead of internal classes instances.
* **Vectorize pdfminer elements deduplication computation**. Use `numpy` operations to compute IOU and sub-region membership instead of using simply loop. This improves the speed of deduplicating elements for pages with a lot of elements.
* **Add deprecation warning to embed code**

### Features

Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ def load_requirements(file_list: Optional[Union[str, List[str]]] = None) -> List
license="Apache-2.0",
packages=find_packages(),
version=__version__,
entry_points={
"console_scripts": ["unstructured-ingest=unstructured.ingest.main:main"],
},
install_requires=load_requirements(),
extras_require={
# Document specific extra requirements
Expand Down
1 change: 1 addition & 0 deletions test_unstructured_ingest/test-ingest-src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ python_version=$(python --version 2>&1)
tests_to_ignore=(
'notion.sh'
'local-embed-mixedbreadai.sh'
'hubspot.sh'
)

for test in "${all_tests[@]}"; do
Expand Down
2 changes: 1 addition & 1 deletion unstructured/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.15.10" # pragma: no cover
__version__ = "0.15.11" # pragma: no cover
6 changes: 6 additions & 0 deletions unstructured/embed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Embed
![Project unmaintained](https://img.shields.io/badge/project-unmaintained-red.svg)

Project has been moved to: [Unstructured Ingest](https://github.com/Unstructured-IO/unstructured-ingest)

This python module will be removed from this repo in the near future.
10 changes: 10 additions & 0 deletions unstructured/embed/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from unstructured.embed.bedrock import BedrockEmbeddingEncoder
from unstructured.embed.huggingface import HuggingFaceEmbeddingEncoder
from unstructured.embed.mixedbreadai import MixedbreadAIEmbeddingEncoder
Expand All @@ -15,3 +17,11 @@
"mixedbread-ai": MixedbreadAIEmbeddingEncoder,
"octoai": OctoAIEmbeddingEncoder,
}


warnings.warn(
"unstructured.ingest will be removed in a future version. "
"Functionality moved to the unstructured-ingest project.",
DeprecationWarning,
stacklevel=2,
)

0 comments on commit ebf1605

Please sign in to comment.