File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import asyncio
22import contextlib
3+ import itertools
34import tempfile
4- from pathlib import Path
55
66import awkward
77import h5py
1111import sparse
1212import tifffile
1313
14- from tiled .catalog import from_uri
14+ from tiled .catalog import in_memory
1515from tiled .client import Context , from_context
1616from tiled .client .register import register
1717from tiled .client .smoke import read
2020from tiled .queries import Key
2121from tiled .server .app import build_app
2222
23+ unique_database_num = itertools .count (1 )
24+
2325
2426@contextlib .contextmanager
2527def client_factory (readable_storage = None ):
2628 with tempfile .TemporaryDirectory () as tempdir :
27- catalog = from_uri (
28- Path ( tempdir , "catalog.db" ) ,
29+ catalog = in_memory (
30+ named_memory = f"database { next ( unique_database_num ) } " ,
2931 writable_storage = str (tempdir ),
3032 readable_storage = readable_storage ,
31- init_if_not_exists = True ,
3233 )
3334 app = build_app (catalog )
3435 with Context .from_app (app ) as context :
You can’t perform that action at this time.
0 commit comments