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
#"c:/data/datasets/netcdfInspector/GLOBE_MERGED_GAZCOGNE3_003_20180829_061940_1.xsf_TO_GAZCOGNE3_003_20180829_070941_1.xsf_v783u7_w_ES333-7C-333000.nc"
......
......@@ -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/Sardine_schools_1.xsf.nc"
file_path = "D:/XSF/0006_20200504_111056_FG_EM122.xsf.nc"
file_path = "D:/data/file/XSF/ExampleSonarData/test90-D20171107-T195133.nc"
......
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