Skip to content

Commit

Permalink
fix: revert fixture file, remove fixtures from cargo toml examples
Browse files Browse the repository at this point in the history
  • Loading branch information
marieaurore123 committed Oct 18, 2024
1 parent 803b792 commit 97775d6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
4 changes: 0 additions & 4 deletions rig-lancedb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ futures = "0.3.30"
tokio = "1.40.0"
anyhow = "1.0.89"

[[example]]
name = "fixtures"
required-features = ["rig-core/derive"]

[[example]]
name = "vector_search_local_ann"
required-features = ["rig-core/derive"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ pub struct FakeDefinition {
pub definition: String,
}

fn main() {}

pub fn fake_definitions() -> Vec<FakeDefinition> {
vec![
FakeDefinition {
Expand Down
4 changes: 2 additions & 2 deletions rig-lancedb/examples/vector_search_local_ann.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{env, sync::Arc};

use arrow_array::RecordBatchIterator;
use fixture::{as_record_batch, fake_definitions, schema, FakeDefinition};
use fixtures::{as_record_batch, fake_definitions, schema, FakeDefinition};
use lancedb::index::vector::IvfPqIndexBuilder;
use rig::vector_store::VectorStoreIndex;
use rig::{
Expand All @@ -10,7 +10,7 @@ use rig::{
};
use rig_lancedb::{LanceDbVectorStore, SearchParams};

#[path = "./fixtures.rs"]
#[path = "./fixtures/lib.rs"]
mod fixture;

#[tokio::main]
Expand Down
4 changes: 2 additions & 2 deletions rig-lancedb/examples/vector_search_local_enn.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use std::{env, sync::Arc};

use arrow_array::RecordBatchIterator;
use fixture::{as_record_batch, fake_definitions, schema};
use fixtures::{as_record_batch, fake_definitions, schema};

Check failure on line 4 in rig-lancedb/examples/vector_search_local_enn.rs

View workflow job for this annotation

GitHub Actions / stable / test

unresolved import `fixtures`
use rig::{
embeddings::{builder::EmbeddingsBuilder, embedding::EmbeddingModel},
providers::openai::{Client, TEXT_EMBEDDING_ADA_002},
vector_store::VectorStoreIndexDyn,
};
use rig_lancedb::{LanceDbVectorStore, SearchParams};

#[path = "./fixtures.rs"]
#[path = "./fixtures/lib.rs"]
mod fixture;

#[tokio::main]
Expand Down
4 changes: 2 additions & 2 deletions rig-lancedb/examples/vector_search_s3_ann.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{env, sync::Arc};

use arrow_array::RecordBatchIterator;
use fixture::{as_record_batch, fake_definitions, schema, FakeDefinition};
use fixtures::{as_record_batch, fake_definitions, schema, FakeDefinition};

Check failure on line 4 in rig-lancedb/examples/vector_search_s3_ann.rs

View workflow job for this annotation

GitHub Actions / stable / test

unresolved import `fixtures`
use lancedb::{index::vector::IvfPqIndexBuilder, DistanceType};
use rig::{
embeddings::{builder::EmbeddingsBuilder, embedding::EmbeddingModel},
Expand All @@ -10,7 +10,7 @@ use rig::{
};
use rig_lancedb::{LanceDbVectorStore, SearchParams};

#[path = "./fixtures.rs"]
#[path = "./fixtures/lib.rs"]
mod fixture;

// Note: see docs to deploy LanceDB on other cloud providers such as google and azure.
Expand Down

0 comments on commit 97775d6

Please sign in to comment.