Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move io, logger and parser modules to new mip_dmp.utils subpackage #23

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions mip_dmp/cli/mip_dataset_mapper_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion mip_dmp/process/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion mip_dmp/qt5/components/dataset_mapper_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
15 changes: 15 additions & 0 deletions mip_dmp/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -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."""
File renamed without changes.
File renamed without changes.
File renamed without changes.