Commit bc8f44ff authored by cponcele's avatar cponcele
Browse files

Set relative import to allow sub project integration

parent 7a0352f7
......@@ -2,8 +2,8 @@ import inspect
import re
import netCDF4 as nc
import sonar_netcdf.utils.print_color as p
import sonar_netcdf.sonar_validator_model as nc_model
from .utils import print_color as p
from . import sonar_validator_model as nc_model
class SonarChecker:
......@@ -37,7 +37,7 @@ class SonarChecker:
if not path.endswith("/"):
path = path + "/"
for name in self.classes:
for name in self.classes.items():
pattern = self.classes[name].get_group_path_pattern()
match = re.fullmatch(pattern, path)
if match:
......@@ -116,7 +116,8 @@ class SonarChecker:
if __name__ == "__main__":
import glob, os
import glob
import os
......@@ -4,10 +4,10 @@ import traceback
import netCDF4 as nc
import numpy as np
import matplotlib.pyplot as plt
from .print_color import header, warning, error, pprint
# ensure minimum size for figures
plt.rcParams["figure.dpi"] = 270
from sonar_netcdf.utils.print_color import header, warning, error, pprint
# pylint:disable=redefined-outer-name
......@@ -408,6 +408,8 @@ class NcReader:
# in case we are started in standalone app, for debug only
if __name__ == "__main__":
#due to relative import should be run as a module (python -m ...)
file_path = "D:/data/file/XSF/Movies/"
file_path = "D:/XSF/"
file_path = "D:/data/file/XSF/ExampleSonarData/"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment