vectra-client 0.2.1 → 0.3.0

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +77 -37
  3. data/CHANGELOG.md +49 -6
  4. data/README.md +52 -393
  5. data/docs/Gemfile +9 -0
  6. data/docs/_config.yml +37 -0
  7. data/docs/_layouts/default.html +14 -0
  8. data/docs/_layouts/home.html +187 -0
  9. data/docs/_layouts/page.html +82 -0
  10. data/docs/_site/api/overview/index.html +145 -0
  11. data/docs/_site/assets/main.css +649 -0
  12. data/docs/_site/assets/main.css.map +1 -0
  13. data/docs/_site/assets/minima-social-icons.svg +33 -0
  14. data/docs/_site/assets/style.css +295 -0
  15. data/docs/_site/community/contributing/index.html +110 -0
  16. data/docs/_site/examples/basic-usage/index.html +117 -0
  17. data/docs/_site/examples/index.html +58 -0
  18. data/docs/_site/feed.xml +1 -0
  19. data/docs/_site/guides/getting-started/index.html +106 -0
  20. data/docs/_site/guides/installation/index.html +82 -0
  21. data/docs/_site/index.html +92 -0
  22. data/docs/_site/providers/index.html +119 -0
  23. data/docs/_site/providers/pgvector/index.html +155 -0
  24. data/docs/_site/providers/pinecone/index.html +121 -0
  25. data/docs/_site/providers/qdrant/index.html +124 -0
  26. data/docs/_site/providers/weaviate/index.html +123 -0
  27. data/docs/_site/robots.txt +1 -0
  28. data/docs/_site/sitemap.xml +39 -0
  29. data/docs/api/overview.md +126 -0
  30. data/docs/assets/style.css +927 -0
  31. data/docs/community/contributing.md +89 -0
  32. data/docs/examples/basic-usage.md +102 -0
  33. data/docs/examples/index.md +54 -0
  34. data/docs/guides/getting-started.md +90 -0
  35. data/docs/guides/installation.md +67 -0
  36. data/docs/guides/performance.md +200 -0
  37. data/docs/index.md +37 -0
  38. data/docs/providers/index.md +81 -0
  39. data/docs/providers/pgvector.md +95 -0
  40. data/docs/providers/pinecone.md +72 -0
  41. data/docs/providers/qdrant.md +73 -0
  42. data/docs/providers/weaviate.md +72 -0
  43. data/lib/vectra/batch.rb +148 -0
  44. data/lib/vectra/cache.rb +261 -0
  45. data/lib/vectra/configuration.rb +6 -1
  46. data/lib/vectra/pool.rb +256 -0
  47. data/lib/vectra/streaming.rb +153 -0
  48. data/lib/vectra/version.rb +1 -1
  49. data/lib/vectra.rb +4 -0
  50. data/netlify.toml +12 -0
  51. metadata +58 -5
  52. data/IMPLEMENTATION_GUIDE.md +0 -686
  53. data/NEW_FEATURES_v0.2.0.md +0 -459
  54. data/RELEASE_CHECKLIST_v0.2.0.md +0 -383
  55. data/USAGE_EXAMPLES.md +0 -787
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c00aee137978894b5722853a5aa6419c76a4613fd07e7b772df83c0ffddcebd
4
- data.tar.gz: 92f2e588d62520f695d59feaf74d6e1787efc8c1044cf92a8cf94251dcd9ce3a
3
+ metadata.gz: 15a003ec47ff2de6ec1977426169ffe1739f5fc9ba07cfcd717ca9cb88fd398f
4
+ data.tar.gz: ed77f5c22fd580990ee4beaa1840175329c3feda9dd9b6087ad6ff93fec9743a
5
5
  SHA512:
6
- metadata.gz: df1fa8e851978d7167e55d1df5d8718a01923b533ea10d314c24a570f84c1440dcb41bcad20ab9226206d742f03b8f3deb8aaf34d327f63fe5744345a9827127
7
- data.tar.gz: 0f10f1ffa2f782f018d94d9c24a2311662ee4256f7c68495d233eb018220a023df5732e2fb541d302624ac543928d957f6ed6adb6bf34efe50e31a1f231c7d54
6
+ metadata.gz: aa3f0556520ceb6677816ffa26ec4beac0fa85f660bdebf28578f47b834c43b87ab5208057ca81b96a9e52a9dd3e645e1c406ceab254a2ade5c716fdcb7a497d
7
+ data.tar.gz: 55c2e660ba45abc710cd6d9bc978df5d6c5f23e1e9c058359e719d4d2d43e523af30207fa2ad5b049eb87b698c52c5adf59fe37c4619224986a3c0295d8a408f
data/.rubocop.yml CHANGED
@@ -14,9 +14,11 @@ AllCops:
14
14
 
15
15
  # Layout
16
16
  Layout/LineLength:
17
- Max: 120
17
+ Max: 185
18
18
  AllowedPatterns:
19
19
  - '\A\s*#' # Allow long comment lines
20
+ Exclude:
21
+ - 'vectra.gemspec'
20
22
 
21
23
  Layout/MultilineMethodCallIndentation:
22
24
  EnforcedStyle: indented
@@ -28,7 +30,7 @@ Metrics/BlockLength:
28
30
  - 'vectra.gemspec'
29
31
  - 'Rakefile'
30
32
  - 'benchmarks/**/*'
31
- ExcludedMethods:
33
+ AllowedMethods:
32
34
  - 'included'
33
35
  - 'class_methods'
34
36
 
@@ -82,10 +84,10 @@ Style/FrozenStringLiteralComment:
82
84
  EnforcedStyle: always
83
85
 
84
86
  Style/SymbolArray:
85
- EnforcedStyle: brackets
87
+ Enabled: false
86
88
 
87
89
  Style/WordArray:
88
- EnforcedStyle: brackets
90
+ Enabled: false
89
91
 
90
92
  Style/TrailingCommaInArrayLiteral:
91
93
  EnforcedStyleForMultiline: no_comma
@@ -96,6 +98,9 @@ Style/TrailingCommaInHashLiteral:
96
98
  Style/TrailingCommaInArguments:
97
99
  EnforcedStyleForMultiline: no_comma
98
100
 
101
+ Style/MapIntoArray:
102
+ Enabled: false
103
+
99
104
  # Naming
100
105
  Naming/MethodParameterName:
101
106
  AllowedNames:
@@ -103,6 +108,13 @@ Naming/MethodParameterName:
103
108
  - to
104
109
  - db
105
110
  - io
111
+ - n
112
+
113
+ Naming/PredicatePrefix:
114
+ Enabled: false # Allow has_vector DSL method
115
+
116
+ Naming/MemoizedInstanceVariableName:
117
+ Enabled: false # Allow descriptive names
106
118
 
107
119
  # Lint
108
120
  Lint/MissingSuper:
@@ -111,12 +123,15 @@ Lint/MissingSuper:
111
123
  Lint/ScriptPermission:
112
124
  Enabled: false
113
125
 
126
+ Lint/RedundantDirGlobSort:
127
+ Enabled: false
128
+
114
129
  # RSpec specific
115
130
  RSpec/ExampleLength:
116
- Max: 15
131
+ Max: 25
117
132
 
118
133
  RSpec/MultipleExpectations:
119
- Max: 5
134
+ Max: 10
120
135
 
121
136
  RSpec/MultipleMemoizedHelpers:
122
137
  Max: 10
@@ -125,9 +140,7 @@ RSpec/NestedGroups:
125
140
  Max: 5
126
141
 
127
142
  RSpec/DescribeClass:
128
- Enabled: true
129
- Exclude:
130
- - 'spec/integration/**/*'
143
+ Enabled: false
131
144
 
132
145
  RSpec/ContextWording:
133
146
  Enabled: false
@@ -144,60 +157,87 @@ RSpec/VerifiedDoubles:
144
157
  RSpec/MultipleDescribes:
145
158
  Enabled: false
146
159
 
147
- RSpec/DescribeClass:
148
- Enabled: false # Allow string descriptions
160
+ RSpec/LeadingSubject:
161
+ Enabled: false
149
162
 
150
- # Disable problematic Capybara cop
151
- Capybara/RSpec/PredicateMatcher:
163
+ RSpec/NamedSubject:
164
+ Enabled: false
165
+
166
+ RSpec/SubjectStub:
167
+ Enabled: false
168
+
169
+ RSpec/DescribedClass:
152
170
  Enabled: false
153
171
 
154
172
  # Gemspec
155
173
  Gemspec/DevelopmentDependencies:
156
174
  Enabled: false
157
175
 
158
- # Naming
159
- Naming/MemoizedInstanceVariableName:
160
- Enabled: false # Allow descriptive names
176
+ Gemspec/OrderedDependencies:
177
+ Enabled: false
161
178
 
162
- # Layout
163
- Layout/LineLength:
164
- Max: 185
165
- Exclude:
166
- - 'vectra.gemspec'
179
+ # Capybara - disable all (causes errors and not needed for this project)
180
+ Capybara/RSpec/PredicateMatcher:
181
+ Enabled: false
167
182
 
168
- # Additional disables for auto-correctable minor issues
169
- Style/SymbolArray:
183
+ Capybara/CurrentPathExpectation:
170
184
  Enabled: false
171
185
 
172
- Style/WordArray:
186
+ Capybara/MatchStyle:
173
187
  Enabled: false
174
188
 
175
- Style/MapIntoArray:
189
+ Capybara/NegationMatcher:
176
190
  Enabled: false
177
191
 
178
- Lint/RedundantDirGlobSort:
192
+ Capybara/SpecificActions:
179
193
  Enabled: false
180
194
 
181
- RSpec/LeadingSubject:
195
+ Capybara/SpecificFinders:
182
196
  Enabled: false
183
197
 
184
- RSpec/ExampleLength:
185
- Max: 25
198
+ Capybara/SpecificMatcher:
199
+ Enabled: false
186
200
 
187
- RSpec/MultipleExpectations:
188
- Max: 10
201
+ Capybara/VisibilityMatcher:
202
+ Enabled: false
189
203
 
190
- RSpec/NamedSubject:
204
+ # FactoryBot - not used in this project
205
+ FactoryBot/AttributeDefinedStatically:
191
206
  Enabled: false
192
207
 
193
- RSpec/SubjectStub:
208
+ FactoryBot/ConsistentParenthesesStyle:
194
209
  Enabled: false
195
210
 
196
- RSpec/DescribedClass:
211
+ FactoryBot/CreateList:
197
212
  Enabled: false
198
213
 
199
- Naming/PredicateName:
200
- Enabled: false # Allow has_vector DSL method
214
+ FactoryBot/FactoryClassName:
215
+ Enabled: false
201
216
 
202
- Gemspec/OrderedDependencies:
217
+ FactoryBot/FactoryNameStyle:
218
+ Enabled: false
219
+
220
+ FactoryBot/SyntaxMethods:
221
+ Enabled: false
222
+
223
+ # RSpecRails - not used in this project
224
+ RSpecRails/AvoidSetupHook:
225
+ Enabled: false
226
+
227
+ RSpecRails/HaveHttpStatus:
228
+ Enabled: false
229
+
230
+ RSpecRails/HttpStatus:
231
+ Enabled: false
232
+
233
+ RSpecRails/InferredSpecType:
234
+ Enabled: false
235
+
236
+ RSpecRails/MinitestAssertions:
237
+ Enabled: false
238
+
239
+ RSpecRails/NegationBeValid:
240
+ Enabled: false
241
+
242
+ RSpecRails/TravelAround:
203
243
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2025-01-08
11
+
12
+ ### Added
13
+
14
+ - **Async Batch Operations** (`Vectra::Batch`)
15
+ - Concurrent batch upsert with configurable worker count
16
+ - Automatic chunking of large vector sets
17
+ - Async delete and fetch operations
18
+ - Error aggregation and partial success handling
19
+
20
+ - **Streaming Results** (`Vectra::Streaming`)
21
+ - Lazy enumeration for large query result sets
22
+ - Memory-efficient processing with automatic pagination
23
+ - `query_each` and `query_stream` methods
24
+ - Duplicate detection across pages
25
+
26
+ - **Caching Layer** (`Vectra::Cache` and `Vectra::CachedClient`)
27
+ - In-memory LRU cache with configurable TTL
28
+ - Transparent caching for query and fetch operations
29
+ - Index-level cache invalidation
30
+ - Thread-safe with mutex synchronization
31
+
32
+ - **Connection Pool with Warmup** (`Vectra::Pool`)
33
+ - Configurable pool size and checkout timeout
34
+ - Connection warmup at startup
35
+ - Health checking and automatic reconnection
36
+ - Pool statistics and monitoring
37
+
38
+ - **CI Benchmark Integration**
39
+ - Weekly scheduled benchmark runs
40
+ - PostgreSQL (pgvector) integration in CI
41
+ - Benchmark result artifact storage
42
+
43
+ ### Configuration
44
+
45
+ New configuration options:
46
+ - `cache_enabled` - Enable/disable caching (default: false)
47
+ - `cache_ttl` - Cache time-to-live in seconds (default: 300)
48
+ - `cache_max_size` - Maximum cache entries (default: 1000)
49
+ - `async_concurrency` - Concurrent workers for batch ops (default: 4)
50
+
51
+ ### Dependencies
52
+
53
+ - Added `concurrent-ruby ~> 1.2` for thread-safe operations
54
+
10
55
  ## [0.2.1] - 2025-01-08
11
56
 
12
57
  ### Added
@@ -109,16 +154,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109
154
 
110
155
  ## Planned
111
156
 
112
- ### [0.3.0]
157
+ ### [0.4.0]
113
158
 
114
159
  - Weaviate provider implementation
115
- - Batch operation improvements
116
- - Performance optimizations
117
- - Async operations support
160
+ - Additional similarity metrics
161
+ - Vector quantization support
118
162
 
119
163
  ### [1.0.0]
120
164
 
121
- - Rails integration
122
- - ActiveRecord-like DSL for vector models
123
165
  - Background job integration (Sidekiq, GoodJob)
124
166
  - Production-ready with full documentation
167
+ - Performance monitoring dashboard