diff --git a/mip_dmp/cli/mip_dataset_mapper_cli.py b/mip_dmp/cli/mip_dataset_mapper_cli.py index 715d699..8930867 100644 --- a/mip_dmp/cli/mip_dataset_mapper_cli.py +++ b/mip_dmp/cli/mip_dataset_mapper_cli.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - """Standalone script which runs the MIP Dataset Mapper from the terminal.""" import sys @@ -21,15 +20,15 @@ # import logging from mip_dmp.process.mapping import map_dataset -from mip_dmp.io import ( +from mip_dmp.utils.io import ( load_csv, load_excel, # load_excel, load_json, ) -from mip_dmp.parser import create_parser +from mip_dmp.utils.parser import create_parser -# from mip_dmp.logger import setup_logging +# from mip_dmp.utils.logger import setup_logging def main(): diff --git a/mip_dmp/process/embedding.py b/mip_dmp/process/embedding.py index 490573e..43f2333 100644 --- a/mip_dmp/process/embedding.py +++ b/mip_dmp/process/embedding.py @@ -21,7 +21,7 @@ from sklearn.decomposition import PCA # Internal imports -from mip_dmp.io import load_glove_model, load_c2v_model +from mip_dmp.utils.io import load_glove_model, load_c2v_model def glove_embedding(text, glove_model): diff --git a/mip_dmp/qt5/components/dataset_mapper_window.py b/mip_dmp/qt5/components/dataset_mapper_window.py index a0334d2..b10b0a1 100644 --- a/mip_dmp/qt5/components/dataset_mapper_window.py +++ b/mip_dmp/qt5/components/dataset_mapper_window.py @@ -48,7 +48,7 @@ import pkg_resources # Internal imports -from mip_dmp.io import load_mapping_json +from mip_dmp.utils.io import load_mapping_json from mip_dmp.process.mapping import ( map_dataset, MAPPING_TABLE_COLUMNS, diff --git a/mip_dmp/utils/__init__.py b/mip_dmp/utils/__init__.py new file mode 100644 index 0000000..2865c7a --- /dev/null +++ b/mip_dmp/utils/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2023 The HIP team, University Hospital of Lausanne (CHUV), Switzerland & Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Sub-package that contains modules with utility functions for i/o, logging, and script argument parsing.""" diff --git a/mip_dmp/io.py b/mip_dmp/utils/io.py similarity index 100% rename from mip_dmp/io.py rename to mip_dmp/utils/io.py diff --git a/mip_dmp/logger.py b/mip_dmp/utils/logger.py similarity index 100% rename from mip_dmp/logger.py rename to mip_dmp/utils/logger.py diff --git a/mip_dmp/parser.py b/mip_dmp/utils/parser.py similarity index 100% rename from mip_dmp/parser.py rename to mip_dmp/utils/parser.py