chore: import upstream snapshot with attribution
CI / lint (3.11) (push) Has been cancelled
CI / lint (3.12) (push) Has been cancelled
CI / lint (3.13) (push) Has been cancelled
CI / shellcheck (push) Has been cancelled
CI / shfmt (push) Has been cancelled
CI / setup (3.11) (push) Has been cancelled
CI / setup (3.12) (push) Has been cancelled
CI / setup (3.13) (push) Has been cancelled
CI / check-licenses (3.12) (push) Has been cancelled
CI / test_unit (3.11) (push) Has been cancelled
CI / test_unit (3.12) (push) Has been cancelled
CI / test_unit (3.13) (push) Has been cancelled
CI / test_unit_no_extras (3.11) (push) Has been cancelled
CI / test_unit_no_extras (3.12) (push) Has been cancelled
CI / test_json_to_html (3.12) (push) Has been cancelled
CI / test_unit_no_extras (3.13) (push) Has been cancelled
CI / test_unit_dependency_extras (csv, 3.12, --extra csv) (push) Has been cancelled
CI / test_unit_dependency_extras (xlsx, 3.11, --extra xlsx) (push) Has been cancelled
CI / test_unit_dependency_extras (xlsx, 3.12, --extra xlsx) (push) Has been cancelled
CI / test_unit_dependency_extras (csv, 3.11, --extra csv) (push) Has been cancelled
CI / test_unit_dependency_extras (csv, 3.13, --extra csv) (push) Has been cancelled
CI / test_unit_dependency_extras (docx, 3.11, --extra docx) (push) Has been cancelled
CI / test_unit_dependency_extras (docx, 3.12, --extra docx) (push) Has been cancelled
CI / test_unit_dependency_extras (docx, 3.13, --extra docx) (push) Has been cancelled
CI / test_unit_dependency_extras (markdown, 3.11, --extra md) (push) Has been cancelled
CI / test_unit_dependency_extras (markdown, 3.12, --extra md) (push) Has been cancelled
CI / test_unit_dependency_extras (markdown, 3.13, --extra md) (push) Has been cancelled
CI / test_unit_dependency_extras (odt, 3.11, --extra odt) (push) Has been cancelled
CI / test_unit_dependency_extras (odt, 3.12, --extra odt) (push) Has been cancelled
CI / test_unit_dependency_extras (odt, 3.13, --extra odt) (push) Has been cancelled
CI / test_unit_dependency_extras (pdf-image, 3.11, --extra pdf --extra image --extra paddleocr) (push) Has been cancelled
CI / test_unit_dependency_extras (pdf-image, 3.12, --extra pdf --extra image --extra paddleocr) (push) Has been cancelled
CI / test_unit_dependency_extras (pdf-image, 3.13, --extra pdf --extra image --extra paddleocr) (push) Has been cancelled
CI / test_unit_dependency_extras (pptx, 3.11, --extra pptx) (push) Has been cancelled
CI / test_unit_dependency_extras (pptx, 3.12, --extra pptx) (push) Has been cancelled
CI / test_unit_dependency_extras (pptx, 3.13, --extra pptx) (push) Has been cancelled
CI / test_unit_dependency_extras (pypandoc, 3.11, --extra epub --extra org --extra rtf --extra rst) (push) Has been cancelled
CI / test_unit_dependency_extras (pypandoc, 3.12, --extra epub --extra org --extra rtf --extra rst) (push) Has been cancelled
CI / test_unit_dependency_extras (pypandoc, 3.13, --extra epub --extra org --extra rtf --extra rst) (push) Has been cancelled
Build And Push Docker Image / set-short-sha (push) Has been cancelled
Partition Benchmark / setup (push) Has been cancelled
Partition Benchmark / Measure and compare partition() runtime (push) Has been cancelled
CI / test_unit_dependency_extras (xlsx, 3.13, --extra xlsx) (push) Has been cancelled
CI / test_ingest_src (3.12) (push) Has been cancelled
CI / test_json_to_markdown (3.12) (push) Has been cancelled
CI / changelog (push) Has been cancelled
CI / test_dockerfile (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Build And Push Docker Image / build-images (linux/amd64, opensource-linux-8core) (push) Has been cancelled
Build And Push Docker Image / build-images (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Build And Push Docker Image / publish-images (push) Has been cancelled
CI / lint (3.11) (push) Has been cancelled
CI / lint (3.12) (push) Has been cancelled
CI / lint (3.13) (push) Has been cancelled
CI / shellcheck (push) Has been cancelled
CI / shfmt (push) Has been cancelled
CI / setup (3.11) (push) Has been cancelled
CI / setup (3.12) (push) Has been cancelled
CI / setup (3.13) (push) Has been cancelled
CI / check-licenses (3.12) (push) Has been cancelled
CI / test_unit (3.11) (push) Has been cancelled
CI / test_unit (3.12) (push) Has been cancelled
CI / test_unit (3.13) (push) Has been cancelled
CI / test_unit_no_extras (3.11) (push) Has been cancelled
CI / test_unit_no_extras (3.12) (push) Has been cancelled
CI / test_json_to_html (3.12) (push) Has been cancelled
CI / test_unit_no_extras (3.13) (push) Has been cancelled
CI / test_unit_dependency_extras (csv, 3.12, --extra csv) (push) Has been cancelled
CI / test_unit_dependency_extras (xlsx, 3.11, --extra xlsx) (push) Has been cancelled
CI / test_unit_dependency_extras (xlsx, 3.12, --extra xlsx) (push) Has been cancelled
CI / test_unit_dependency_extras (csv, 3.11, --extra csv) (push) Has been cancelled
CI / test_unit_dependency_extras (csv, 3.13, --extra csv) (push) Has been cancelled
CI / test_unit_dependency_extras (docx, 3.11, --extra docx) (push) Has been cancelled
CI / test_unit_dependency_extras (docx, 3.12, --extra docx) (push) Has been cancelled
CI / test_unit_dependency_extras (docx, 3.13, --extra docx) (push) Has been cancelled
CI / test_unit_dependency_extras (markdown, 3.11, --extra md) (push) Has been cancelled
CI / test_unit_dependency_extras (markdown, 3.12, --extra md) (push) Has been cancelled
CI / test_unit_dependency_extras (markdown, 3.13, --extra md) (push) Has been cancelled
CI / test_unit_dependency_extras (odt, 3.11, --extra odt) (push) Has been cancelled
CI / test_unit_dependency_extras (odt, 3.12, --extra odt) (push) Has been cancelled
CI / test_unit_dependency_extras (odt, 3.13, --extra odt) (push) Has been cancelled
CI / test_unit_dependency_extras (pdf-image, 3.11, --extra pdf --extra image --extra paddleocr) (push) Has been cancelled
CI / test_unit_dependency_extras (pdf-image, 3.12, --extra pdf --extra image --extra paddleocr) (push) Has been cancelled
CI / test_unit_dependency_extras (pdf-image, 3.13, --extra pdf --extra image --extra paddleocr) (push) Has been cancelled
CI / test_unit_dependency_extras (pptx, 3.11, --extra pptx) (push) Has been cancelled
CI / test_unit_dependency_extras (pptx, 3.12, --extra pptx) (push) Has been cancelled
CI / test_unit_dependency_extras (pptx, 3.13, --extra pptx) (push) Has been cancelled
CI / test_unit_dependency_extras (pypandoc, 3.11, --extra epub --extra org --extra rtf --extra rst) (push) Has been cancelled
CI / test_unit_dependency_extras (pypandoc, 3.12, --extra epub --extra org --extra rtf --extra rst) (push) Has been cancelled
CI / test_unit_dependency_extras (pypandoc, 3.13, --extra epub --extra org --extra rtf --extra rst) (push) Has been cancelled
Build And Push Docker Image / set-short-sha (push) Has been cancelled
Partition Benchmark / setup (push) Has been cancelled
Partition Benchmark / Measure and compare partition() runtime (push) Has been cancelled
CI / test_unit_dependency_extras (xlsx, 3.13, --extra xlsx) (push) Has been cancelled
CI / test_ingest_src (3.12) (push) Has been cancelled
CI / test_json_to_markdown (3.12) (push) Has been cancelled
CI / changelog (push) Has been cancelled
CI / test_dockerfile (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Build And Push Docker Image / build-images (linux/amd64, opensource-linux-8core) (push) Has been cancelled
Build And Push Docker Image / build-images (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Build And Push Docker Image / publish-images (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
CREATE EXTENSION vector;
|
||||
|
||||
CREATE TABLE elements (
|
||||
id UUID PRIMARY KEY,
|
||||
element_id VARCHAR,
|
||||
text TEXT,
|
||||
embeddings vector(384),
|
||||
type VARCHAR,
|
||||
system VARCHAR,
|
||||
layout_width DECIMAL,
|
||||
layout_height DECIMAL,
|
||||
points TEXT,
|
||||
url TEXT,
|
||||
version VARCHAR,
|
||||
date_created TIMESTAMPTZ,
|
||||
date_modified TIMESTAMPTZ,
|
||||
date_processed TIMESTAMPTZ,
|
||||
permissions_data TEXT,
|
||||
record_locator TEXT,
|
||||
category_depth INTEGER,
|
||||
parent_id VARCHAR,
|
||||
attached_filename VARCHAR,
|
||||
filetype VARCHAR,
|
||||
last_modified TIMESTAMPTZ,
|
||||
file_directory VARCHAR,
|
||||
filename VARCHAR,
|
||||
languages VARCHAR [],
|
||||
page_number VARCHAR,
|
||||
links TEXT,
|
||||
page_name VARCHAR,
|
||||
link_urls VARCHAR [],
|
||||
link_texts VARCHAR [],
|
||||
sent_from VARCHAR [],
|
||||
sent_to VARCHAR [],
|
||||
subject VARCHAR,
|
||||
section VARCHAR,
|
||||
header_footer_type VARCHAR,
|
||||
emphasized_text_contents VARCHAR [],
|
||||
emphasized_text_tags VARCHAR [],
|
||||
text_as_html TEXT,
|
||||
detection_class_prob DECIMAL
|
||||
);
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
||||
DATABASE_NAME=$1
|
||||
DATABASE_FILE_PATH=$2
|
||||
|
||||
# Create the SQL instance
|
||||
if [[ "$DATABASE_NAME" != "sqlite" ]]; then
|
||||
docker compose version
|
||||
docker compose -f "$SCRIPT_DIR"/docker-compose-"$DATABASE_NAME".yaml up --wait
|
||||
docker compose -f "$SCRIPT_DIR"/docker-compose-"$DATABASE_NAME".yaml ps
|
||||
else
|
||||
touch "$DATABASE_FILE_PATH"
|
||||
|
||||
python "$SCRIPT_DIR"/create-sqlite-schema.py "$DATABASE_FILE_PATH"
|
||||
fi
|
||||
|
||||
echo "$DATABASE_NAME instance is live."
|
||||
@@ -0,0 +1,14 @@
|
||||
import sqlite3
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
if __name__ == "__main__":
|
||||
connection = sqlite3.connect(database=sys.argv[1])
|
||||
|
||||
query = None
|
||||
script_path = (Path(__file__).parent / Path("create-sqlite-schema.sql")).resolve()
|
||||
with open(script_path) as f:
|
||||
query = f.read()
|
||||
cursor = connection.cursor()
|
||||
cursor.executescript(query)
|
||||
connection.close()
|
||||
@@ -0,0 +1,40 @@
|
||||
CREATE TABLE elements (
|
||||
id TEXT PRIMARY KEY,
|
||||
element_id TEXT,
|
||||
text TEXT,
|
||||
embeddings TEXT,
|
||||
type TEXT,
|
||||
system TEXT,
|
||||
layout_width REAL,
|
||||
layout_height REAL,
|
||||
points TEXT,
|
||||
url TEXT,
|
||||
version TEXT,
|
||||
date_created TEXT,
|
||||
date_modified TEXT,
|
||||
date_processed TEXT,
|
||||
permissions_data TEXT,
|
||||
record_locator TEXT,
|
||||
category_depth INTEGER,
|
||||
parent_id TEXT,
|
||||
attached_filename TEXT,
|
||||
filetype TEXT,
|
||||
last_modified TEXT,
|
||||
file_directory TEXT,
|
||||
filename TEXT,
|
||||
languages TEXT,
|
||||
page_number TEXT,
|
||||
links TEXT,
|
||||
page_name TEXT,
|
||||
link_urls TEXT,
|
||||
link_texts TEXT,
|
||||
sent_from TEXT,
|
||||
sent_to TEXT,
|
||||
subject TEXT,
|
||||
section TEXT,
|
||||
header_footer_type TEXT,
|
||||
emphasized_text_contents TEXT,
|
||||
emphasized_text_tags TEXT,
|
||||
text_as_html TEXT,
|
||||
detection_class_prob DECIMAL
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
pgvector:
|
||||
image: ankane/pgvector
|
||||
restart: always
|
||||
container_name: pgvector_dest
|
||||
ports:
|
||||
- 5433:5432
|
||||
environment:
|
||||
POSTGRES_DB: elements
|
||||
POSTGRES_USER: unstructured
|
||||
POSTGRES_PASSWORD: test
|
||||
volumes:
|
||||
- ./create-pgvector-schema.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
Reference in New Issue
Block a user