Coverage for src/lightmlboard/__init__.py: 77%

13 statements  

« prev     ^ index     » next       coverage.py v6.4.1, created at 2022-06-05 11:12 +0200

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Module *lightmlboard*. 

5Custom Machine Learning Leaderbord for a competition. 

6""" 

7from .appml import LightMLBoard 

8 

9__version__ = "0.2.104" 

10__author__ = "Xavier Dupré" 

11__github__ = "https://github.com/sdpython/lightmlboard" 

12__url__ = "http://www.xavierdupre.fr/app/lightmlboard/helpsphinx/index.html" 

13__license__ = "MIT License" 

14__blog__ = """ 

15<?xml version="1.0" encoding="UTF-8"?> 

16<opml version="1.0"> 

17 <head> 

18 <title>blog</title> 

19 </head> 

20 <body> 

21 <outline text="lightmlboard" 

22 title="lightmlboard" 

23 type="rss" 

24 xmlUrl="http://www.xavierdupre.fr/app/lightmlboard/helpsphinx/_downloads/rss.xml" 

25 htmlUrl="http://www.xavierdupre.fr/app/lightmlboard/helpsphinx/blog/main_0000.html" /> 

26 </body> 

27</opml> 

28""" 

29 

30 

31def check(log=False): 

32 """ 

33 Checks the library is working. 

34 It raises an exception. 

35 If you want to disable the logs: 

36 

37 @param log if True, display information, otherwise 

38 @return 0 or exception 

39 """ 

40 return True 

41 

42 

43def _setup_hook(use_print=False): 

44 """ 

45 if this function is added to the module, 

46 the help automation and unit tests call it first before 

47 anything goes on as an initialization step. 

48 """ 

49 # we can check many things, needed module 

50 # any others things before unit tests are started 

51 if use_print: 

52 print("Success: _setup_hook")