Change import statements with try except to enable explicit import of submodules from import to avoid conflicts with parent project.

This commit is contained in:
2025-02-22 17:10:53 +01:00
parent c28286a626
commit 821d314cb6
10 changed files with 56 additions and 19 deletions

View File

@ -15,7 +15,12 @@ if dimaPath not in sys.path: # Avoid duplicate entries
import h5py
import yaml
import src.hdf5_ops as hdf5_ops
try:
from dima.src import hdf5_ops as hdf5_ops
except ModuleNotFoundError:
import src.hdf5_ops as hdf5_ops
def load_yaml(review_yaml_file):