Coverage for src/jyquickhelper/__init__.py: 79%

14 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-07-02 00:05 +0200

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

2""" 

3@file 

4@brief Module *jyquickhelper*. 

5Helpers for notebooks. 

6""" 

7from .helper_in_notebook import add_notebook_menu, set_notebook_name_theNotebook 

8from .jspy import JSONJS, RenderJS, RenderJsDot, RenderJsVis 

9 

10 

11__version__ = "0.4.219" 

12__author__ = "Xavier Dupré" 

13__github__ = "https://github.com/sdpython/jyquickhelper" 

14__url__ = "http://www.xavierdupre.fr/app/jyquickhelper/helpsphinx/index.html" 

15__license__ = "MIT License" 

16__blog__ = """ 

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

18<opml version="1.0"> 

19 <head> 

20 <title>blog</title> 

21 </head> 

22 <body> 

23 <outline text="jyquickhelper" 

24 title="jyquickhelper" 

25 type="rss" 

26 xmlUrl="http://www.xavierdupre.fr/app/jyquickhelper/helpsphinx/_downloads/rss.xml" 

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

28 </body> 

29</opml> 

30""" 

31 

32 

33def check(log=False): 

34 """ 

35 Checks the library is working. 

36 It raises an exception. 

37 If you want to disable the logs: 

38 

39 @param log if True, display information, otherwise 

40 @return 0 or exception 

41 """ 

42 return True 

43 

44 

45def _setup_hook(use_print=False): 

46 """ 

47 if this function is added to the module, 

48 the help automation and unit tests call it first before 

49 anything goes on as an initialization step. 

50 """ 

51 # we can check many things, needed module 

52 # any others things before unit tests are started 

53 if use_print: 

54 print("Success: _setup_hook")