def test_create_index( elastic_repository: ElasticRepository, resource_loader: Callable[[str], str], ): sdf = iterate_file( Path(resource_loader("resources/rand_queries_small.sdf"))) elastic_repository.index_records(sdf, chunk_size=10)
def test_create_index( elastic_repository_molecule: ElasticRepository, resource_loader, ): sdf = iterate_file( Path(resource_loader("molecules/rand_queries_small.sdf"))) elastic_repository_molecule.index_records(sdf, chunk_size=10)
def loaded_sdf( elastic_repository: ElasticRepository, resource_loader: Callable[[str], str], ) -> IndigoRecord: resource = resource_loader("resources/rand_queries_small.sdf") sdf = iterate_file(Path(resource)) elastic_repository.index_records(sdf, chunk_size=10) time.sleep(5) return next( iterate_file(Path(resource_loader("resources/rand_queries_small.sdf"))) )
def loaded_sdf( elastic_repository_molecule: ElasticRepository, resource_loader, ) -> IndigoRecordMolecule: resource = resource_loader("molecules/rand_queries_small.sdf") sdf = iterate_file(Path(resource)) elastic_repository_molecule.index_records(sdf, chunk_size=10) time.sleep(5) return next( iterate_file(Path(resource_loader("molecules/rand_queries_small.sdf"))) )