from .file_utils import class_from_package, camel2snake, add_sep, make_subdirectory, find_lang_file, setup_local_workdir, is_running_under_slurm, is_tmp_path, resolve_output_dir, resolve_path, RobustUnpickler, pickle_robust_load
from .helm_utils import MonomerLibrary, HELMConverter
from .logging_utils import CSVHandler, NotListFilter, ListFilter, make_logger, log_memory_usage, flush_delayed_logger
from .math_utils import set_seed, append_pareto_optimality_to_df, pareto_optimal_df, apply_top_p, apply_sharpness, moving_average, moving_average_and_std, max_gauss, min_gauss, rectangular, PointCurve
from .mol_utils import is_same_mol, get_main_mol, remove_isotopes, print_atoms_and_labels, draw_mol, draw_mols, top_k_df, append_similarity_to_df, mol_validity_check, convert_to_canonical
from .plot_utils import plot_xy, plot_csv

# lazy import
def __getattr__(name):
    if name == "conf_from_yaml":
        from .yaml_utils import conf_from_yaml
        return conf_from_yaml
    if name == "generator_from_conf":
        from .yaml_utils import generator_from_conf
        return generator_from_conf
    if name == "save_yaml":
        from .yaml_utils import save_yaml
        return save_yaml
    raise AttributeError(f"module {__name__} has no attribute {name}")