HPS-MC
__init__.py
Go to the documentation of this file.
1 import shutil
2 
3 from ._config import _read_global_config
4 from ._logging import _setup_logging
5 
6 # To play nice with Lustre, but only effective as of python 3.8
7 shutil.COPY_BUFSIZE = 1024 * 1024
8 
9 # Load the global configuration settings.
10 # Accessing this variable from other modules like job is fine.
11 global_config, _config_files = _read_global_config()
12 
13 # Setup global logging.
14 # This should not be accessed directly from other modules.
15 _global_logger = _setup_logging(global_config)
16 
17 # Print a log message showing what global config files were found and loaded.
18 if len(_config_files) > 0:
19  _global_logger.info("Config files found: {}".format(_config_files))
20 else:
21  _global_logger.warn("No config files were found at default locations! (`~/.hpsmc` or `.hpsmc` in your current directory)")
22 
23 # import hadd down here so global_config is defined
24 from ._hadd import hadd # nopep8
def _read_global_config()
Read global configuration files.
Definition: _config.py:12
def _setup_logging(config)
Definition: _logging.py:8