-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix/isolate ingest v2 dependencies (#3327)
### Description This PR handles two things: * Exposing all the connectors via the connector registries by simply importing the connector module. This should be safe assuming all connector specific dependencies themselves are imported in the methods where they are used and wrapped in `@requires_dependencies` decorator * Remove any import that pulls from the v2 ingest.cli package
- Loading branch information
Showing
23 changed files
with
271 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## 0.14.10-dev4 | ||
## 0.14.10-dev5 | ||
|
||
### Enhancements | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.14.10-dev4" # pragma: no cover | ||
__version__ = "0.14.10-dev5" # pragma: no cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,47 @@ | ||
from __future__ import annotations | ||
|
||
import unstructured.ingest.v2.processes.connectors.fsspec # noqa: F401 | ||
from unstructured.ingest.v2.processes.connector_registry import ( | ||
add_destination_entry, | ||
add_source_entry, | ||
) | ||
|
||
from .astra import CONNECTOR_TYPE as ASTRA_CONNECTOR_TYPE | ||
from .astra import astra_destination_entry | ||
from .chroma import CONNECTOR_TYPE as CHROMA_CONNECTOR_TYPE | ||
from .chroma import chroma_destination_entry | ||
from .elasticsearch import CONNECTOR_TYPE as ELASTICSEARCH_CONNECTOR_TYPE | ||
from .elasticsearch import elasticsearch_destination_entry, elasticsearch_source_entry | ||
from .google_drive import CONNECTOR_TYPE as GOOGLE_DRIVE_CONNECTOR_TYPE | ||
from .google_drive import google_drive_source_entry | ||
from .local import CONNECTOR_TYPE as LOCAL_CONNECTOR_TYPE | ||
from .local import local_destination_entry, local_source_entry | ||
from .onedrive import CONNECTOR_TYPE as ONEDRIVE_CONNECTOR_TYPE | ||
from .onedrive import onedrive_source_entry | ||
from .opensearch import CONNECTOR_TYPE as OPENSEARCH_CONNECTOR_TYPE | ||
from .opensearch import opensearch_destination_entry, opensearch_source_entry | ||
from .weaviate import CONNECTOR_TYPE as WEAVIATE_CONNECTOR_TYPE | ||
from .weaviate import weaviate_destination_entry | ||
|
||
add_destination_entry(destination_type=ASTRA_CONNECTOR_TYPE, entry=astra_destination_entry) | ||
|
||
add_destination_entry(destination_type=CHROMA_CONNECTOR_TYPE, entry=chroma_destination_entry) | ||
|
||
add_source_entry(source_type=ELASTICSEARCH_CONNECTOR_TYPE, entry=elasticsearch_source_entry) | ||
add_destination_entry( | ||
destination_type=ELASTICSEARCH_CONNECTOR_TYPE, entry=elasticsearch_destination_entry | ||
) | ||
|
||
add_source_entry(source_type=GOOGLE_DRIVE_CONNECTOR_TYPE, entry=google_drive_source_entry) | ||
|
||
add_source_entry(source_type=LOCAL_CONNECTOR_TYPE, entry=local_source_entry) | ||
add_destination_entry(destination_type=LOCAL_CONNECTOR_TYPE, entry=local_destination_entry) | ||
|
||
add_source_entry(source_type=ONEDRIVE_CONNECTOR_TYPE, entry=onedrive_source_entry) | ||
|
||
add_source_entry(source_type=OPENSEARCH_CONNECTOR_TYPE, entry=opensearch_source_entry) | ||
add_destination_entry( | ||
destination_type=OPENSEARCH_CONNECTOR_TYPE, entry=opensearch_destination_entry | ||
) | ||
|
||
add_destination_entry(destination_type=WEAVIATE_CONNECTOR_TYPE, entry=weaviate_destination_entry) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
unstructured/ingest/v2/processes/connectors/fsspec/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
from __future__ import annotations | ||
|
||
from unstructured.ingest.v2.processes.connector_registry import ( | ||
add_destination_entry, | ||
add_source_entry, | ||
) | ||
|
||
from .azure import CONNECTOR_TYPE as AZURE_CONNECTOR_TYPE | ||
from .azure import azure_destination_entry, azure_source_entry | ||
from .box import CONNECTOR_TYPE as BOX_CONNECTOR_TYPE | ||
from .box import box_destination_entry, box_source_entry | ||
from .dropbox import CONNECTOR_TYPE as DROPBOX_CONNECTOR_TYPE | ||
from .dropbox import dropbox_destination_entry, dropbox_source_entry | ||
from .gcs import CONNECTOR_TYPE as GCS_CONNECTOR_TYPE | ||
from .gcs import gcs_destination_entry, gcs_source_entry | ||
from .s3 import CONNECTOR_TYPE as S3_CONNECTOR_TYPE | ||
from .s3 import s3_destination_entry, s3_source_entry | ||
from .sftp import CONNECTOR_TYPE as SFTP_CONNECTOR_TYPE | ||
from .sftp import sftp_destination_entry, sftp_source_entry | ||
|
||
add_source_entry(source_type=AZURE_CONNECTOR_TYPE, entry=azure_source_entry) | ||
add_destination_entry(destination_type=AZURE_CONNECTOR_TYPE, entry=azure_destination_entry) | ||
|
||
add_source_entry(source_type=BOX_CONNECTOR_TYPE, entry=box_source_entry) | ||
add_destination_entry(destination_type=BOX_CONNECTOR_TYPE, entry=box_destination_entry) | ||
|
||
add_source_entry(source_type=DROPBOX_CONNECTOR_TYPE, entry=dropbox_source_entry) | ||
add_destination_entry(destination_type=DROPBOX_CONNECTOR_TYPE, entry=dropbox_destination_entry) | ||
|
||
add_source_entry(source_type=GCS_CONNECTOR_TYPE, entry=gcs_source_entry) | ||
add_destination_entry(destination_type=GCS_CONNECTOR_TYPE, entry=gcs_destination_entry) | ||
|
||
add_source_entry(source_type=S3_CONNECTOR_TYPE, entry=s3_source_entry) | ||
add_destination_entry(destination_type=S3_CONNECTOR_TYPE, entry=s3_destination_entry) | ||
|
||
add_source_entry(source_type=SFTP_CONNECTOR_TYPE, entry=sftp_source_entry) | ||
add_destination_entry(destination_type=SFTP_CONNECTOR_TYPE, entry=sftp_destination_entry) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.