-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement sqlite version of sql indexer and downloader * add integration test for sqlite source connector * Drop ids from copied filedata * migrate env setup over to integration test folder * add postgres source connector with tests * bump changelog
- Loading branch information
Showing
105 changed files
with
2,303 additions
and
29 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
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ pytest-mock | |
unstructured | ||
pytest-asyncio | ||
pytest_tagging | ||
faker | ||
|
||
# Connector specific deps | ||
cryptography | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
test/integration/connectors/env_setup/sql/postgres/source/docker-compose.yaml
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
services: | ||
pgvector: | ||
image: postgres | ||
restart: always | ||
container_name: postgres_src | ||
ports: | ||
- 5433:5432 | ||
environment: | ||
POSTGRES_DB: test_db | ||
POSTGRES_USER: unstructured | ||
POSTGRES_PASSWORD: test | ||
volumes: | ||
- ./postgres-schema.sql:/docker-entrypoint-initdb.d/init.sql | ||
healthcheck: | ||
test: [ "CMD-SHELL", "pg_isready", "-d", "test_db", "-U", "unstructured"] | ||
interval: 5s | ||
timeout: 60s | ||
retries: 5 | ||
start_period: 5s |
5 changes: 5 additions & 0 deletions
5
test/integration/connectors/env_setup/sql/postgres/source/postgres-schema.sql
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE cars ( | ||
car_id SERIAL PRIMARY KEY, | ||
brand TEXT NOT NULL, | ||
price INTEGER NOT NULL | ||
); |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
test/integration/connectors/env_setup/sql/sqlite/source/sqlite-schema.sql
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE cars ( | ||
car_id INTEGER PRIMARY KEY, | ||
brand TEXT NOT NULL, | ||
price INTEGER NOT NULL | ||
); |
44 changes: 44 additions & 0 deletions
44
test/integration/connectors/expected_results/postgres/directory_structure.json
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"directory_structure": [ | ||
"cars-1-5fb93ce5.csv", | ||
"cars-10-5fb93ce5.csv", | ||
"cars-11-5fb93ce5.csv", | ||
"cars-12-5fb93ce5.csv", | ||
"cars-13-5fb93ce5.csv", | ||
"cars-14-5fb93ce5.csv", | ||
"cars-15-5fb93ce5.csv", | ||
"cars-16-5fb93ce5.csv", | ||
"cars-17-5fb93ce5.csv", | ||
"cars-18-5fb93ce5.csv", | ||
"cars-19-5fb93ce5.csv", | ||
"cars-2-5fb93ce5.csv", | ||
"cars-20-5fb93ce5.csv", | ||
"cars-21-5fb93ce5.csv", | ||
"cars-22-5fb93ce5.csv", | ||
"cars-23-5fb93ce5.csv", | ||
"cars-24-5fb93ce5.csv", | ||
"cars-25-5fb93ce5.csv", | ||
"cars-26-5fb93ce5.csv", | ||
"cars-27-5fb93ce5.csv", | ||
"cars-28-5fb93ce5.csv", | ||
"cars-29-5fb93ce5.csv", | ||
"cars-3-5fb93ce5.csv", | ||
"cars-30-5fb93ce5.csv", | ||
"cars-31-5fb93ce5.csv", | ||
"cars-32-5fb93ce5.csv", | ||
"cars-33-5fb93ce5.csv", | ||
"cars-34-5fb93ce5.csv", | ||
"cars-35-5fb93ce5.csv", | ||
"cars-36-5fb93ce5.csv", | ||
"cars-37-5fb93ce5.csv", | ||
"cars-38-5fb93ce5.csv", | ||
"cars-39-5fb93ce5.csv", | ||
"cars-4-5fb93ce5.csv", | ||
"cars-40-5fb93ce5.csv", | ||
"cars-5-5fb93ce5.csv", | ||
"cars-6-5fb93ce5.csv", | ||
"cars-7-5fb93ce5.csv", | ||
"cars-8-5fb93ce5.csv", | ||
"cars-9-5fb93ce5.csv" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-1-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-1-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.358926", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-1-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-10-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-10-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.376682", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-10-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-11-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-11-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.388928", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-11-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-12-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-12-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.388928", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-12-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-13-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-13-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.388928", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-13-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-14-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-14-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.388928", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-14-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-15-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-15-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.388928", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-15-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-16-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-16-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.400699", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-16-5fb93ce5.csv" | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/connectors/expected_results/postgres/file_data/cars-17-5fb93ce5.json
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"identifier": "cars-17-5fb93ce5", | ||
"connector_type": "postgres", | ||
"source_identifiers": null, | ||
"doc_type": "file", | ||
"metadata": { | ||
"url": null, | ||
"version": null, | ||
"record_locator": null, | ||
"date_created": null, | ||
"date_modified": null, | ||
"date_processed": "1729522956.400699", | ||
"permissions_data": null, | ||
"filesize_bytes": null | ||
}, | ||
"additional_metadata": { | ||
"table_name": "cars", | ||
"id_column": "car_id" | ||
}, | ||
"reprocess": false, | ||
"local_download_path": "/private/var/folders/n8/rps3wl195pj4p_0vyxqj5jrw0000gn/T/tmpxvakfpd4/cars-17-5fb93ce5.csv" | ||
} |
Oops, something went wrong.