38
38
from arcticdb .storage_fixtures .in_memory import InMemoryStorageFixture
39
39
from arcticdb .version_store ._normalization import MsgPackNormalizer
40
40
from arcticdb .util .test import create_df
41
+ from arcticdb .arctic import Arctic
41
42
from .util .mark import (
42
43
AZURE_TESTS_MARK ,
43
44
MONGO_TESTS_MARK ,
@@ -281,7 +282,7 @@ def mem_storage() -> Iterator[InMemoryStorageFixture]:
281
282
pytest .param ("real_s3" , marks = REAL_S3_TESTS_MARK ),
282
283
],
283
284
)
284
- def arctic_client (request , encoding_version ):
285
+ def arctic_client (request , encoding_version ) -> Arctic :
285
286
storage_fixture : StorageFixture = request .getfixturevalue (request .param + "_storage" )
286
287
ac = storage_fixture .create_arctic (encoding_version = encoding_version )
287
288
assert not ac .list_libraries ()
@@ -298,15 +299,15 @@ def arctic_client(request, encoding_version):
298
299
pytest .param ("real_s3" , marks = REAL_S3_TESTS_MARK ),
299
300
],
300
301
)
301
- def arctic_client_no_lmdb (request , encoding_version ):
302
+ def arctic_client_no_lmdb (request , encoding_version ) -> Arctic :
302
303
storage_fixture : StorageFixture = request .getfixturevalue (request .param + "_storage" )
303
304
ac = storage_fixture .create_arctic (encoding_version = encoding_version )
304
305
assert not ac .list_libraries ()
305
306
return ac
306
307
307
308
308
309
@pytest .fixture
309
- def arctic_library (arctic_client , lib_name ):
310
+ def arctic_library (arctic_client , lib_name ) -> Arctic :
310
311
return arctic_client .create_library (lib_name )
311
312
312
313
@@ -318,15 +319,15 @@ def arctic_library(arctic_client, lib_name):
318
319
pytest .param ("real_s3" , marks = REAL_S3_TESTS_MARK ),
319
320
],
320
321
)
321
- def basic_arctic_client (request , encoding_version ):
322
+ def basic_arctic_client (request , encoding_version ) -> Arctic :
322
323
storage_fixture : StorageFixture = request .getfixturevalue (request .param + "_storage" )
323
324
ac = storage_fixture .create_arctic (encoding_version = encoding_version )
324
325
assert not ac .list_libraries ()
325
326
return ac
326
327
327
328
328
329
@pytest .fixture
329
- def basic_arctic_library (basic_arctic_client , lib_name ):
330
+ def basic_arctic_library (basic_arctic_client , lib_name ) -> Arctic :
330
331
return basic_arctic_client .create_library (lib_name )
331
332
332
333
@@ -554,17 +555,17 @@ def azure_version_store_dynamic_schema(azure_store_factory):
554
555
555
556
556
557
@pytest .fixture
557
- def lmdb_version_store_string_coercion (version_store_factory ):
558
+ def lmdb_version_store_string_coercion (version_store_factory ) -> NativeVersionStore :
558
559
return version_store_factory ()
559
560
560
561
561
562
@pytest .fixture
562
- def lmdb_version_store_v1 (version_store_factory ):
563
+ def lmdb_version_store_v1 (version_store_factory ) -> NativeVersionStore :
563
564
return version_store_factory (dynamic_strings = True )
564
565
565
566
566
567
@pytest .fixture
567
- def lmdb_version_store_v2 (version_store_factory , lib_name ):
568
+ def lmdb_version_store_v2 (version_store_factory , lib_name ) -> NativeVersionStore :
568
569
library_name = lib_name + "_v2"
569
570
return version_store_factory (dynamic_strings = True , encoding_version = int (EncodingVersion .V2 ), name = library_name )
570
571
@@ -575,31 +576,31 @@ def lmdb_version_store(request):
575
576
576
577
577
578
@pytest .fixture
578
- def lmdb_version_store_prune_previous (version_store_factory ):
579
+ def lmdb_version_store_prune_previous (version_store_factory ) -> NativeVersionStore :
579
580
return version_store_factory (dynamic_strings = True , prune_previous_version = True , use_tombstones = True )
580
581
581
582
582
583
@pytest .fixture
583
- def lmdb_version_store_big_map (version_store_factory ):
584
+ def lmdb_version_store_big_map (version_store_factory ) -> NativeVersionStore :
584
585
return version_store_factory (lmdb_config = {"map_size" : 2 ** 30 })
585
586
586
587
587
588
@pytest .fixture
588
- def lmdb_version_store_very_big_map (version_store_factory ):
589
+ def lmdb_version_store_very_big_map (version_store_factory ) -> NativeVersionStore :
589
590
return version_store_factory (lmdb_config = {"map_size" : 2 ** 35 })
590
591
591
592
@pytest .fixture
592
- def lmdb_version_store_column_buckets (version_store_factory ):
593
+ def lmdb_version_store_column_buckets (version_store_factory ) -> NativeVersionStore :
593
594
return version_store_factory (dynamic_schema = True , column_group_size = 3 , segment_row_size = 2 , bucketize_dynamic = True )
594
595
595
596
596
597
@pytest .fixture
597
- def lmdb_version_store_dynamic_schema_v1 (version_store_factory , lib_name ):
598
+ def lmdb_version_store_dynamic_schema_v1 (version_store_factory , lib_name ) -> NativeVersionStore :
598
599
return version_store_factory (dynamic_schema = True , dynamic_strings = True )
599
600
600
601
601
602
@pytest .fixture
602
- def lmdb_version_store_dynamic_schema_v2 (version_store_factory , lib_name ):
603
+ def lmdb_version_store_dynamic_schema_v2 (version_store_factory , lib_name ) -> NativeVersionStore :
603
604
library_name = lib_name + "_v2"
604
605
return version_store_factory (
605
606
dynamic_schema = True , dynamic_strings = True , encoding_version = int (EncodingVersion .V2 ), name = library_name
@@ -619,27 +620,27 @@ def lmdb_version_store_dynamic_schema(
619
620
620
621
621
622
@pytest .fixture
622
- def lmdb_version_store_empty_types_v1 (version_store_factory , lib_name ):
623
+ def lmdb_version_store_empty_types_v1 (version_store_factory , lib_name ) -> NativeVersionStore :
623
624
library_name = lib_name + "_v1"
624
625
return version_store_factory (dynamic_strings = True , empty_types = True , name = library_name )
625
626
626
627
627
628
@pytest .fixture
628
- def lmdb_version_store_empty_types_v2 (version_store_factory , lib_name ):
629
+ def lmdb_version_store_empty_types_v2 (version_store_factory , lib_name ) -> NativeVersionStore :
629
630
library_name = lib_name + "_v2"
630
631
return version_store_factory (
631
632
dynamic_strings = True , empty_types = True , encoding_version = int (EncodingVersion .V2 ), name = library_name
632
633
)
633
634
634
635
635
636
@pytest .fixture
636
- def lmdb_version_store_empty_types_dynamic_schema_v1 (version_store_factory , lib_name ):
637
+ def lmdb_version_store_empty_types_dynamic_schema_v1 (version_store_factory , lib_name ) -> NativeVersionStore :
637
638
library_name = lib_name + "_v1"
638
639
return version_store_factory (dynamic_strings = True , empty_types = True , dynamic_schema = True , name = library_name )
639
640
640
641
641
642
@pytest .fixture
642
- def lmdb_version_store_empty_types_dynamic_schema_v2 (version_store_factory , lib_name ):
643
+ def lmdb_version_store_empty_types_dynamic_schema_v2 (version_store_factory , lib_name ) -> NativeVersionStore :
643
644
library_name = lib_name + "_v2"
644
645
return version_store_factory (
645
646
dynamic_strings = True ,
@@ -651,14 +652,14 @@ def lmdb_version_store_empty_types_dynamic_schema_v2(version_store_factory, lib_
651
652
652
653
653
654
@pytest .fixture
654
- def lmdb_version_store_delayed_deletes_v1 (version_store_factory ):
655
+ def lmdb_version_store_delayed_deletes_v1 (version_store_factory ) -> NativeVersionStore :
655
656
return version_store_factory (
656
657
delayed_deletes = True , dynamic_strings = True , empty_types = True , prune_previous_version = True
657
658
)
658
659
659
660
660
661
@pytest .fixture
661
- def lmdb_version_store_delayed_deletes_v2 (version_store_factory , lib_name ):
662
+ def lmdb_version_store_delayed_deletes_v2 (version_store_factory , lib_name ) -> NativeVersionStore :
662
663
library_name = lib_name + "_v2"
663
664
return version_store_factory (
664
665
dynamic_strings = True ,
@@ -670,52 +671,52 @@ def lmdb_version_store_delayed_deletes_v2(version_store_factory, lib_name):
670
671
671
672
672
673
@pytest .fixture
673
- def lmdb_version_store_tombstones_no_symbol_list (version_store_factory ):
674
+ def lmdb_version_store_tombstones_no_symbol_list (version_store_factory ) -> NativeVersionStore :
674
675
return version_store_factory (use_tombstones = True , dynamic_schema = True , symbol_list = False , dynamic_strings = True )
675
676
676
677
677
678
@pytest .fixture
678
- def lmdb_version_store_allows_pickling (version_store_factory , lib_name ):
679
+ def lmdb_version_store_allows_pickling (version_store_factory , lib_name ) -> NativeVersionStore :
679
680
return version_store_factory (use_norm_failure_handler_known_types = True , dynamic_strings = True )
680
681
681
682
682
683
@pytest .fixture
683
- def lmdb_version_store_no_symbol_list (version_store_factory ):
684
+ def lmdb_version_store_no_symbol_list (version_store_factory ) -> NativeVersionStore :
684
685
return version_store_factory (col_per_group = None , row_per_segment = None , symbol_list = False )
685
686
686
687
687
688
@pytest .fixture
688
- def lmdb_version_store_tombstone_and_pruning (version_store_factory ):
689
+ def lmdb_version_store_tombstone_and_pruning (version_store_factory ) -> NativeVersionStore :
689
690
return version_store_factory (use_tombstones = True , prune_previous_version = True )
690
691
691
692
692
693
@pytest .fixture
693
- def lmdb_version_store_tombstone (version_store_factory ):
694
+ def lmdb_version_store_tombstone (version_store_factory ) -> NativeVersionStore :
694
695
return version_store_factory (use_tombstones = True )
695
696
696
697
697
698
@pytest .fixture
698
- def lmdb_version_store_tombstone_and_sync_passive (version_store_factory ):
699
+ def lmdb_version_store_tombstone_and_sync_passive (version_store_factory ) -> NativeVersionStore :
699
700
return version_store_factory (use_tombstones = True , sync_passive = True )
700
701
701
702
702
703
@pytest .fixture
703
- def lmdb_version_store_ignore_order (version_store_factory ):
704
+ def lmdb_version_store_ignore_order (version_store_factory ) -> NativeVersionStore :
704
705
return version_store_factory (ignore_sort_order = True )
705
706
706
707
707
708
@pytest .fixture
708
- def lmdb_version_store_small_segment (version_store_factory ):
709
+ def lmdb_version_store_small_segment (version_store_factory ) -> NativeVersionStore :
709
710
return version_store_factory (column_group_size = 1000 , segment_row_size = 1000 , lmdb_config = {"map_size" : 2 ** 30 })
710
711
711
712
712
713
@pytest .fixture
713
- def lmdb_version_store_tiny_segment (version_store_factory ):
714
+ def lmdb_version_store_tiny_segment (version_store_factory ) -> NativeVersionStore :
714
715
return version_store_factory (column_group_size = 2 , segment_row_size = 2 , lmdb_config = {"map_size" : 2 ** 30 })
715
716
716
717
717
718
@pytest .fixture
718
- def lmdb_version_store_tiny_segment_dynamic (version_store_factory ):
719
+ def lmdb_version_store_tiny_segment_dynamic (version_store_factory ) -> NativeVersionStore :
719
720
return version_store_factory (column_group_size = 2 , segment_row_size = 2 , dynamic_schema = True )
720
721
721
722
0 commit comments