Coverage for ibllib/__init__.py: 89%

9 statements  

« prev     ^ index     » next       coverage.py v7.5.4, created at 2024-07-08 17:16 +0100

1"""Library implementing the International Brain Laboratory data pipeline.""" 

2import logging 

3import warnings 

4 

5__version__ = '2.38.0' 

6warnings.filterwarnings('always', category=DeprecationWarning, module='ibllib') 

7 

8# if this becomes a full-blown library we should let the logging configuration to the discretion of the dev 

9# who uses the library. However since it can also be provided as an app, the end-users should be provided 

10# with a useful default logging in standard output without messing with the complex python logging system 

11USE_LOGGING = True 

12#%(asctime)s,%(msecs)d 

13if USE_LOGGING: 

14 from iblutil.util import setup_logger 

15 setup_logger(name='ibllib', level=logging.INFO) 

16else: 

17 # deactivate all log calls for use as a library 

18 logging.getLogger('ibllib').addHandler(logging.NullHandler())