Commit 3efac12e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Completed move of config and options to new submodule.

Former-commit-id: ea66f0bd
Former-commit-id: a2792c94
parent 27eaea7b
...@@ -8,6 +8,7 @@ from . import algorithms # noqa: E402 ...@@ -8,6 +8,7 @@ from . import algorithms # noqa: E402
from . import io # noqa: E402 from . import io # noqa: E402
from . import misc # noqa: E402 from . import misc # noqa: E402
from . import processing # noqa: E402 from . import processing # noqa: E402
from . import options # noqa: E402
from .options.config import set_config # noqa: E402 from .options.config import set_config # noqa: E402
from .processing.process_controller import process_controller # noqa: E402 from .processing.process_controller import process_controller # noqa: E402
...@@ -19,6 +20,7 @@ __all__ = ['algorithms', ...@@ -19,6 +20,7 @@ __all__ = ['algorithms',
'io', 'io',
'misc', 'misc',
'processing', 'processing',
'config', 'options',
'set_config',
'process_controller', 'process_controller',
] ]
...@@ -19,7 +19,7 @@ from py_tools_ds.geo.coord_trafo import pixelToLatLon ...@@ -19,7 +19,7 @@ from py_tools_ds.geo.coord_trafo import pixelToLatLon
from py_tools_ds.geo.map_info import mapinfo2geotransform from py_tools_ds.geo.map_info import mapinfo2geotransform
from py_tools_ds.geo.projection import EPSG2WKT from py_tools_ds.geo.projection import EPSG2WKT
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from . import geoprocessing as GEOP from . import geoprocessing as GEOP
from ..io import output_writer as OUT_W from ..io import output_writer as OUT_W
from ..misc import helper_functions as HLP_F from ..misc import helper_functions as HLP_F
......
...@@ -27,7 +27,7 @@ from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry, transform_any ...@@ -27,7 +27,7 @@ from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry, transform_any
from py_tools_ds.geo.projection import prj_equal, EPSG2WKT, WKT2EPSG from py_tools_ds.geo.projection import prj_equal, EPSG2WKT, WKT2EPSG
from py_tools_ds.geo.vector.topology import get_overlap_polygon from py_tools_ds.geo.vector.topology import get_overlap_polygon
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..model.gms_object import GMS_object from ..model.gms_object import GMS_object
from .L1A_P import L1A_object from .L1A_P import L1A_object
from ..misc import database_tools as DB_T from ..misc import database_tools as DB_T
......
...@@ -15,7 +15,7 @@ import numpy as np ...@@ -15,7 +15,7 @@ import numpy as np
from geoarray import GeoArray from geoarray import GeoArray
from py_tools_ds.geo.map_info import mapinfo2geotransform from py_tools_ds.geo.map_info import mapinfo2geotransform
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from . import geoprocessing as GEOP from . import geoprocessing as GEOP
from .L1B_P import L1B_object from .L1B_P import L1B_object
from ..model.metadata import get_LayerBandsAssignment from ..model.metadata import get_LayerBandsAssignment
......
...@@ -19,7 +19,7 @@ from sklearn.cluster import k_means_ # noqa F401 # flake8 issue ...@@ -19,7 +19,7 @@ from sklearn.cluster import k_means_ # noqa F401 # flake8 issue
from geoarray import GeoArray # noqa F401 # flake8 issue from geoarray import GeoArray # noqa F401 # flake8 issue
from py_tools_ds.processing.progress_mon import ProgressBar from py_tools_ds.processing.progress_mon import ProgressBar
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..io.input_reader import SRF # noqa F401 # flake8 issue from ..io.input_reader import SRF # noqa F401 # flake8 issue
from ..misc.logging import GMS_logger from ..misc.logging import GMS_logger
from .L2A_P import L2A_object from .L2A_P import L2A_object
......
...@@ -69,7 +69,7 @@ class _FMASK_Runner(object): ...@@ -69,7 +69,7 @@ class _FMASK_Runner(object):
@property @property
def is_GMSConfig_available(self): def is_GMSConfig_available(self):
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
try: try:
if CFG is not None: if CFG is not None:
return True return True
...@@ -349,7 +349,7 @@ class FMASK_Runner_Sentinel2(_FMASK_Runner): ...@@ -349,7 +349,7 @@ class FMASK_Runner_Sentinel2(_FMASK_Runner):
given.""" given."""
if not self._granule_ID and self.scene_ID and self.scene_ID != -9999 and self.is_GMSConfig_available: if not self._granule_ID and self.scene_ID and self.scene_ID != -9999 and self.is_GMSConfig_available:
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
res = get_info_from_postgreSQLdb(CFG.conn_database, 'scenes', ['entityid'], {'id': self.scene_ID}) res = get_info_from_postgreSQLdb(CFG.conn_database, 'scenes', ['entityid'], {'id': self.scene_ID})
assert len(res) != 0, \ assert len(res) != 0, \
"Invalid SceneID given - no corresponding scene with the ID=%s found in database.\n" % self.scene_ID "Invalid SceneID given - no corresponding scene with the ID=%s found in database.\n" % self.scene_ID
......
...@@ -41,7 +41,7 @@ from geoarray import GeoArray ...@@ -41,7 +41,7 @@ from geoarray import GeoArray
from py_tools_ds.geo.coord_grid import snap_bounds_to_pixGrid from py_tools_ds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.geo.coord_trafo import transform_utm_to_wgs84, transform_wgs84_to_utm, mapXY2imXY, imXY2mapXY from py_tools_ds.geo.coord_trafo import transform_utm_to_wgs84, transform_wgs84_to_utm, mapXY2imXY, imXY2mapXY
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..misc.definition_dicts import get_outFillZeroSaturated from ..misc.definition_dicts import get_outFillZeroSaturated
__author__ = 'Daniel Scheffler', 'Robert Behling' __author__ = 'Daniel Scheffler', 'Robert Behling'
......
...@@ -27,7 +27,7 @@ from py_tools_ds.geo.coord_calc import corner_coord_to_minmax ...@@ -27,7 +27,7 @@ from py_tools_ds.geo.coord_calc import corner_coord_to_minmax
from py_tools_ds.geo.coord_trafo import transform_any_prj from py_tools_ds.geo.coord_trafo import transform_any_prj
from py_tools_ds.numeric.vector import find_nearest from py_tools_ds.numeric.vector import find_nearest
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..model import metadata as META from ..model import metadata as META
from ..misc import path_generator as PG from ..misc import path_generator as PG
from ..misc import helper_functions as HLP_F from ..misc import helper_functions as HLP_F
......
...@@ -32,7 +32,7 @@ import warnings ...@@ -32,7 +32,7 @@ import warnings
import logging import logging
from itertools import chain from itertools import chain
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..misc import helper_functions as HLP_F from ..misc import helper_functions as HLP_F
from ..misc.definition_dicts import \ from ..misc.definition_dicts import \
get_mask_classdefinition, get_mask_colormap, get_outFillZeroSaturated, dtype_lib_Python_IDL get_mask_classdefinition, get_mask_colormap, get_outFillZeroSaturated, dtype_lib_Python_IDL
......
...@@ -22,7 +22,7 @@ from shapely.geometry import Polygon, box, MultiPolygon ...@@ -22,7 +22,7 @@ from shapely.geometry import Polygon, box, MultiPolygon
from sqlalchemy import create_engine from sqlalchemy import create_engine
from sqlalchemy.types import to_instance, TypeEngine from sqlalchemy.types import to_instance, TypeEngine
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from . import path_generator as PG from . import path_generator as PG
from .definition_dicts import proc_chain from .definition_dicts import proc_chain
......
...@@ -5,7 +5,7 @@ import re ...@@ -5,7 +5,7 @@ import re
import numpy as np import numpy as np
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
__author__ = 'Daniel Scheffler' __author__ = 'Daniel Scheffler'
......
...@@ -8,7 +8,7 @@ except ImportError: ...@@ -8,7 +8,7 @@ except ImportError:
import gdal import gdal
from logging import Logger from logging import Logger
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from .spatial_index_mediator import SpatialIndexMediatorServer from .spatial_index_mediator import SpatialIndexMediatorServer
from .exceptions import GMSEnvironmentError, MissingNonPipLibraryWarning from .exceptions import GMSEnvironmentError, MissingNonPipLibraryWarning
......
...@@ -11,7 +11,7 @@ from typing import Union, List # noqa F401 # flake8 issue ...@@ -11,7 +11,7 @@ from typing import Union, List # noqa F401 # flake8 issue
from ..model.gms_object import GMS_object # noqa F401 # flake8 issue from ..model.gms_object import GMS_object # noqa F401 # flake8 issue
from ..model.gms_object import failed_GMS_object from ..model.gms_object import failed_GMS_object
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..misc import database_tools as DB_T from ..misc import database_tools as DB_T
from .definition_dicts import db_jobs_statistics_def, proc_chain from .definition_dicts import db_jobs_statistics_def, proc_chain
......
...@@ -29,7 +29,7 @@ from matplotlib import pyplot as plt ...@@ -29,7 +29,7 @@ from matplotlib import pyplot as plt
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from xml.etree.ElementTree import QName from xml.etree.ElementTree import QName
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from . import database_tools as DB_T from . import database_tools as DB_T
from ..algorithms.L1A_P import L1A_object from ..algorithms.L1A_P import L1A_object
from ..algorithms.L1B_P import L1B_object from ..algorithms.L1B_P import L1B_object
......
...@@ -7,7 +7,7 @@ import warnings ...@@ -7,7 +7,7 @@ import warnings
import uuid import uuid
from logging import Logger from logging import Logger
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from .definition_dicts import get_GMS_sensorcode from .definition_dicts import get_GMS_sensorcode
......
...@@ -38,7 +38,7 @@ from ..model.metadata import METADATA, get_dict_LayerOptTherm, metaDict_to_metaO ...@@ -38,7 +38,7 @@ from ..model.metadata import METADATA, get_dict_LayerOptTherm, metaDict_to_metaO
from ..model.dataset import Dataset from ..model.dataset import Dataset
from ..misc import path_generator as PG from ..misc import path_generator as PG
from ..misc import database_tools as DB_T from ..misc import database_tools as DB_T
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
from ..algorithms import geoprocessing as GEOP from ..algorithms import geoprocessing as GEOP
from ..io import input_reader as INP_R from ..io import input_reader as INP_R
from ..io import output_writer as OUT_W from ..io import output_writer as OUT_W
......
...@@ -22,7 +22,7 @@ from pyorbital import astronomy ...@@ -22,7 +22,7 @@ from pyorbital import astronomy
from py_tools_ds.geo.map_info import geotransform2mapinfo from py_tools_ds.geo.map_info import geotransform2mapinfo
from py_tools_ds.geo.projection import WKT2EPSG from py_tools_ds.geo.projection import WKT2EPSG
from gms_preprocessing.config import GMS_config as CFG from gms_preprocessing.options.config import GMS_config as CFG
from gms_preprocessing.io.input_reader import open_specific_file_within_archive, Solar_Irradiance_reader, SRF_reader from gms_preprocessing.io.input_reader import open_specific_file_within_archive, Solar_Irradiance_reader, SRF_reader
from gms_preprocessing.io.output_writer import enviHdr_keyOrder from gms_preprocessing.io.output_writer import enviHdr_keyOrder
from gms_preprocessing.algorithms import geoprocessing as GEOP from gms_preprocessing.algorithms import geoprocessing as GEOP
......
...@@ -4,7 +4,7 @@ import shapely ...@@ -4,7 +4,7 @@ import shapely
from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry
from shapely.geometry import Polygon from shapely.geometry import Polygon
from gms_preprocessing.config import GMS_config as CFG from gms_preprocessing.options.config import GMS_config as CFG
from gms_preprocessing.misc import database_tools as DB_T from gms_preprocessing.misc import database_tools as DB_T
from gms_preprocessing.misc import helper_functions as HLP_F from gms_preprocessing.misc import helper_functions as HLP_F
from gms_preprocessing.algorithms import geoprocessing as GEOP from gms_preprocessing.algorithms import geoprocessing as GEOP
......
...@@ -206,18 +206,18 @@ class JobConfig(object): ...@@ -206,18 +206,18 @@ class JobConfig(object):
else: else:
# software test mode, the repository should be self-contained -> use only relative paths # software test mode, the repository should be self-contained -> use only relative paths
self.path_fileserver = self.absP('../tests/data/') self.path_fileserver = self.absP('../../tests/data/')
self.path_archive = self.absP('../tests/data/archive_data/') self.path_archive = self.absP('../../tests/data/archive_data/')
self.path_procdata_scenes = self.absP('../tests/data/output_scenes/') self.path_procdata_scenes = self.absP('../../tests/data/output_scenes/')
self.path_procdata_MGRS = self.absP('../tests/data/output_mgrs_tiles/') self.path_procdata_MGRS = self.absP('../../tests/data/output_mgrs_tiles/')
self.path_earthSunDist = self.absP('./database/earth_sun_distance/Earth_Sun_distances_per_day_edited.csv', ) self.path_earthSunDist = self.absP('../database/earth_sun_distance/Earth_Sun_distances_per_day_edited.csv')
self.path_SRFs = self.absP('./database/srf/') self.path_SRFs = self.absP('../database/srf/')
self.path_cloud_classif = self.absP('./database/cloud_classifier/') self.path_cloud_classif = self.absP('../database/cloud_classifier/')
self.path_solar_irr = self.absP( self.path_solar_irr = self.absP(
'./database/solar_irradiance/SUNp1fontenla__350-2500nm_@0.1nm_converted.txt') '../database/solar_irradiance/SUNp1fontenla__350-2500nm_@0.1nm_converted.txt')
self.path_ECMWF_db = self.absP('../tests/data/processed_ECMWF/') self.path_ECMWF_db = self.absP('../../tests/data/processed_ECMWF/')
self.path_benchmarks = self.absP('./benchmarks/') self.path_benchmarks = self.absP('../benchmarks/')
self.path_job_logs = self.absP('./logs/job_logs/') self.path_job_logs = self.absP('../logs/job_logs/')
########################### ###########################
# processor configuration # # processor configuration #
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
from multiprocessing import Pool from multiprocessing import Pool
from itertools import chain from itertools import chain
from ..config import GMS_config as CFG from ..options.config import GMS_config as CFG
__author__ = 'Daniel Scheffler' __author__ = 'Daniel Scheffler'
......
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