feat/add deprecation warning to all embed code (#3614)

### Description
Related PR to move the code over:
https://github.com/Unstructured-IO/unstructured-ingest/pull/92

Also removed the console script that exposes ingest.
This commit is contained in:
Roman Isecke 2024-09-10 19:48:39 -04:00 committed by GitHub
parent e9690b2738
commit ebf16055d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 26 additions and 4 deletions

View File

@ -1,3 +1,10 @@
## 0.15.11
### Enhancements
* **Add deprecation warning to embed code**
* **Remove ingest console script**
## 0.15.10
### Enhancements
@ -5,6 +12,7 @@
* **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

View File

@ -102,9 +102,6 @@ setup(
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

View File

@ -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

View File

@ -1 +1 @@
__version__ = "0.15.10" # pragma: no cover
__version__ = "0.15.11" # pragma: no cover

View File

@ -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.

View File

@ -1,3 +1,5 @@
import warnings
from unstructured.embed.bedrock import BedrockEmbeddingEncoder
from unstructured.embed.huggingface import HuggingFaceEmbeddingEncoder
from unstructured.embed.mixedbreadai import MixedbreadAIEmbeddingEncoder
@ -15,3 +17,11 @@ EMBEDDING_PROVIDER_TO_CLASS_MAP = {
"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,
)