aresadb 0.1.3__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.
Files changed (87) hide show
  1. aresadb-0.1.3/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
  2. aresadb-0.1.3/.github/ISSUE_TEMPLATE/feature_request.md +52 -0
  3. aresadb-0.1.3/.github/PULL_REQUEST_TEMPLATE.md +63 -0
  4. aresadb-0.1.3/.github/workflows/ci.yml +56 -0
  5. aresadb-0.1.3/.github/workflows/release.yml +153 -0
  6. aresadb-0.1.3/.gitignore +47 -0
  7. aresadb-0.1.3/ARCHITECTURE.md +594 -0
  8. aresadb-0.1.3/BENCHMARKS.md +406 -0
  9. aresadb-0.1.3/CHANGELOG.md +117 -0
  10. aresadb-0.1.3/CONTRIBUTING.md +404 -0
  11. aresadb-0.1.3/Cargo.toml +145 -0
  12. aresadb-0.1.3/Dockerfile +61 -0
  13. aresadb-0.1.3/EXAMPLES.md +615 -0
  14. aresadb-0.1.3/LICENSE +22 -0
  15. aresadb-0.1.3/PKG-INFO +107 -0
  16. aresadb-0.1.3/QUICKSTART.md +92 -0
  17. aresadb-0.1.3/README.md +286 -0
  18. aresadb-0.1.3/SECURITY.md +137 -0
  19. aresadb-0.1.3/TODO.md +51 -0
  20. aresadb-0.1.3/benches/distributed_bench.rs +317 -0
  21. aresadb-0.1.3/benches/query_bench.rs +141 -0
  22. aresadb-0.1.3/benches/storage_bench.rs +176 -0
  23. aresadb-0.1.3/demo_db/.aresadb/config.toml +3 -0
  24. aresadb-0.1.3/demo_db/.aresadb/data.redb +0 -0
  25. aresadb-0.1.3/docker-compose.yml +24 -0
  26. aresadb-0.1.3/examples/fire_safety_test.rs +333 -0
  27. aresadb-0.1.3/pyproject.toml +39 -0
  28. aresadb-0.1.3/python/Cargo.lock +3496 -0
  29. aresadb-0.1.3/python/Cargo.toml +19 -0
  30. aresadb-0.1.3/python/README.md +81 -0
  31. aresadb-0.1.3/python/src/lib.rs +331 -0
  32. aresadb-0.1.3/scripts/compare_duckdb.py +245 -0
  33. aresadb-0.1.3/scripts/compare_pandas.py +235 -0
  34. aresadb-0.1.3/scripts/compare_sqlite.py +260 -0
  35. aresadb-0.1.3/scripts/run_comparisons.sh +94 -0
  36. aresadb-0.1.3/src/bin/server.rs +94 -0
  37. aresadb-0.1.3/src/cli/commands.rs +121 -0
  38. aresadb-0.1.3/src/cli/config.rs +126 -0
  39. aresadb-0.1.3/src/cli/mod.rs +13 -0
  40. aresadb-0.1.3/src/cli/repl.rs +543 -0
  41. aresadb-0.1.3/src/client/builder.rs +137 -0
  42. aresadb-0.1.3/src/client/connection.rs +156 -0
  43. aresadb-0.1.3/src/client/mod.rs +313 -0
  44. aresadb-0.1.3/src/distributed/bloom.rs +480 -0
  45. aresadb-0.1.3/src/distributed/compression.rs +287 -0
  46. aresadb-0.1.3/src/distributed/mod.rs +50 -0
  47. aresadb-0.1.3/src/distributed/replication.rs +564 -0
  48. aresadb-0.1.3/src/distributed/shard.rs +400 -0
  49. aresadb-0.1.3/src/distributed/streaming.rs +319 -0
  50. aresadb-0.1.3/src/distributed/wal.rs +450 -0
  51. aresadb-0.1.3/src/lib.rs +195 -0
  52. aresadb-0.1.3/src/main.rs +1306 -0
  53. aresadb-0.1.3/src/output/graph_viz.rs +244 -0
  54. aresadb-0.1.3/src/output/json.rs +166 -0
  55. aresadb-0.1.3/src/output/mod.rs +348 -0
  56. aresadb-0.1.3/src/output/table.rs +180 -0
  57. aresadb-0.1.3/src/query/executor.rs +533 -0
  58. aresadb-0.1.3/src/query/mod.rs +323 -0
  59. aresadb-0.1.3/src/query/parser.rs +583 -0
  60. aresadb-0.1.3/src/query/planner.rs +397 -0
  61. aresadb-0.1.3/src/rag/chunker.rs +494 -0
  62. aresadb-0.1.3/src/rag/context.rs +402 -0
  63. aresadb-0.1.3/src/rag/embeddings.rs +473 -0
  64. aresadb-0.1.3/src/rag/hybrid.rs +350 -0
  65. aresadb-0.1.3/src/rag/mod.rs +28 -0
  66. aresadb-0.1.3/src/schema/migration.rs +293 -0
  67. aresadb-0.1.3/src/schema/mod.rs +224 -0
  68. aresadb-0.1.3/src/schema/registry.rs +371 -0
  69. aresadb-0.1.3/src/server/handler.rs +403 -0
  70. aresadb-0.1.3/src/server/mod.rs +246 -0
  71. aresadb-0.1.3/src/server/pool.rs +97 -0
  72. aresadb-0.1.3/src/server/protocol.rs +281 -0
  73. aresadb-0.1.3/src/storage/bucket.rs +352 -0
  74. aresadb-0.1.3/src/storage/cache.rs +215 -0
  75. aresadb-0.1.3/src/storage/local.rs +707 -0
  76. aresadb-0.1.3/src/storage/mod.rs +444 -0
  77. aresadb-0.1.3/src/storage/node.rs +830 -0
  78. aresadb-0.1.3/src/storage/parallel.rs +351 -0
  79. aresadb-0.1.3/src/storage/vector.rs +402 -0
  80. aresadb-0.1.3/src/storage/vector_index.rs +531 -0
  81. aresadb-0.1.3/tests/common/mod.rs +109 -0
  82. aresadb-0.1.3/tests/integration_tests.rs +599 -0
  83. aresadb-0.1.3/tests/property_tests.rs +215 -0
  84. aresadb-0.1.3/tests/stress_tests.rs +227 -0
  85. aresadb-0.1.3/webui/app.js +564 -0
  86. aresadb-0.1.3/webui/index.html +488 -0
  87. aresadb-0.1.3/webui/styles.css +880 -0
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug to help us improve AresaDB
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Bug Description
10
+ A clear and concise description of the bug.
11
+
12
+ ## Steps to Reproduce
13
+ 1. Initialize database with `aresadb init ./test`
14
+ 2. Insert data `aresadb insert user --props '...'`
15
+ 3. Run query `aresadb query "SELECT * FROM user"`
16
+ 4. See error
17
+
18
+ ## Expected Behavior
19
+ What you expected to happen.
20
+
21
+ ## Actual Behavior
22
+ What actually happened.
23
+
24
+ ## Error Message
25
+ ```
26
+ Paste any error messages here
27
+ ```
28
+
29
+ ## Environment
30
+ - **OS**: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11]
31
+ - **AresaDB Version**: [e.g., 0.1.0]
32
+ - **Rust Version**: [e.g., 1.75.0]
33
+ - **Installation Method**: [e.g., cargo build, binary download]
34
+
35
+ ## Database Info
36
+ ```bash
37
+ # Output of: aresadb status
38
+ ```
39
+
40
+ ## Additional Context
41
+ Add any other context about the problem here.
42
+
43
+ ## Possible Solution
44
+ If you have ideas on how to fix this, please share.
45
+
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature for AresaDB
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Feature Description
10
+ A clear and concise description of the feature you'd like.
11
+
12
+ ## Use Case
13
+ Describe the problem you're trying to solve or the use case this would enable.
14
+
15
+ **Example:**
16
+ > As a data scientist, I want to store vector embeddings so that I can build RAG applications.
17
+
18
+ ## Proposed Solution
19
+ How do you envision this working?
20
+
21
+ ### CLI Interface (if applicable)
22
+ ```bash
23
+ # Example commands
24
+ aresadb embed <node_id> --model all-MiniLM-L6-v2
25
+ aresadb search --vector "[0.1, 0.2, ...]" --limit 10
26
+ ```
27
+
28
+ ### API (if applicable)
29
+ ```rust
30
+ // Example Rust API
31
+ db.insert_vector("embedding", &[0.1, 0.2, 0.3]).await?;
32
+ db.similarity_search(&query_vector, 10).await?;
33
+ ```
34
+
35
+ ### SQL Syntax (if applicable)
36
+ ```sql
37
+ SELECT * FROM documents
38
+ WHERE SIMILAR_TO(embedding, ?) > 0.8
39
+ ORDER BY SIMILARITY DESC;
40
+ ```
41
+
42
+ ## Alternatives Considered
43
+ Describe any alternative solutions or features you've considered.
44
+
45
+ ## Additional Context
46
+ Add any other context, mockups, or examples.
47
+
48
+ ## Would you like to work on this?
49
+ - [ ] Yes, I'd like to implement this feature
50
+ - [ ] No, but I can help with design/testing
51
+ - [ ] Just suggesting
52
+
@@ -0,0 +1,63 @@
1
+ ## Description
2
+
3
+ Brief description of the changes in this PR.
4
+
5
+ Fixes #(issue number)
6
+
7
+ ## Type of Change
8
+
9
+ - [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
10
+ - [ ] ✨ New feature (non-breaking change that adds functionality)
11
+ - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
12
+ - [ ] 📚 Documentation update
13
+ - [ ] 🧹 Code refactoring (no functional changes)
14
+ - [ ] 🧪 Test update
15
+
16
+ ## Changes Made
17
+
18
+ - Change 1
19
+ - Change 2
20
+ - Change 3
21
+
22
+ ## Testing
23
+
24
+ ### Tests Added/Updated
25
+ - [ ] Unit tests
26
+ - [ ] Integration tests
27
+ - [ ] Property tests
28
+
29
+ ### Manual Testing
30
+ Describe any manual testing performed:
31
+
32
+ ```bash
33
+ # Commands used to test
34
+ aresadb -d ./test query "SELECT * FROM users"
35
+ ```
36
+
37
+ ## Checklist
38
+
39
+ - [ ] My code follows the project's style guidelines
40
+ - [ ] I have performed a self-review of my code
41
+ - [ ] I have commented my code, particularly in hard-to-understand areas
42
+ - [ ] I have made corresponding changes to the documentation
43
+ - [ ] My changes generate no new warnings
44
+ - [ ] I have added tests that prove my fix is effective or that my feature works
45
+ - [ ] New and existing unit tests pass locally with my changes
46
+ - [ ] Any dependent changes have been merged and published
47
+
48
+ ## Screenshots (if applicable)
49
+
50
+ Before | After
51
+ :---: | :---:
52
+ screenshot | screenshot
53
+
54
+ ## Performance Impact (if applicable)
55
+
56
+ - [ ] No performance impact
57
+ - [ ] Performance improved
58
+ - [ ] Performance may be impacted (explain below)
59
+
60
+ ## Additional Notes
61
+
62
+ Any additional information that reviewers should know.
63
+
@@ -0,0 +1,56 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+ RUST_BACKTRACE: 1
12
+
13
+ jobs:
14
+ check:
15
+ name: Check
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: dtolnay/rust-toolchain@stable
20
+ - uses: Swatinem/rust-cache@v2
21
+ - run: cargo check
22
+
23
+ test:
24
+ name: Test (${{ matrix.os }})
25
+ runs-on: ${{ matrix.os }}
26
+ strategy:
27
+ matrix:
28
+ os: [ubuntu-latest, macos-latest]
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: dtolnay/rust-toolchain@stable
32
+ - uses: Swatinem/rust-cache@v2
33
+ - run: cargo test
34
+
35
+ lint:
36
+ name: Lint
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: dtolnay/rust-toolchain@stable
41
+ with:
42
+ components: rustfmt, clippy
43
+ - uses: Swatinem/rust-cache@v2
44
+ - run: cargo fmt -- --check
45
+ - run: cargo clippy -- -D warnings
46
+
47
+ docs:
48
+ name: Docs
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - uses: dtolnay/rust-toolchain@stable
53
+ - uses: Swatinem/rust-cache@v2
54
+ - run: cargo doc --no-deps
55
+ env:
56
+ RUSTDOCFLAGS: -D warnings
@@ -0,0 +1,153 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*.*.*"]
6
+
7
+ permissions:
8
+ contents: read
9
+ packages: write
10
+
11
+ env:
12
+ CARGO_TERM_COLOR: always
13
+
14
+ jobs:
15
+ # ── Crates.io ──────────────────────────────────────────────────
16
+ publish-crate:
17
+ name: Publish to crates.io
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: dtolnay/rust-toolchain@stable
22
+ - uses: Swatinem/rust-cache@v2
23
+ - name: Publish (skip if version already exists)
24
+ run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} || echo "Version already published, skipping"
25
+
26
+ # ── PyPI wheels (Linux via manylinux container) ────────────────
27
+ build-wheels-linux:
28
+ name: Build wheels (linux-${{ matrix.target }})
29
+ runs-on: ${{ matrix.runner }}
30
+ strategy:
31
+ matrix:
32
+ include:
33
+ - runner: ubuntu-latest
34
+ target: x86_64
35
+ - runner: ubuntu-24.04-arm
36
+ target: aarch64
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: actions/setup-python@v5
40
+ with:
41
+ python-version: "3.12"
42
+ - run: pip install maturin
43
+ - name: Build wheels for all Python versions
44
+ working-directory: python
45
+ run: |
46
+ maturin build --release --target ${{ matrix.target }}-unknown-linux-gnu \
47
+ --find-interpreter --out dist
48
+ - uses: actions/upload-artifact@v4
49
+ with:
50
+ name: wheels-linux-${{ matrix.target }}
51
+ path: python/dist/*.whl
52
+
53
+ # ── PyPI wheels (macOS) ────────────────────────────────────────
54
+ build-wheels-macos:
55
+ name: Build wheels (macos-${{ matrix.target }})
56
+ runs-on: ${{ matrix.runner }}
57
+ strategy:
58
+ matrix:
59
+ include:
60
+ - runner: macos-latest
61
+ target: x86_64-apple-darwin
62
+ - runner: macos-latest
63
+ target: aarch64-apple-darwin
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - uses: dtolnay/rust-toolchain@stable
67
+ with:
68
+ targets: ${{ matrix.target }}
69
+ - uses: actions/setup-python@v5
70
+ with:
71
+ python-version: |
72
+ 3.9
73
+ 3.10
74
+ 3.11
75
+ 3.12
76
+ 3.13
77
+ - run: pip install maturin
78
+ - name: Build wheels for Python 3.9-3.13
79
+ working-directory: python
80
+ run: |
81
+ maturin build --release --target ${{ matrix.target }} \
82
+ --interpreter python3.9 python3.10 python3.11 python3.12 python3.13 \
83
+ --out dist
84
+ - uses: actions/upload-artifact@v4
85
+ with:
86
+ name: wheels-macos-${{ matrix.target }}
87
+ path: python/dist/*.whl
88
+
89
+ # ── Source distribution ────────────────────────────────────────
90
+ build-sdist:
91
+ name: Build source distribution
92
+ runs-on: ubuntu-latest
93
+ steps:
94
+ - uses: actions/checkout@v4
95
+ - uses: actions/setup-python@v5
96
+ with:
97
+ python-version: "3.12"
98
+ - run: pip install maturin
99
+ - name: Build sdist
100
+ working-directory: python
101
+ run: maturin sdist --out dist
102
+ - uses: actions/upload-artifact@v4
103
+ with:
104
+ name: sdist
105
+ path: python/dist/*.tar.gz
106
+
107
+ # ── Publish to PyPI ────────────────────────────────────────────
108
+ publish-pypi:
109
+ name: Publish to PyPI
110
+ needs: [build-wheels-linux, build-wheels-macos, build-sdist]
111
+ runs-on: ubuntu-latest
112
+ environment:
113
+ name: pypi
114
+ url: https://pypi.org/p/aresadb
115
+ permissions:
116
+ id-token: write
117
+ steps:
118
+ - uses: actions/download-artifact@v4
119
+ with:
120
+ pattern: wheels-*
121
+ path: dist
122
+ merge-multiple: true
123
+ - uses: actions/download-artifact@v4
124
+ with:
125
+ name: sdist
126
+ path: dist
127
+ - uses: pypa/gh-action-pypi-publish@release/v1
128
+
129
+ # ── Docker (GHCR) ─────────────────────────────────────────────
130
+ publish-docker:
131
+ name: Publish Docker image
132
+ runs-on: ubuntu-latest
133
+ steps:
134
+ - uses: actions/checkout@v4
135
+ - uses: docker/setup-buildx-action@v3
136
+ - uses: docker/login-action@v3
137
+ with:
138
+ registry: ghcr.io
139
+ username: ${{ github.actor }}
140
+ password: ${{ secrets.GITHUB_TOKEN }}
141
+ - name: Extract version from tag
142
+ id: meta
143
+ run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
144
+ - uses: docker/build-push-action@v6
145
+ with:
146
+ context: .
147
+ push: true
148
+ tags: |
149
+ ghcr.io/yoreai/aresadb:${{ steps.meta.outputs.version }}
150
+ ghcr.io/yoreai/aresadb:latest
151
+ cache-from: type=gha
152
+ cache-to: type=gha,mode=max
153
+ platforms: linux/amd64,linux/arm64
@@ -0,0 +1,47 @@
1
+ # Rust
2
+ target/
3
+ Cargo.lock
4
+ *.rlib
5
+ *.rmeta
6
+
7
+ # Benchmarks
8
+ benchmark_results/
9
+
10
+ # Python
11
+ .venv/
12
+ __pycache__/
13
+ *.pyc
14
+ *.pyd
15
+ *.so
16
+ *.egg-info/
17
+ dist/
18
+ python/.venv/
19
+ python/target/
20
+
21
+ # Environment
22
+ .env
23
+ .env.*
24
+ !.env.example
25
+
26
+ # OS
27
+ .DS_Store
28
+ ._*
29
+
30
+ # IDE
31
+ .vscode/
32
+ .idea/
33
+ *.swp
34
+ *.swo
35
+
36
+ # Data
37
+ *.parquet
38
+ *.csv.gz
39
+
40
+ # Logs
41
+ *.log
42
+
43
+ # Docker
44
+ docker-compose.override.yml
45
+
46
+ # Demo database (generated)
47
+ demo_db/data/