3838EXP22 = 'exp22'
3939EXP_BASE_RES = 'exp-base-res-test'
4040TEST_DATA_EXPERIMENTS = [EXP1 , EXP22 , EXP_BASE_RES ]
41+ EXP_NOT_PUBLIC = 'exp-not-public'
4142
4243CHAN_BASE_RES = 'chan-with-base-res'
44+ CHAN_NOT_PUBLIC = 'chan-not-public'
45+
46+ # Channel for cloudvolume tests uses this bucket name.
47+ CLOUD_VOL_BUCKET = 'bossdb-test-data'
48+ CVPATH_CHAN1 = 'col1/exp1/chan1'
49+ CVPATH_CHAN2 = 'col1/exp1/chan2'
50+ CVPATH_ANNO1 = 'col1/exp1/anno1'
51+
52+ # Collection names.
53+ COLL_NOT_PUBLIC = 'col-not-public'
4354
4455class SetupTestDB :
4556 def __init__ (self , super_user = None ):
@@ -127,18 +138,21 @@ def insert_test_data(self):
127138 self .add_collection ('col1' , 'Description for collection1' )
128139 self .add_collection ('col1-22' , 'Description for collection1-22' )
129140 self .add_collection ('col2' , 'Description for collection2' )
141+ self .add_collection (COLL_NOT_PUBLIC , 'Collection to test setting public' , public = False )
130142
131143 self .add_coordinate_frame ('cf1' , 'Description for cf1' , 0 , 1000 , 0 , 1000 , 0 , 1000 , 4 , 4 , 4 )
132144
133145 self .add_experiment ('col1' , EXP1 , 'cf1' , NUM_HIERARCHY_LEVELS , 10 , 1 )
134146 self .add_experiment ('col1' , EXP22 , 'cf1' , NUM_HIERARCHY_LEVELS , 500 , 1 )
135147 self .add_experiment ('col1' , EXP_BASE_RES , 'cf1' , NUM_HIERARCHY_LEVELS , 10 , 1 )
148+ self .add_experiment (COLL_NOT_PUBLIC , EXP_NOT_PUBLIC , 'cf1' , NUM_HIERARCHY_LEVELS , 1 , 1 , public = False )
136149
137150 self .add_channel ('col1' , EXP1 , 'channel1' , 0 , 0 , 'uint8' , 'image' )
138151 self .add_channel ('col1' , EXP1 , 'channel2' , 0 , 0 , 'uint8' , 'image' )
139152 self .add_channel ('col1' , EXP1 , 'channel3' , 0 , 0 , 'uint64' , 'annotation' , ['channel1' ])
140153 self .add_channel ('col1' , EXP_BASE_RES , CHAN_BASE_RES , 0 , BASE_RESOLUTION , 'uint8' , 'image' )
141154 self .add_channel ('col1' , EXP1 , 'layer1' , 0 , 0 , 'uint64' , 'annotation' , ['channel1' ])
155+ self .add_channel (COLL_NOT_PUBLIC , EXP_NOT_PUBLIC , CHAN_NOT_PUBLIC , 0 , 0 , 'uint8' , 'image' , public = False )
142156
143157 def insert_lookup_test_data (self ):
144158 """
@@ -149,7 +163,7 @@ def insert_lookup_test_data(self):
149163 self .add_collection ('col2' , 'Description for collection2' )
150164
151165 self .add_coordinate_frame ('cf1' , 'Description for cf1' , 0 , 1000 , 0 , 1000 , 0 , 1000 , 4 , 4 , 4 )
152-
166+
153167 self .add_experiment ('col1' , 'exp1' , 'cf1' , 10 , 10 , 1 )
154168
155169 # This experiment is _purposed_ named the same as the exp in col1.
@@ -183,22 +197,22 @@ def insert_cloudvolume_test_data(self):
183197 self .add_experiment ('col1' , 'exp1' , 'cf1' , 10 , 500 , 1 )
184198
185199 # Dev Note: Prepopulated cloudvolume layer for uint8 data located at this cloudpath
186- self .add_channel ('col1' , 'exp1' , 'chan1' , 0 , 0 , 'uint8' , 'image' ,
187- storage_type = 'cloudvol' ,
188- bucket = 'bossdb-test-data' ,
189- cv_path = 'col1/exp1/chan1' )
190-
200+ self .add_channel ('col1' , 'exp1' , 'chan1' , 0 , 0 , 'uint8' , 'image' ,
201+ storage_type = 'cloudvol' ,
202+ bucket = CLOUD_VOL_BUCKET ,
203+ cv_path = CVPATH_CHAN1 )
204+
191205 # Dev Note: Prepopulated cloudvolume layer for uint16 data located at this cloudpath
192- self .add_channel ('col1' , 'exp1' , 'chan2' , 0 , 0 , 'uint16' , 'image' ,
193- storage_type = 'cloudvol' ,
194- bucket = 'bossdb-test-data' ,
195- cv_path = 'col1/exp1/chan2' )
196-
206+ self .add_channel ('col1' , 'exp1' , 'chan2' , 0 , 0 , 'uint16' , 'image' ,
207+ storage_type = 'cloudvol' ,
208+ bucket = CLOUD_VOL_BUCKET ,
209+ cv_path = CVPATH_CHAN2 )
210+
197211 # Dev Note: Prepopulated cloudvolume layer for uint16 data located at this cloudpath
198- self .add_channel ('col1' , 'exp1' , 'anno1' , 0 , 0 , 'uint64' , 'annotation' ,
199- storage_type = 'cloudvol' ,
200- bucket = 'bossdb-test-data' ,
201- cv_path = 'col1/exp1/anno1' )
212+ self .add_channel ('col1' , 'exp1' , 'anno1' , 0 , 0 , 'uint64' , 'annotation' ,
213+ storage_type = 'cloudvol' ,
214+ bucket = CLOUD_VOL_BUCKET ,
215+ cv_path = CVPATH_ANNO1 )
202216
203217 def insert_ingest_test_data (self ):
204218
0 commit comments