Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Check if url is an HTTP URL #12

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
50cee3b
feat: Check if url is an HTTP URL
juancarlospaco Nov 3, 2024
ee7e03f
feat: Check if url is an HTTP URL
juancarlospaco Nov 3, 2024
1cdc5c3
feat: Check if url is an HTTP URL
juancarlospaco Nov 3, 2024
e31d139
Merge branch 'main' into fix2
juancarlospaco Nov 11, 2024
4b665c1
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
1e4b09c
Merge branch 'fix2' of https://github.com/supabase-community/vec2pg i…
juancarlospaco Nov 11, 2024
818a4f3
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
cc6ce69
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
7d003f6
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
c5da757
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
34970bb
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
25e97e5
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
917689a
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
523e975
feat: Check if url is an HTTP URL
juancarlospaco Nov 11, 2024
a2c06ca
fix: improve a test
juancarlospaco Dec 11, 2024
b2e33a1
fix: improve a test
juancarlospaco Dec 11, 2024
dbf828b
fix: improve a test
juancarlospaco Dec 11, 2024
1abd60d
fix: improve a test
juancarlospaco Dec 11, 2024
23d6e01
fix: improve a test
juancarlospaco Dec 11, 2024
5a9429a
fix: improve a test
juancarlospaco Dec 11, 2024
7ab4c2b
fix: improve a test
juancarlospaco Dec 11, 2024
6db225b
fix: improve a test
juancarlospaco Dec 11, 2024
661bea9
fix: improve a test
juancarlospaco Dec 11, 2024
7256295
fix: improve a test
juancarlospaco Dec 11, 2024
8a98fe4
fix: improve a test
juancarlospaco Dec 11, 2024
6ad88fd
fix: improve a test
juancarlospaco Dec 11, 2024
d820883
fix: improve a test
juancarlospaco Dec 11, 2024
f3a31b9
fix: improve a test
juancarlospaco Dec 11, 2024
c5fdcec
fix: improve a test
juancarlospaco Dec 11, 2024
3bb41fc
fix: improve a test
juancarlospaco Dec 11, 2024
9780ea2
fix: improve a test
juancarlospaco Dec 11, 2024
e48be75
fix: improve a test
juancarlospaco Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/vec2pg/common.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from urllib.parse import urlparse

POSTGRES_CONNECTION_STRING = "POSTGRES_CONNECTION_STRING"


def is_http_url(url: str) -> bool:
return urlparse(url).scheme in {"https", "http"}
5 changes: 4 additions & 1 deletion src/vec2pg/plugins/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from qdrant_client import QdrantClient
from tqdm import tqdm

from vec2pg.common import POSTGRES_CONNECTION_STRING
from vec2pg.common import POSTGRES_CONNECTION_STRING, is_http_url

app = typer.Typer()

Expand Down Expand Up @@ -36,6 +36,9 @@ def migrate(
],
):

if not is_http_url(qdrant_url):
ValueError("qdrant_url must be a valid HTTP URL string")

# Init Pinecone client and index
client = QdrantClient(url=qdrant_url, api_key=qdrant_api_key)

Expand Down