Coverage for pyquickhelper/__init__.py: 100%
20 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 02:21 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 02:21 +0200
1# -*- coding: utf-8 -*-
2"""
3@file
4@brief Module *pyquickhelper*.
5Helpers to produce documentation, test notebooks, walk through files,
6sphinx extension, jenkins helpers...
7"""
9__version__ = "1.12.3824"
10__author__ = "Xavier Dupré"
11__github__ = "https://github.com/sdpython/pyquickhelper"
12__url__ = "http://www.xavierdupre.fr/app/pyquickhelper/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="pyquickhelper"
22 title="pyquickhelper"
23 type="rss"
24 xmlUrl="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/_downloads/rss.xml"
25 htmlUrl="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/blog/main_0000.html" />
26 </body>
27</opml>
28"""
31def check():
32 """
33 Checks the library is working.
34 It raises an exception if it does not.
36 @return boolean
37 """
38 from .loghelper import check_log
39 check_log()
40 return True
43def load_ipython_extension(ip): # pragma: no cover
44 """
45 to allow the call ``%load_ext pyquickhelper``
47 @param ip from ``get_ipython()``
48 """
49 from .ipythonhelper.magic_class_example import register_file_magics as freg
50 freg(ip)
51 from .ipythonhelper.magic_class_compress import register_file_magics as creg
52 creg(ip)
53 from .ipythonhelper.magic_class_diff import register_file_magics as dreg
54 dreg(ip)
55 from .ipythonhelper.magic_class_crypt import register_file_magics as ereg
56 ereg(ip)
59def get_fLOG(log=True):
60 """
61 return a logging function
63 @param log True, return @see fn fLOG, otherwise @see fn noLOG
64 @return function
65 """
66 if log:
67 from .loghelper import fLOG
68 return fLOG
69 else:
70 from .loghelper import noLOG
71 return noLOG
74def get_insetup_functions():
75 """
76 Returns function used when a module includes C++ parts.
78 @return tuple of functions
79 """
80 from .pycode.insetup_helper import must_build, run_build_ext
81 return must_build, run_build_ext