simplevecdb 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- simplevecdb-2.2.0/.bandit +9 -0
- simplevecdb-2.2.0/.env.example +32 -0
- simplevecdb-2.2.0/.github/FUNDING.yml +6 -0
- simplevecdb-2.2.0/.github/ISSUE_TEMPLATE/bug_report.yml +82 -0
- simplevecdb-2.2.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- simplevecdb-2.2.0/.github/ISSUE_TEMPLATE/feature_request.yml +58 -0
- simplevecdb-2.2.0/.github/dependabot.yml +7 -0
- simplevecdb-2.2.0/.github/workflows/ci.yml +36 -0
- simplevecdb-2.2.0/.github/workflows/publish.yml +121 -0
- simplevecdb-2.2.0/.github/workflows/security.yml +52 -0
- simplevecdb-2.2.0/.github/workflows/update-sponsors.yml +27 -0
- simplevecdb-2.2.0/.gitignore +36 -0
- simplevecdb-2.2.0/.pre-commit-config.yaml +30 -0
- simplevecdb-2.2.0/.python-version +1 -0
- simplevecdb-2.2.0/CHANGELOG.md +422 -0
- simplevecdb-2.2.0/CODE_OF_CONDUCT.md +36 -0
- simplevecdb-2.2.0/CONTRIBUTING.md +179 -0
- simplevecdb-2.2.0/LICENSE +21 -0
- simplevecdb-2.2.0/PKG-INFO +478 -0
- simplevecdb-2.2.0/README.md +448 -0
- simplevecdb-2.2.0/SECURITY.md +22 -0
- simplevecdb-2.2.0/docs/CHANGELOG.md +480 -0
- simplevecdb-2.2.0/docs/CONTRIBUTING.md +174 -0
- simplevecdb-2.2.0/docs/ENV_SETUP.md +78 -0
- simplevecdb-2.2.0/docs/LICENSE +1 -0
- simplevecdb-2.2.0/docs/api/async.md +99 -0
- simplevecdb-2.2.0/docs/api/config.md +3 -0
- simplevecdb-2.2.0/docs/api/core.md +328 -0
- simplevecdb-2.2.0/docs/api/embeddings.md +5 -0
- simplevecdb-2.2.0/docs/api/encryption.md +153 -0
- simplevecdb-2.2.0/docs/api/engine/catalog.md +5 -0
- simplevecdb-2.2.0/docs/api/engine/quantization.md +7 -0
- simplevecdb-2.2.0/docs/api/engine/search.md +46 -0
- simplevecdb-2.2.0/docs/api/integrations.md +9 -0
- simplevecdb-2.2.0/docs/api/types.md +197 -0
- simplevecdb-2.2.0/docs/benchmarks.md +122 -0
- simplevecdb-2.2.0/docs/examples.md +356 -0
- simplevecdb-2.2.0/docs/guides/clustering.md +403 -0
- simplevecdb-2.2.0/docs/index.md +415 -0
- simplevecdb-2.2.0/examples/auto_embed.py +27 -0
- simplevecdb-2.2.0/examples/backend_benchmark.py +326 -0
- simplevecdb-2.2.0/examples/embeddings/perf_benchmark.py +182 -0
- simplevecdb-2.2.0/examples/quant_benchmark.py +58 -0
- simplevecdb-2.2.0/examples/rag/langchain_rag.ipynb +231 -0
- simplevecdb-2.2.0/examples/rag/llama_rag.ipynb +281 -0
- simplevecdb-2.2.0/examples/rag/ollama_rag.ipynb +519 -0
- simplevecdb-2.2.0/examples/smoke_test.py +30 -0
- simplevecdb-2.2.0/mkdocs.yml +86 -0
- simplevecdb-2.2.0/pyproject.toml +84 -0
- simplevecdb-2.2.0/src/simplevecdb/__init__.py +50 -0
- simplevecdb-2.2.0/src/simplevecdb/async_core.py +528 -0
- simplevecdb-2.2.0/src/simplevecdb/config.py +107 -0
- simplevecdb-2.2.0/src/simplevecdb/constants.py +86 -0
- simplevecdb-2.2.0/src/simplevecdb/core.py +1795 -0
- simplevecdb-2.2.0/src/simplevecdb/embeddings/__init__.py +0 -0
- simplevecdb-2.2.0/src/simplevecdb/embeddings/models.py +102 -0
- simplevecdb-2.2.0/src/simplevecdb/embeddings/server.py +367 -0
- simplevecdb-2.2.0/src/simplevecdb/encryption.py +430 -0
- simplevecdb-2.2.0/src/simplevecdb/engine/__init__.py +8 -0
- simplevecdb-2.2.0/src/simplevecdb/engine/catalog.py +903 -0
- simplevecdb-2.2.0/src/simplevecdb/engine/clustering.py +248 -0
- simplevecdb-2.2.0/src/simplevecdb/engine/quantization.py +91 -0
- simplevecdb-2.2.0/src/simplevecdb/engine/search.py +450 -0
- simplevecdb-2.2.0/src/simplevecdb/engine/usearch_index.py +462 -0
- simplevecdb-2.2.0/src/simplevecdb/integrations/__init__.py +9 -0
- simplevecdb-2.2.0/src/simplevecdb/integrations/langchain.py +256 -0
- simplevecdb-2.2.0/src/simplevecdb/integrations/llamaindex.py +220 -0
- simplevecdb-2.2.0/src/simplevecdb/logging.py +214 -0
- simplevecdb-2.2.0/src/simplevecdb/types.py +125 -0
- simplevecdb-2.2.0/src/simplevecdb/utils.py +176 -0
- simplevecdb-2.2.0/tests/conftest.py +47 -0
- simplevecdb-2.2.0/tests/integration/test_langchain.py +142 -0
- simplevecdb-2.2.0/tests/integration/test_llamaindex.py +139 -0
- simplevecdb-2.2.0/tests/integration/test_rag.py +78 -0
- simplevecdb-2.2.0/tests/integration/test_server.py +96 -0
- simplevecdb-2.2.0/tests/integration/test_v21_features.py +283 -0
- simplevecdb-2.2.0/tests/perf/test_batch_detection.py +121 -0
- simplevecdb-2.2.0/tests/perf/test_performance.py +58 -0
- simplevecdb-2.2.0/tests/unit/core/__init__.py +1 -0
- simplevecdb-2.2.0/tests/unit/core/test_batch_detection.py +274 -0
- simplevecdb-2.2.0/tests/unit/core/test_core_additional_coverage.py +233 -0
- simplevecdb-2.2.0/tests/unit/core/test_factory_methods.py +27 -0
- simplevecdb-2.2.0/tests/unit/core/test_filters.py +60 -0
- simplevecdb-2.2.0/tests/unit/core/test_initialization.py +73 -0
- simplevecdb-2.2.0/tests/unit/core/test_quantization.py +86 -0
- simplevecdb-2.2.0/tests/unit/core/test_similarity_search.py +127 -0
- simplevecdb-2.2.0/tests/unit/embeddings/__init__.py +1 -0
- simplevecdb-2.2.0/tests/unit/embeddings/test_models.py +174 -0
- simplevecdb-2.2.0/tests/unit/embeddings/test_server.py +173 -0
- simplevecdb-2.2.0/tests/unit/integrations/__init__.py +1 -0
- simplevecdb-2.2.0/tests/unit/integrations/test_langchain_coverage.py +72 -0
- simplevecdb-2.2.0/tests/unit/integrations/test_llamaindex_coverage.py +100 -0
- simplevecdb-2.2.0/tests/unit/test_async.py +347 -0
- simplevecdb-2.2.0/tests/unit/test_clustering.py +585 -0
- simplevecdb-2.2.0/tests/unit/test_config.py +109 -0
- simplevecdb-2.2.0/tests/unit/test_core.py +592 -0
- simplevecdb-2.2.0/tests/unit/test_cross_collection_search.py +212 -0
- simplevecdb-2.2.0/tests/unit/test_encryption.py +381 -0
- simplevecdb-2.2.0/tests/unit/test_error_handling.py +495 -0
- simplevecdb-2.2.0/tests/unit/test_hierarchy.py +431 -0
- simplevecdb-2.2.0/tests/unit/test_multi_collection.py +67 -0
- simplevecdb-2.2.0/tests/unit/test_search.py +198 -0
- simplevecdb-2.2.0/tests/unit/test_search_coverage.py +120 -0
- simplevecdb-2.2.0/tests/unit/test_streaming.py +294 -0
- simplevecdb-2.2.0/tests/unit/test_types.py +16 -0
- simplevecdb-2.2.0/tests/unit/test_utils.py +40 -0
- simplevecdb-2.2.0/uv.lock +6024 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# SimpleVecDB Configuration
|
|
2
|
+
|
|
3
|
+
# Embedding Model
|
|
4
|
+
# Options: Any HuggingFace model ID compatible with SentenceTransformers
|
|
5
|
+
|
|
6
|
+
# Default: Snowflake/snowflake-arctic-embed-xs (384-dim, best balance, fast)
|
|
7
|
+
# Alternative: TaylorAI/bge-micro-v2 (384-dim, tiny, fast)
|
|
8
|
+
|
|
9
|
+
# Note: All models converted to ONNX format for performance.
|
|
10
|
+
|
|
11
|
+
EMBEDDING_MODEL=Snowflake/snowflake-arctic-embed-xs
|
|
12
|
+
EMBEDDING_CACHE_DIR=~/.cache/simplevecdb # Model cache directory
|
|
13
|
+
# Optional: alias registry for allowed models (alias=repo_id,comma-separated)
|
|
14
|
+
# EMBEDDING_MODEL_REGISTRY=default=Snowflake/snowflake-arctic-embed-xs,local-bge=TaylorAI/bge-micro-v2
|
|
15
|
+
# Set to 0 to allow arbitrary repo IDs (default is locked)
|
|
16
|
+
# EMBEDDING_MODEL_REGISTRY_LOCKED=1
|
|
17
|
+
|
|
18
|
+
# Batch size for embedding inference (optional - auto-detected if not set)
|
|
19
|
+
# Auto-detection considers: GPU VRAM, Apple Silicon, CPU cores, architecture
|
|
20
|
+
# Override only if you need specific batch size for your use case
|
|
21
|
+
# EMBEDDING_BATCH_SIZE=256
|
|
22
|
+
|
|
23
|
+
# Embedding server controls
|
|
24
|
+
# EMBEDDING_SERVER_MAX_REQUEST_ITEMS=128 # Max prompts per /v1/embeddings call
|
|
25
|
+
# EMBEDDING_SERVER_API_KEYS=local-dev-token
|
|
26
|
+
|
|
27
|
+
# Database
|
|
28
|
+
DATABASE_PATH=./data/simplevecdb.db
|
|
29
|
+
|
|
30
|
+
# Server Configuration
|
|
31
|
+
SERVER_HOST=0.0.0.0
|
|
32
|
+
SERVER_PORT=53287
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in SimpleVecDB
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for taking the time to report a bug. Please fill out the sections below.
|
|
9
|
+
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: description
|
|
12
|
+
attributes:
|
|
13
|
+
label: Describe the bug
|
|
14
|
+
description: A clear and concise description of what the bug is.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: reproduction
|
|
20
|
+
attributes:
|
|
21
|
+
label: Reproduction steps
|
|
22
|
+
description: Minimal code to reproduce the issue.
|
|
23
|
+
placeholder: |
|
|
24
|
+
```python
|
|
25
|
+
from simplevecdb import VectorDB
|
|
26
|
+
db = VectorDB(":memory:")
|
|
27
|
+
# ... code that triggers bug
|
|
28
|
+
```
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: expected
|
|
34
|
+
attributes:
|
|
35
|
+
label: Expected behavior
|
|
36
|
+
description: What you expected to happen.
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
|
|
40
|
+
- type: textarea
|
|
41
|
+
id: actual
|
|
42
|
+
attributes:
|
|
43
|
+
label: Actual behavior
|
|
44
|
+
description: What actually happened. Include error messages if applicable.
|
|
45
|
+
validations:
|
|
46
|
+
required: true
|
|
47
|
+
|
|
48
|
+
- type: input
|
|
49
|
+
id: version
|
|
50
|
+
attributes:
|
|
51
|
+
label: SimpleVecDB version
|
|
52
|
+
placeholder: "2.0.0"
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: input
|
|
57
|
+
id: python-version
|
|
58
|
+
attributes:
|
|
59
|
+
label: Python version
|
|
60
|
+
placeholder: "3.11"
|
|
61
|
+
validations:
|
|
62
|
+
required: true
|
|
63
|
+
|
|
64
|
+
- type: dropdown
|
|
65
|
+
id: os
|
|
66
|
+
attributes:
|
|
67
|
+
label: Operating System
|
|
68
|
+
options:
|
|
69
|
+
- Linux
|
|
70
|
+
- macOS
|
|
71
|
+
- Windows
|
|
72
|
+
- Other
|
|
73
|
+
validations:
|
|
74
|
+
required: true
|
|
75
|
+
|
|
76
|
+
- type: textarea
|
|
77
|
+
id: additional
|
|
78
|
+
attributes:
|
|
79
|
+
label: Additional context
|
|
80
|
+
description: Any other context about the problem (logs, screenshots, etc.)
|
|
81
|
+
validations:
|
|
82
|
+
required: false
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Documentation
|
|
4
|
+
url: https://simplevecdb.dev
|
|
5
|
+
about: Check the docs before opening an issue
|
|
6
|
+
- name: Discussions
|
|
7
|
+
url: https://github.com/coderdayton/simplevecdb/discussions
|
|
8
|
+
about: Ask questions and share ideas
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or enhancement
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for suggesting a feature! Please describe what you'd like to see.
|
|
9
|
+
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: problem
|
|
12
|
+
attributes:
|
|
13
|
+
label: Problem or motivation
|
|
14
|
+
description: What problem does this feature solve? Why do you need it?
|
|
15
|
+
placeholder: "I'm trying to do X but currently have to..."
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: solution
|
|
21
|
+
attributes:
|
|
22
|
+
label: Proposed solution
|
|
23
|
+
description: How would you like this to work?
|
|
24
|
+
placeholder: |
|
|
25
|
+
```python
|
|
26
|
+
# Example API usage
|
|
27
|
+
db = VectorDB("my.db")
|
|
28
|
+
db.new_feature(...)
|
|
29
|
+
```
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
|
|
33
|
+
- type: textarea
|
|
34
|
+
id: alternatives
|
|
35
|
+
attributes:
|
|
36
|
+
label: Alternatives considered
|
|
37
|
+
description: Any alternative solutions or workarounds you've tried.
|
|
38
|
+
validations:
|
|
39
|
+
required: false
|
|
40
|
+
|
|
41
|
+
- type: dropdown
|
|
42
|
+
id: scope
|
|
43
|
+
attributes:
|
|
44
|
+
label: Scope
|
|
45
|
+
description: How big is this change?
|
|
46
|
+
options:
|
|
47
|
+
- Small (docs, minor tweak)
|
|
48
|
+
- Medium (new method, config option)
|
|
49
|
+
- Large (new module, breaking change)
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
|
|
53
|
+
- type: checkboxes
|
|
54
|
+
id: contribution
|
|
55
|
+
attributes:
|
|
56
|
+
label: Contribution
|
|
57
|
+
options:
|
|
58
|
+
- label: I'm willing to submit a PR for this feature
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
permissions:
|
|
3
|
+
contents: read
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v3
|
|
22
|
+
with:
|
|
23
|
+
enable-cache: true
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
run: uv python install ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv sync --all-extras --dev
|
|
30
|
+
|
|
31
|
+
- name: Test with pytest
|
|
32
|
+
run: uv run pytest tests/ -vv --cov=src/simplevecdb
|
|
33
|
+
|
|
34
|
+
- name: Check coverage
|
|
35
|
+
run: |
|
|
36
|
+
uv run coverage report -m --fail-under=90
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
# Verify version matches before publishing
|
|
14
|
+
verify:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
version: ${{ steps.version.outputs.VERSION }}
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Extract version from tag
|
|
22
|
+
id: version
|
|
23
|
+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v3
|
|
27
|
+
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
run: uv python install 3.11
|
|
30
|
+
|
|
31
|
+
- name: Verify __version__ matches tag
|
|
32
|
+
run: |
|
|
33
|
+
PACKAGE_VERSION=$(uv run python -c "from simplevecdb import __version__; print(__version__)")
|
|
34
|
+
TAG_VERSION="${{ steps.version.outputs.VERSION }}"
|
|
35
|
+
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
|
|
36
|
+
echo "❌ Version mismatch!"
|
|
37
|
+
echo " Tag version: $TAG_VERSION"
|
|
38
|
+
echo " Package version: $PACKAGE_VERSION"
|
|
39
|
+
echo ""
|
|
40
|
+
echo "Update __version__ in src/simplevecdb/__init__.py to match the tag."
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
echo "✅ Version match: $PACKAGE_VERSION"
|
|
44
|
+
|
|
45
|
+
release:
|
|
46
|
+
needs: verify
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0
|
|
52
|
+
|
|
53
|
+
- name: Extract changelog for release
|
|
54
|
+
id: changelog
|
|
55
|
+
run: |
|
|
56
|
+
VERSION="${{ needs.verify.outputs.version }}"
|
|
57
|
+
# Extract section for this version from CHANGELOG.md
|
|
58
|
+
# Matches from "## [VERSION]" until the next "## [" or end of file
|
|
59
|
+
awk -v ver="$VERSION" '
|
|
60
|
+
/^## \[/ {
|
|
61
|
+
if (found) exit
|
|
62
|
+
if (index($0, "## [" ver "]") == 1) found=1
|
|
63
|
+
}
|
|
64
|
+
found
|
|
65
|
+
' CHANGELOG.md > release_notes.md
|
|
66
|
+
|
|
67
|
+
# If empty, provide a fallback
|
|
68
|
+
if [ ! -s release_notes.md ]; then
|
|
69
|
+
echo "## Release v$VERSION" > release_notes.md
|
|
70
|
+
echo "" >> release_notes.md
|
|
71
|
+
echo "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details." >> release_notes.md
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
echo "📋 Release notes:"
|
|
75
|
+
cat release_notes.md
|
|
76
|
+
|
|
77
|
+
- name: Create GitHub Release
|
|
78
|
+
uses: softprops/action-gh-release@v2
|
|
79
|
+
with:
|
|
80
|
+
body_path: release_notes.md
|
|
81
|
+
draft: false
|
|
82
|
+
prerelease: ${{ contains(needs.verify.outputs.version, 'rc') || contains(needs.verify.outputs.version, 'beta') || contains(needs.verify.outputs.version, 'alpha') }}
|
|
83
|
+
generate_release_notes: false
|
|
84
|
+
|
|
85
|
+
publish:
|
|
86
|
+
needs: [verify, release]
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
environment: pypi
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v4
|
|
91
|
+
|
|
92
|
+
- name: Install uv
|
|
93
|
+
uses: astral-sh/setup-uv@v3
|
|
94
|
+
|
|
95
|
+
- name: Set up Python
|
|
96
|
+
run: uv python install 3.11
|
|
97
|
+
|
|
98
|
+
- name: Build package
|
|
99
|
+
run: uv build
|
|
100
|
+
|
|
101
|
+
- name: Verify build artifacts
|
|
102
|
+
run: |
|
|
103
|
+
echo "📦 Built packages:"
|
|
104
|
+
ls -la dist/
|
|
105
|
+
# Verify version in built package
|
|
106
|
+
uv run python -c "
|
|
107
|
+
import zipfile
|
|
108
|
+
import glob
|
|
109
|
+
whl = glob.glob('dist/*.whl')[0]
|
|
110
|
+
with zipfile.ZipFile(whl) as z:
|
|
111
|
+
for name in z.namelist():
|
|
112
|
+
if name.endswith('METADATA'):
|
|
113
|
+
content = z.read(name).decode()
|
|
114
|
+
for line in content.split('\n'):
|
|
115
|
+
if line.startswith('Version:'):
|
|
116
|
+
print(f'✅ Package version: {line}')
|
|
117
|
+
break
|
|
118
|
+
"
|
|
119
|
+
|
|
120
|
+
- name: Publish to PyPI
|
|
121
|
+
run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Security Scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 0 * * 0" # Weekly
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
dependency-scan:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v3
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
run: uv python install 3.11
|
|
21
|
+
|
|
22
|
+
- name: Create venv and install dependencies
|
|
23
|
+
run: |
|
|
24
|
+
uv venv
|
|
25
|
+
uv pip install pip-audit
|
|
26
|
+
uv pip install ".[dev,server]"
|
|
27
|
+
|
|
28
|
+
- name: Scan dependencies with pip-audit
|
|
29
|
+
run: |
|
|
30
|
+
uv run pip-audit --strict --ignore-vuln PYSEC-2024-142 || true
|
|
31
|
+
|
|
32
|
+
code-scan:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v4
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
uses: astral-sh/setup-uv@v3
|
|
39
|
+
|
|
40
|
+
- name: Set up Python
|
|
41
|
+
run: uv python install 3.11
|
|
42
|
+
|
|
43
|
+
- name: Create venv and install Bandit
|
|
44
|
+
run: |
|
|
45
|
+
uv venv
|
|
46
|
+
uv pip install bandit
|
|
47
|
+
|
|
48
|
+
- name: Run Bandit
|
|
49
|
+
run: uv run bandit -r src/ -ll -c .bandit
|
|
50
|
+
|
|
51
|
+
- name: Run Semgrep
|
|
52
|
+
uses: returntocorp/semgrep-action@v1
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Update Sponsors
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: "0 0 * * *" # daily
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
jobs:
|
|
9
|
+
deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout 🛎️
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Update Sponsors ❤️
|
|
16
|
+
uses: JamesIves/github-sponsors-readme-action@v1
|
|
17
|
+
with:
|
|
18
|
+
file: README.md
|
|
19
|
+
token: ${{ secrets.GH_PAT }}
|
|
20
|
+
|
|
21
|
+
- name: Commit changes 📝
|
|
22
|
+
run: |
|
|
23
|
+
git config --global user.name "github-actions[bot]"
|
|
24
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
25
|
+
git add README.md
|
|
26
|
+
git commit -m "Update sponsors list" || echo "No changes to commit"
|
|
27
|
+
git push origin HEAD:main
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python / uv
|
|
2
|
+
.venv/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.pyc
|
|
5
|
+
.env
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
|
|
13
|
+
# IDE
|
|
14
|
+
.vscode/
|
|
15
|
+
.idea/
|
|
16
|
+
|
|
17
|
+
# Jupyter
|
|
18
|
+
.ipynb_checkpoints
|
|
19
|
+
|
|
20
|
+
# Databases
|
|
21
|
+
*.db
|
|
22
|
+
*.sqlite
|
|
23
|
+
|
|
24
|
+
# OpenCode
|
|
25
|
+
.opencode/
|
|
26
|
+
opencode.json
|
|
27
|
+
|
|
28
|
+
# Project specific
|
|
29
|
+
simplevecdb_plan.md
|
|
30
|
+
AGENTS.md
|
|
31
|
+
htmlcov/
|
|
32
|
+
site/
|
|
33
|
+
scripts
|
|
34
|
+
.coverage
|
|
35
|
+
NEXT_UPDATES.md
|
|
36
|
+
pro_pack/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: local
|
|
3
|
+
hooks:
|
|
4
|
+
- id: ruff
|
|
5
|
+
name: ruff
|
|
6
|
+
entry: uv run ruff check . --fix
|
|
7
|
+
language: system
|
|
8
|
+
types: [python]
|
|
9
|
+
pass_filenames: false
|
|
10
|
+
|
|
11
|
+
- id: mypy
|
|
12
|
+
name: mypy
|
|
13
|
+
entry: uv run mypy .
|
|
14
|
+
language: system
|
|
15
|
+
types: [python]
|
|
16
|
+
pass_filenames: false
|
|
17
|
+
|
|
18
|
+
- id: bandit
|
|
19
|
+
name: bandit
|
|
20
|
+
entry: uv run bandit -r src/ -ll -c .bandit
|
|
21
|
+
language: system
|
|
22
|
+
types: [python]
|
|
23
|
+
pass_filenames: false
|
|
24
|
+
|
|
25
|
+
- id: pytest-cov
|
|
26
|
+
name: pytest coverage
|
|
27
|
+
entry: uv run pytest tests/ -vv --cov=src/simplevecdb
|
|
28
|
+
language: system
|
|
29
|
+
types: [python]
|
|
30
|
+
pass_filenames: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|