File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
# This file is part of IMAS-Python.
2
2
# You should have received the IMAS-Python LICENSE file with this project.
3
- """Logic for interacting with IMAS Data Entries."""
3
+ """Logic for interacting with IMAS Data Entries.
4
+ """
4
5
5
6
import logging
6
7
import os
@@ -188,10 +189,10 @@ def __init__(
188
189
@staticmethod
189
190
def _select_implementation (uri : Optional [str ]) -> Type [DBEntryImpl ]:
190
191
"""Select which DBEntry implementation to use based on the URI."""
191
- if not uri or uri .startswith ("imas:" ):
192
- from imas .backends .imas_core .db_entry_al import ALDBEntryImpl as impl
193
- else : # Assume it's a netCDF file or NCZarr URI
192
+ if uri and uri .endswith (".nc" ) and not uri .startswith ("imas:" ):
194
193
from imas .backends .netcdf .db_entry_nc import NCDBEntryImpl as impl
194
+ else :
195
+ from imas .backends .imas_core .db_entry_al import ALDBEntryImpl as impl
195
196
return impl
196
197
197
198
def __enter__ (self ):
You can’t perform that action at this time.
0 commit comments