Skip to content

Commit 43c5daa

Browse files
init 0.1.0
1 parent 6282682 commit 43c5daa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4103
-177
lines changed

.env.example

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# OpenAI (for embeddings)
2+
OPENAI_API_KEY=sk-your-key-here
3+
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
4+
5+
# AstraDB
6+
ASTRA_DB_APPLICATION_TOKEN=AstraCS:your-token-here
7+
ASTRA_DB_API_ENDPOINT=https://your-id.apps.astra.datastax.com
8+
ASTRA_DB_COLLECTION_NAME=vector_documents
9+
10+
# ChromaDB Cloud (optional)
11+
CHROMA_API_KEY=your-chroma-api-key
12+
CHROMA_CLOUD_TENANT=your-tenant
13+
CHROMA_CLOUD_DATABASE=your-database
14+
15+
# ChromaDB HTTP Server (optional)
16+
CHROMA_HTTP_HOST=localhost
17+
CHROMA_HTTP_PORT=8000
18+
19+
# ChromaDB Local (optional)
20+
CHROMA_PERSIST_DIR=./chroma_data
21+
22+
# Milvus
23+
MILVUS_API_ENDPOINT=https://your-endpoint.zillizcloud.com
24+
MILVUS_USER=your-user
25+
MILVUS_PASSWORD=your-password
26+
27+
# PGVector (PostgreSQL with pgvector extension)
28+
PGVECTOR_HOST=localhost
29+
PGVECTOR_PORT=5432
30+
PGVECTOR_DBNAME=vectordb
31+
PGVECTOR_USER=postgres
32+
PGVECTOR_PASSWORD=your-password
33+
34+
# Vector metric (cosine, dot_product, euclidean)
35+
VECTOR_METRIC=cosine

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[all,dev]"
28+
29+
- name: Run tests
30+
run: |
31+
pytest
32+
33+
- name: Run pre-commit
34+
run: uv run pre-commit run --all-files
35+
36+
docs:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Set up Python 3.11
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: "3.11"
45+
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install mkdocs-material mkdocstrings[python]
50+
pip install -e ".[all]"
51+
52+
- name: Build docs
53+
run: |
54+
mkdocs build

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- "mkdocs.yml"
10+
- ".github/workflows/docs.yml"
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Configure Git Credentials
22+
run: |
23+
git config user.name github-actions[bot]
24+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.11"
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install mkdocs-material mkdocstrings[python]
35+
pip install -e ".[all]"
36+
37+
- name: Deploy docs
38+
run: |
39+
mkdocs gh-deploy --force

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
12+
contents: read
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install build dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build
26+
27+
- name: Build package
28+
run: |
29+
python -m build
30+
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test-build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test Package Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install build dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install build twine
25+
26+
- name: Build package
27+
run: |
28+
python -m build
29+
30+
- name: Check package with twine
31+
run: |
32+
twine check dist/*
33+
34+
- name: List built packages
35+
run: |
36+
ls -lh dist/
37+
38+
- name: Test install from wheel
39+
run: |
40+
pip install dist/*.whl
41+
python -c "import crossvector; print(f'CrossVector version: {crossvector.__version__ if hasattr(crossvector, \"__version__\") else \"N/A\"}')"

0 commit comments

Comments
 (0)