Skip to content

Commit

Permalink
change the name
Browse files Browse the repository at this point in the history
  • Loading branch information
benmalef committed Jul 20, 2024
1 parent ca64876 commit e4ef646
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion GANDLF/entrypoints/cli_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import click
from .subcommands import cli_subcommands
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils import gandlf_logger_setup
from GANDLF.utils import logger_setup
from GANDLF import version


Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/collect_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from GANDLF.cli import copyrightMessage
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils import gandlf_logger_setup
from GANDLF.utils import logger_setup


def plot_all(df_training, df_validation, df_testing, output_plot_dir):
Expand Down Expand Up @@ -206,7 +206,7 @@ def new_way(model_dir: str, output_dir: str):
+ "`gandlf_collectStats` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_CollectStats",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from GANDLF.cli import config_generator, copyrightMessage
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _generate_config(config: str, strategy: str, output: str):
Expand Down Expand Up @@ -47,7 +47,7 @@ def new_way(config, strategy, output):
+ "`gandlf_configGenerator` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_ConfigGenerator",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/construct_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from GANDLF.utils import writeTrainingCSV

from GANDLF.cli import copyrightMessage
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _construct_csv(
Expand Down Expand Up @@ -120,7 +120,7 @@ def new_way(
+ "`gandlf_constructCSV` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_ConstructCSV",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/debug_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from GANDLF import __version__
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils import get_git_hash
from GANDLF.utils import gandlf_logger_setup
from GANDLF.utils import logger_setup


def _debug_info():
Expand Down Expand Up @@ -39,7 +39,7 @@ def new_way():
)
def old_way():
_debug_info()
gandlf_logger_setup()
logger_setup()


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
copyrightMessage,
)
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _deploy(
Expand Down Expand Up @@ -158,7 +158,7 @@ def new_way(
+ "`gandlf_deploy` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_Deploy",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/generate_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from GANDLF.cli import copyrightMessage
from GANDLF.cli.generate_metrics import generate_metrics_dict
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _generate_metrics(
Expand Down Expand Up @@ -82,7 +82,7 @@ def new_way(
+ "`gandlf_generateMetrics` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_Metrics",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/optimize_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from GANDLF.cli import copyrightMessage, post_training_model_optimization
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _optimize_model(
Expand Down Expand Up @@ -61,7 +61,7 @@ def new_way(
+ "`gandlf_optimizeModel` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_OptimizeModel",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/patch_miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from GANDLF.cli.patch_extraction import patch_extraction
from GANDLF.cli import copyrightMessage
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _mine_patches(input_path: str, output_dir: str, config: Optional[str]):
Expand Down Expand Up @@ -56,7 +56,7 @@ def new_way(input_csv: str, output_dir: str, config: Optional[str]):
+ "`gandlf_patchMiner` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_PatchMiner",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from deprecated import deprecated
from GANDLF.cli import preprocess_and_save, copyrightMessage
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _preprocess(
Expand Down Expand Up @@ -111,7 +111,7 @@ def new_way(
+ "`gandlf_preprocess` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_Preprocess",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/recover_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from GANDLF.cli import copyrightMessage, recover_config
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _recover_config(model_dir: Optional[str], mlcube: bool, output_file: str):
Expand Down Expand Up @@ -64,7 +64,7 @@ def new_way(model_dir, mlcube, output_file):
+ "`gandlf_recoverConfig` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_RecoverConfig",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from GANDLF import version
from GANDLF.cli import main_run, copyrightMessage
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _run(
Expand Down Expand Up @@ -185,7 +185,7 @@ def new_way(
+ "`gandlf_run` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/split_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from GANDLF.cli import copyrightMessage, split_data_and_save_csvs
from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _split_csv(input_csv: str, output_dir: str, config_path: Optional[str]):
Expand Down Expand Up @@ -65,7 +65,7 @@ def new_way(input_csv: str, output_dir: str, config: Optional[str]):
+ "`gandlf_splitCSV` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
parser = argparse.ArgumentParser(
prog="GANDLF_SplitCSV",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
4 changes: 2 additions & 2 deletions GANDLF/entrypoints/verify_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from deprecated import deprecated

from GANDLF.entrypoints import append_copyright_to_help
from GANDLF.utils.gandlf_logger import gandlf_logger_setup
from GANDLF.utils.logging import logger_setup


def _verify_install():
Expand Down Expand Up @@ -43,7 +43,7 @@ def new_way():
+ "`gandlf_verifyInstall` script would be deprecated soon."
)
def old_way():
gandlf_logger_setup()
logger_setup()
argparse.ArgumentParser(
prog="GANDLF_VerifyInstall",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down
2 changes: 1 addition & 1 deletion GANDLF/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@
)

from .data_splitter import split_data
from .gandlf_logger import gandlf_logger_setup, InfoOnlyFilter
from .logging import logger_setup, InfoOnlyFilter
2 changes: 1 addition & 1 deletion GANDLF/utils/gandlf_logger.py → GANDLF/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _save_logs_in_file(log_file, config_path):
logging.config.dictConfig(config_dict)


def gandlf_logger_setup(log_file=None, config_path="logging_config.yaml") -> None:
def logger_setup(log_file=None, config_path="logging_config.yaml") -> None:
"""
It sets up the logger. Reads from logging_config.
Expand Down

0 comments on commit e4ef646

Please sign in to comment.