vectra-client 0.1.2 → 0.2.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +23 -3
- data/CHANGELOG.md +23 -0
- data/IMPLEMENTATION_GUIDE.md +686 -0
- data/NEW_FEATURES_v0.2.0.md +459 -0
- data/RELEASE_CHECKLIST_v0.2.0.md +383 -0
- data/Rakefile +12 -0
- data/USAGE_EXAMPLES.md +787 -0
- data/benchmarks/batch_operations_benchmark.rb +117 -0
- data/benchmarks/connection_pooling_benchmark.rb +93 -0
- data/examples/active_record_demo.rb +227 -0
- data/examples/instrumentation_demo.rb +157 -0
- data/lib/generators/vectra/install_generator.rb +115 -0
- data/lib/generators/vectra/templates/enable_pgvector_extension.rb +11 -0
- data/lib/generators/vectra/templates/vectra.rb +79 -0
- data/lib/vectra/active_record.rb +195 -0
- data/lib/vectra/client.rb +60 -22
- data/lib/vectra/configuration.rb +6 -1
- data/lib/vectra/instrumentation/datadog.rb +82 -0
- data/lib/vectra/instrumentation/new_relic.rb +70 -0
- data/lib/vectra/instrumentation.rb +143 -0
- data/lib/vectra/providers/pgvector/connection.rb +5 -1
- data/lib/vectra/retry.rb +156 -0
- data/lib/vectra/version.rb +1 -1
- data/lib/vectra.rb +11 -0
- metadata +45 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23e0684b20e30c7083b21676f50611b82c2926baec2cd2596a02aa9d0f1524b2
|
|
4
|
+
data.tar.gz: 892a0094e23003e7c4647a931dca2b785c243439bad35d3511391df0b3275587
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 356585c134240dc3b36734f85f3a68965ee18f16dfe1437737628d1c8b9c0c9fcbaca11e7092e1328501fd861f1e1c297a8bad38197a1b0033a9af5159ddb075
|
|
7
|
+
data.tar.gz: 0abf8ee4bf16c01065db7dad529ff3da125a0f4bb45a91be19a94842405fdfc8e8c86a9aed7ae153b68323e528111fbea13ffbb2888b1216b1b045cbf1937888
|
data/.rubocop.yml
CHANGED
|
@@ -10,6 +10,7 @@ AllCops:
|
|
|
10
10
|
- 'tmp/**/*'
|
|
11
11
|
- 'bin/**/*'
|
|
12
12
|
- 'node_modules/**/*'
|
|
13
|
+
- 'lib/generators/**/templates/**/*'
|
|
13
14
|
|
|
14
15
|
# Layout
|
|
15
16
|
Layout/LineLength:
|
|
@@ -26,14 +27,18 @@ Metrics/BlockLength:
|
|
|
26
27
|
- 'spec/**/*'
|
|
27
28
|
- 'vectra.gemspec'
|
|
28
29
|
- 'Rakefile'
|
|
30
|
+
- 'benchmarks/**/*'
|
|
31
|
+
ExcludedMethods:
|
|
32
|
+
- 'included'
|
|
33
|
+
- 'class_methods'
|
|
29
34
|
|
|
30
35
|
Metrics/MethodLength:
|
|
31
|
-
Max:
|
|
36
|
+
Max: 30
|
|
32
37
|
Exclude:
|
|
33
38
|
- 'spec/**/*'
|
|
34
39
|
|
|
35
40
|
Metrics/AbcSize:
|
|
36
|
-
Max:
|
|
41
|
+
Max: 30
|
|
37
42
|
Exclude:
|
|
38
43
|
- 'spec/**/*'
|
|
39
44
|
|
|
@@ -103,6 +108,9 @@ Naming/MethodParameterName:
|
|
|
103
108
|
Lint/MissingSuper:
|
|
104
109
|
Enabled: false # Allow classes without super calls
|
|
105
110
|
|
|
111
|
+
Lint/ScriptPermission:
|
|
112
|
+
Enabled: false
|
|
113
|
+
|
|
106
114
|
# RSpec specific
|
|
107
115
|
RSpec/ExampleLength:
|
|
108
116
|
Max: 15
|
|
@@ -174,10 +182,22 @@ RSpec/LeadingSubject:
|
|
|
174
182
|
Enabled: false
|
|
175
183
|
|
|
176
184
|
RSpec/ExampleLength:
|
|
177
|
-
Max:
|
|
185
|
+
Max: 25
|
|
178
186
|
|
|
179
187
|
RSpec/MultipleExpectations:
|
|
180
188
|
Max: 10
|
|
181
189
|
|
|
190
|
+
RSpec/NamedSubject:
|
|
191
|
+
Enabled: false
|
|
192
|
+
|
|
193
|
+
RSpec/SubjectStub:
|
|
194
|
+
Enabled: false
|
|
195
|
+
|
|
196
|
+
RSpec/DescribedClass:
|
|
197
|
+
Enabled: false
|
|
198
|
+
|
|
199
|
+
Naming/PredicateName:
|
|
200
|
+
Enabled: false # Allow has_vector DSL method
|
|
201
|
+
|
|
182
202
|
Gemspec/OrderedDependencies:
|
|
183
203
|
Enabled: false
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.0] - 2025-01-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Instrumentation & Monitoring** - Track all vector operations with New Relic, Datadog, or custom handlers
|
|
15
|
+
- **ActiveRecord Integration** - `has_vector` DSL for seamless Rails model integration with automatic indexing
|
|
16
|
+
- **Rails Generator** - `rails generate vectra:install` for quick setup
|
|
17
|
+
- **Automatic Retry Logic** - Exponential backoff with jitter for transient database errors
|
|
18
|
+
- **Performance Benchmarks** - Measure batch operations and connection pooling performance
|
|
19
|
+
- **Comprehensive Documentation** - USAGE_EXAMPLES.md, IMPLEMENTATION_GUIDE.md with 10+ real-world examples
|
|
20
|
+
|
|
21
|
+
### Improved
|
|
22
|
+
|
|
23
|
+
- All Client methods now instrumented (upsert, query, fetch, update, delete)
|
|
24
|
+
- pgvector Connection module includes retry logic with smart error detection
|
|
25
|
+
- Configuration expanded with instrumentation, pool_size, batch_size, max_retries options
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
- Added USAGE_EXAMPLES.md with e-commerce search, RAG chatbot, duplicate detection examples
|
|
30
|
+
- Added IMPLEMENTATION_GUIDE.md for developers implementing new features
|
|
31
|
+
- Added NEW_FEATURES_v0.2.0.md with migration guide
|
|
32
|
+
|
|
10
33
|
## [0.1.1] - 2025-01-07
|
|
11
34
|
|
|
12
35
|
### Added
|