Commit ea66f0bd authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Completed move of config and options to new submodule.

parent 81770264
Pipeline #1612 failed with stage
in 10 minutes and 6 seconds
......@@ -2,7 +2,7 @@
from typing import List, Tuple, Union # noqa F401 # flake8 issue
from ..config import GMS_config as CFG
from ..options.config import GMS_config as CFG
from ..misc import exception_handler as EXC_H
from ..algorithms import L1A_P
from ..algorithms import L1B_P
......
......@@ -24,7 +24,7 @@ from ..model.metadata import get_LayerBandsAssignment
from ..model.gms_object import failed_GMS_object
from .pipeline import (L1A_map, L1A_map_1, L1A_map_2, L1A_map_3, L1B_map, L1C_map,
L2A_map, L2B_map, L2C_map)
from ..config import set_config, GMS_config
from ..options.config import set_config, GMS_config
from .multiproc import MAP
from ..misc.definition_dicts import proc_chain, db_jobs_statistics_def
......
......@@ -5,25 +5,25 @@
test_config
-----------
Tests for gms_preprocessing.config
Tests for gms_preprocessing.options.config
"""
import os
from unittest import TestCase
from json import JSONDecodeError, dumps
from gms_preprocessing import __path__
from gms_preprocessing.options.config import get_options
from gms_preprocessing.options.config import JobConfig
from gms_preprocessing.options.config import path_options_default
class Test_get_options(TestCase):
def test_target_is_file_no_validation(self):
opts_dict = get_options(os.path.join(__path__[0], 'options_default.json'), validation=False)
opts_dict = get_options(os.path.join(path_options_default), validation=False)
self.assertIsInstance(opts_dict, dict)
def test_target_is_file_validation(self):
opts_dict = get_options(os.path.join(__path__[0], 'options_default.json'))
opts_dict = get_options(os.path.join(path_options_default))
self.assertIsInstance(opts_dict, dict)
......@@ -62,7 +62,7 @@ class Test_JobConfig(TestCase):
JobConfig(self.jobID, self.db_host, json_config=cfg)
def test_jsonconfig_file(self):
cfg = os.path.join(__path__[0], 'options_default.json')
cfg = os.path.join(path_options_default)
cfg = JobConfig(self.jobID, self.db_host, json_config=cfg)
self.assertIsInstance(cfg, JobConfig)
......
......@@ -13,7 +13,7 @@ import os
from gms_preprocessing import __file__
from gms_preprocessing.io.input_reader import DEM_Creator
from gms_preprocessing.config import set_config
from gms_preprocessing import set_config
from py_tools_ds.geo.projection import EPSG2WKT, WKT2EPSG
......
......@@ -16,7 +16,7 @@ from sklearn.cluster import k_means_
from geoarray import GeoArray # noqa E402 module level import not at top of file
from gms_preprocessing import __file__ # noqa E402 module level import not at top of file
from gms_preprocessing.config import set_config # noqa E402 module level import not at top of file
from gms_preprocessing.options.config import set_config # noqa E402 module level import not at top of file
from gms_preprocessing.algorithms.L2B_P import KMeansRSImage # noqa E402 module level import not at top of file
......
......@@ -13,7 +13,7 @@ import os
import numpy as np
from gms_preprocessing import __file__ # noqa E402 module level import not at top of file
from gms_preprocessing.config import set_config # noqa E402 module level import not at top of file
from gms_preprocessing.options.config import set_config # noqa E402 module level import not at top of file
from gms_preprocessing.algorithms.L2B_P import SpecHomo_Classifier # noqa E402 module level import not at top of file
......
......@@ -16,7 +16,7 @@ from geoarray import GeoArray
from gms_preprocessing import __file__
from gms_preprocessing.io.input_reader import SRF
from gms_preprocessing.config import set_config
from gms_preprocessing.options.config import set_config
from gms_preprocessing.algorithms.L2B_P import SpectralResampler as SR
testdata = os.path.join(os.path.dirname(__file__),
......
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