Functions

Summary

function

class parent

truncated documentation

GetLogFile

Returns a file name containing the log

GetPath

returns a path where the log file is stored.

GetSepLine

Always returns \n

IsEmptyString

Empty string or not?

IsRepo

Says if it a repository GIT.

IsRepo

says if it a repository SVN

NbImage

Retrieves a name or a url of the image if it is not found in the local folder or a subfolder.

Print

if True, redirect everything which is displayed to the standard output

_NbImage

_NbImage_path

__get_version_from_version_txt

Private function, tries to find a file version.txt which should contains the version number (if svn is not …

__get_version_from_version_txt

private function, tries to find a file version.txt which should contains the version number (if svn is not present) …

_attr_

_cache_url_to_file

Downloads file corresponding to url stored in cache_urls.

_check_source

Check the existence of a file, downloads it if not existing.

_check_sphinx_configuration

Operates some verification on the configuration.

_check_url_file

If url is an url, download the file and return the downloaded if it has already been downloaded, it is not downloaded …

_check_zip_file

This function tests if a file is a zip file (extension zip), if it is the case, it unzips it into another file and return …

_clean_value

_clean_value

_dictionary_to_dataframe

_existing_dump

Loads an existing dump.

_extended_refactoring

Private function which does extra checkings when refactoring pyquickhelper.

_filter_out_warning

Filters out (import) warnings from error.

_first_more_recent

Checks if the first file (opened url) is more recent of the second file (path).

_get_LaTeXTranslator

_get_PyLinterRunV

_get_data

Loads file objects.inv generated by extension sphinx.ext.intersphinx.

_get_dump_default_path

Proposes a default location to dump results about notebooks execution.

_get_dump_default_path

Proposes a default location to dump results about unit tests execution.

_get_file_txt

build a filename knowing an url, same name but in default_path

_get_file_url

build a filename knowing an url

_get_html

Get the HTML representation of an object

_get_password

_hash_url

_html_sidebyside

_html_unsentencise

Joing a list of sentences into HTML for display

_import_conf_extract_parameter

Imports the configuration file and extracts some of the parameters it defines. Fills the following lists.

_mark_span

_mark_text

_markup_diff

Returns a and b with any differences processed by mark. Junk is ignored by the differ.

_measure_documentation_append

_measure_documentation_ratio

_measure_documentation_update

_modified_linux_jenkins

_modified_linux_jenkins_any

_modified_windows_jenkins

_modified_windows_jenkins_27

_modified_windows_jenkins_any

_modifies_coverage_report

_modify_postcontents

_notebook_replacements

Makes some replacements in a notebook.

_optimization_criterion

_optimization_histogram_order

_post_request

_preprocess_notebook

Preprocesses the content of a notebook.

_print_loop_on_children

_private_migrating_doxygen_doc

_private_process_one_file

Copies one file from the source to the documentation folder. It processes some comments in doxygen format (@ param, …

_private_test_style_src

_private_test_style_test

_private_unittest

_process_notebooks_in

The notebook conversion does not handle images from url for pdf and docx. They could be downloaded first …

_process_notebooks_in_private

This function fails in nbconvert 6.0 when the conversion is called more than once. The conversion probably changes the …

_process_notebooks_in_private_cmd

_process_pstats

Converts class Stats into something readable for …

_process_sphinx_in_private_cmd

_run_cmd_filter

_sentencize

Split a string into a list of sentences

_skip

To skip some functions, see Skipping members. …

_sversion

_sversion

_this_fLOG

Other name private to this module.

_tokenize

Split a string into tokens

_unsentencise

Join a list of sentences into a string

_untokenize

Join a list of tokens into a string

add_file_rst

Creates a rst file for every source file.

add_link_to_notebook

Adds a link to the notebook in HTML format and does a little bit of cleaning for various format.

add_missing_development_version

Looks for development version of a given module and add paths to sys.path after having checked they are working. …

add_missing_files

Adds missing files for the documentation, moduletoc.html, blogtoc.html, searchbox.html.

add_rst_links

Replaces words by something like :epkg:'word'.

add_tag_for_slideshow

Modifies a notebook to add tag for a slideshow.

align_seqs

Aligns two sequences of strings after comparing them.

apply_modification_template

See add_file_rst().

apply_template

Extend a string containing templating instructions. See mako or jinja2.

assert_almost_equal_detailed

Calls numpy.testing.assert_almost_equal. Add more informations in the exception message.

available_commands_list

Checks that on command handled by pyquickhelper is part of the arguments.

badge_notebook_coverage

Builds a badge reporting on the notebook coverage. It gives the proportion of run cells.

bigger_role

Defines custom role bigger. The following instructions defines buttons of size 20 (text):

build_all_notebooks_coverage

Creates a rst page (gallery) with links to all notebooks and information about coverage. It relies on function …

build_history

Returns an history of a module.

build_history_from_setup

Builds the history from github and pypi.

build_notebooks_gallery

Creates a rst page (gallery) with links to all notebooks. For each notebook, it creates a snippet.

build_rss

Build a RSS file, the function keeps the blog post (HTML format) from the last month. The summary will only contains …

build_thumbail_in_gallery

Returns rst code for a notebook.

build_venv_cmd

Builds the command line for virtual env.

call_cli_function

Calls a function f given parsed arguments.

call_github_api

Calls GitHub REST API.

call_gui_function

Opens a GUI based on tkinter which allows the user to run a command line through a windows. The function …

call_pandoc

Call pandoc.

change_file_status

Changes the status of all files inside a folder.

change_style

Switches from AaBb into aa_bb.

check

Checks the library is working. It raises an exception if it does not.

check

checks difflibjs is present

check_log

check function noLOG

check_pep8

Checks if PEP8, the function calls command pycodestyle on a specific folder.

check_readme_syntax

Checks the syntax of the file readme.rst which describes a python project.

check_typed_make_field

Overwrites function #L197>`_. `make_field <https://github.com/sphinx-doc/sphinx/blob/master/sphinx/util/docfields.py

checksum_md5

Computes MD5 for a file.

choose_path

Returns the first path which exists in the list.

clean

Does the cleaning.

clean_documentation_for_cli

Cleans the documentation before integrating into a command line documentation.

clean_exts

Cleans files in a folder and subfolders with a given extensions.

clean_files

Cleans \r in files a folder and subfolders with a given extensions. Backslashes are replaces by /. The regular …

clean_notebooks_for_numbers

Upgrades notebooks to the latest format and cleans notebooks execution numbers and rearranges the JSON file.

clean_readme

Clean instructions such as ``

clean_space_for_setup

cli_main_helper

Implements the main commmand line for a module.

clone

Clones a git repository.

close_input_output

Takes the output of open_input_output() and closes streams and return expected values.

code_stat

Returns statistics about the documentation of a module.

compare_module_version

Compares two versions.

compile_history

Compile history and produces a rst file.

compile_latex_output_final

Compiles the latex documents.

compress_cst

Transforms a huge constant into a sequence of compressed binary strings.

compute_truncated_documentation

Produces a truncated version of a docstring.

concat_images

Concatenates images into an image with several rows of images.

configure_backend

local function

content_as_binary

determines if filename is binary or None before transfering it

convert_notebook

Converts a notebook into a specific format.

convert_pandoc_rst

Overwrites convert_pandoc.

convert_sequence_into_batch_file

Converts a sequence of instructions into a batch file.

convert_st_date_to_datetime

Converts a string into a datetime.

copy27_for_setup

Prepares a copy of the source for Python 2.7, assuming the module follows the same design as pyquickhelper. …

copy_download_files

Copies all files mentioned with role downloadlink.

copy_js_files

copy_source_files

Copies all sources files (input) into a folder (output), apply on each of them a modification.

correct_indentation

Tries to improve the indentation before running docutils.

coverage_combine

Merges multiples reports.

create_app

Creates an instance of application class returned by create_fast_api_app(). It checks that environment variables …

create_cli_argument

Adds an argument for argparse.ArgumentParser.

create_cli_parser

Automatically creates a parser based on a function, its signature with annotation and its documentation (assuming …

create_fast_api_app

Creates a REST application based on FastAPI.

create_virtual_env

Creates a virtual environment.

create_visual_diff_through_html

The function uses jsdifflib to create a visual diff. If it was not already …

create_visual_diff_through_html_files

Calls function create_visual_diff_through_html() with the content of two files.

css

Returns style.

custom_ensuredir

Ensure that a path exists.

custom_setup

See Sphinx core events.

datetime2str

Converts a datetime into a string.

decode_outerr

Decodes the output or the error after running a command line instructions.

decompress_cst

Transforms a huge constant produced by function compress_cst() into the original value.

decrypt

Decrypts using class EncryptedBackup. The function relies on module pycrypto, cryptography, …

decrypt_file

Decrypts using class decrypt_stream().

decrypt_stream

Decrypts a file using AES (CBC mode) with the given key. The function relies on module pycrypto, cryptography, …

default_engines

Returns a dictionary with default values for Jenkins server, you should update the path if the proposed path are not …

default_filter_warning

Filters out warnings.

default_jenkins_jobs

Example of a list of jobs for parameter module of function setup_jenkins_server_yml().

default_skip_function

Default skip function for function main_wrapper_tests().

default_sphinx_options

Defines or overrides default options for Sphinx, listed below.

depart_autosignature_node

What to do when leaving a node autosignature_node.

depart_bigger_node

depart bigger_node for format other than html

depart_bigger_node_html

what to do when leaving a node bigger the function should have different behaviour, depending on the format, or …

depart_bigger_node_latex

depart bigger_node for latex

depart_bigger_node_rst

depart bigger_node for rst

depart_blocref_node

depart_blocref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_blocreflist_node

depart_blocref_node

depart_blogpost_node

what to do when leaving a node blogpost the function should have different behaviour, depending on the format, or …

depart_blogpostagg_node

what to do when leaving a node blogpost, the function should have different behaviour, depending on the format, …

depart_blogpostagg_node_html

what to do when leaving a node blogpost, the function should have different behaviour, depending on the format, …

depart_cmdref_node

depart_cmdref_node, see sphinx/writers/html.py. …

depart_cmdreflist_node

depart_cmdref_node

depart_collapse_node

depart collapse_node

depart_collapse_node_html

depart collapse_node

depart_collapse_node_rst

depart collapse_node

depart_downloadlink_node_html

Converts node downloadlink into html.

depart_downloadlink_node_latex

Does notthing.

depart_downloadlink_node_md

Converts node downloadlink into md.

depart_downloadlink_node_rst

Converts node downloadlink into rst.

depart_downloadlink_node_text

Does notthing.

depart_epkg_node

What to do when leaving a node epkg.

depart_exref_node

depart_exref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_exreflist_node

depart_exref_node

depart_faqref_node

depart_faqref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_faqreflist_node

depart_faqref_node

depart_gdot_node_html

depart collapse_node

depart_gdot_node_html_svg

depart collapse_node

depart_gdot_node_rst

depart collapse_node

depart_gitlog_node

depart gitlog_node for format other than html

depart_gitlog_node_html

what to do when leaving a node gitlog the function should have different behaviour, depending on the format, or …

depart_gitlog_node_latex

depart gitlog_node for latex

depart_gitlog_node_rst

depart gitlog_node for rst

depart_mathdef_node

depart_mathdef_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_mathdeflist_node

depart_mathdef_node

depart_nbref_node

depart_nbref_node, see sphinx/writers/html.py. …

depart_nbreflist_node

depart_nbref_node

depart_postcontents_node

does nothing

depart_quote_node

depart_quote_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_quote_node_rst

depart_quote_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_revealjs

build end tag for revealjs

depart_runpython_node

What to do when leaving a node runpython_node the function should have different behaviour, depending on …

depart_rv_code

build end tag for rv_code

depart_rv_note

build end tag for rv_note

depart_rv_small

build end tag for rv_small

depart_sharenet_node

what to do when leaving a node sharenet the function should have different behaviour, depending on the format, or …

depart_sharenet_node_html

what to do when leaving a node sharenet the function should have different behaviour, depending on the format, or …

depart_sharenet_node_rst

what to do when leaving a node sharenet the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_html

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_latex

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_md

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_rst

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_text

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_tocdelay_node

does nothing

depart_todoext_node

depart_todoext_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

depart_todoextlist_node

depart_todoext_node

depart_tpl_node

What to do when leaving a node tpl.

depart_video_node_html

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_video_node_latex

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_video_node_rst

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_video_node_text

What to do when leaving a node video the function should have different behaviour, depending on the format, or …

depart_youtube_node

Youtube node.

detect_encoding

Guesses the encoding from # -*- coding: ....

df2html

Converts the table into a html string.

df2rst

Builds a string in RST format from a dataframe.

dictionary_as_class

Every key of dictionary dico becomes a member of a dummy class.

diff2html

Produces a HTML report with differences between rows1 and rows2.

directive_boolean

local function

do_main

Encrypts or decrypts a folder, see EncryptedBackup. The function relies on module pycrypto, cryptography, …

do_main

Encrypt or decrypt of a file

doc_checking

Example of a doc string.

docstring2html

Converts a docstring into a HTML format.

download

Downloads a small file. If url is an url, it downloads the file and returns the downloaded filename. If it has …

download

Download a file to the folder path_unzip if not present, if the downloading is interrupted, the next time, it will start …

download_images

Downloads images before running the documentation.

download_requirejs

Downloads require.js release.

download_revealjs

Downloads reveal.js release and unzips it.

download_urls_in_folder_content

Iterates on files in folder, parse them, extracts all urls, download them in a folder.

download_urls_iterfile

Same as explore_folder() but iterates on files included in a folder and its subfolders.

edit_distance_string

Computes the edit distance between strings s1 and s2.

edit_distance_text

Computes an edit distance between lines of a text.

encrypt

Encrypts using class EncryptedBackup. The function relies on module pycrypto, cryptography, …

encrypt_file

Encrypts using class encrypt_stream().

encrypt_stream

Encrypts a file using AES (CBC mode) with the given key. The function relies on module pycrypto, cryptography, …

enumerate_cleaned_signature

Removes annotation from a signature extracted with enumerate_extract_signature().

enumerate_closed_issues

Enumerates github issues for a repo and an owner since a given date.

enumerate_convert_yaml_into_instructions

Converts a yml file into sequences of instructions, conditions are interpreted.

enumerate_copy_images_for_slides

Copies images, initial intent was for slides, once converted into html, link to images are relative to the folder …

enumerate_extract_signature

Looks for substring like the following and clean the signature to be able to use function _signature_fromstr.

enumerate_notebooks_link

Looks for all links to a notebook in the documentation.

enumerate_processed_yml

Submits or enumerates jobs based on the content of a yml file.

enumerate_pypi_versions_date

Retrieves version and releases dates for modules hosted on pypi.

enumerate_split_df

Splits a dataframe by columns to display shorter dataframes.

epkg_role

Defines custom role epkg. A list of supported urls must be defined in the configuration file. It wants to replace …

escape_html

Replace special characters “&”, “<” and “>” to HTML-safe sequences. If the optional flag quote is true (the default), …

evaluate_condition

Evaluates a condition inserted in a yml file.

evaluate_template

Evaluate a template given a list of parameters given a list of named parameters.

everything_but_python

Returns True if __pycache__ is not in filename.

example_function_latex

This function only contains an example with latex to check it is working fine.

execute_notebook_list

Executes a list of notebooks.

execute_notebook_list_finalize_ut

Checks the list of results and raises an exception if one failed. This is meant to be used in unit tests.

execute_script

Executes a python script in a separate process.

execute_script_get_local_variables

Executes a script and returns the local variables.

explore_folder

Returns the list of files included in a folder and its subfolders. Returned names can be modified if sub_pattern is …

explore_folder_iterfile

Same as explore_folder() but iterates on files included in a folder and its subfolders.

explore_folder_iterfile_repo

Returns all files present in folder and added to a SVN or GIT repository.

extract_first_title

Extracts the first title (rst format) in a file.

extract_issue_from_history

Extracts issues from exsiting history stored in HISTORY.rst. The pattern must extract from the following lines: …

f1

Addition 1

f2

Addition 2

f3

Addition 3

f4

Addition 4

f5

Addition 5 Parameters ———- a: parameter a b: parameter b Returns ——- a+b

f6

Addition 6 Args: a: parameter a b: parameter b Returns: a+b

fLOG

Builds a message on a single line with the date, it deals with encoding issues.

fLOGFormat

Formats a message.

fast_api_content

Retrieves the dataframes based on partial information. Enumerates a list of dataframes.

fast_api_query

Retrieves the list of dataframe based on partial information.

fast_api_submit

Stores a dataframe into a local stores.

filecontent_to_rst

Produces a .rst file which contains the file. It adds a title and a label based on the filename (no folder included). …

find_coverage_report

Finds all coverage reports in one subfolder.

find_custom_latex_processing

Determines the corresponding post processing function associated to name.

find_dvipng_path

Determines dvipng location.

find_graphviz_dot

Determines the path to graphviz (on Windows), the function tests the existence of versions 34 to 45 assuming it …

find_in_PATH

look into every path mentioned in %PATH% a specific file, it raises an exception if not Found

find_latex_path

Finds latex path. Returns an empty string on linux.

find_link

Finds all links following RST format in a documentation.

find_notebook_kernel

Returns a dict mapping kernel names to resource directories.

find_pandoc_path

Determines pandoc location. Returns an empty string on linux.

find_pdflatex

Returns the executable for latex.

fix_image_page_for_root

Looks for images and fix their path as if the extract were copied to the root.

fix_incomplete_references

Looks into every file .rst or .py for incomplete reference. Example

fix_tkinter_issues_virtualenv

Fix an issue which happens in a virtual environment, see Fix Tcl inside a virtualenv on Windows

format_history

Formats history based on module releases.

ftp_upload

Pushes a file to a server using FTP or SFTP.

generate_changes_repo

Generates a RST tables containing the changes stored by a SVN or GIT repository, the outcome …

generate_help_sphinx

Runs the help generation:

get_additional_paths

Returns a list of paths to add before running the notebooks for a given a list of modules.

get_available_build_commands

Returns commands which build the package.

get_available_setup_commands

Returns the list of commands pyquickhelper implements or allows.

get_build_script

Builds the build script which builds the setup, run the unit tests and the documentation.

get_call_stack

Returns a string showing the call stack when this function is called.

get_cmd_git

Gets the command line used to run git.

get_default_extensions

Returns a list of default extensions.

get_default_javascript

Returns the style of additional style sheets

get_default_standard_extensions

Returns a list of standard extensions.

get_default_stylesheet

Returns the style of additional style sheets.

get_default_value_type

get_encryptor

Returns an encryptor with method encrypt and decrypt.

get_env_state_info

Retrieves an environment and a docname inside a directive.

get_epkg_dictionary

Returns default dictionary for extension epkg_role().

get_estimation_time

Return an estimation of the processing time, it extracts the number in (time=5s) for example.

get_executables_path

Returns the paths to Python, Python Scripts.

get_exporter

Returns the IPython exporter associated to a format.

get_extra_script_command

Produces a script which runs the notebook, a documentation server, which publishes…

get_fLOG

return a logging function

get_file_details

Returns information about a file.

get_file_details_all

Returns information about all files

get_file_last_modification

Returns the last modification of a file.

get_first_line

Expects to find a text file with a line, the function extracts and returns this line.

get_folder

Returns the folder which contains setup.py.

get_help_usage

Returns the usage python setup.py build_sphinx.

get_image_extension

Guesses an extension for an image.

get_index

Retrieves documentation data for a specific module.

get_insetup_functions

Returns function used when a module includes C++ parts.

get_installed_distributions

Directs call to function get_installed_distributions from pip. Return a list of installed Distribution objects. …

get_installed_notebook_extension

Retuns installed extensions.

get_interpreter_path

Returns the interpreter path.

get_intersphinx_mapping

Returns default dictionary for extension sphinx.ext.intersphinx.

get_jenkins_mappings

we assume jobs were set up through a jenkins server, the function looks into folder root and list folder root/.*/dist/html.*

get_jupyter_datadir

Returns the data directory for the notebook.

get_jupyter_extension_dir

Parameters ++++++++++ user : bool [default: False] Whether to check the user’s .ipython/nbextensions directory. …

get_machine

Returns the machine name.

get_master_location

Gets the remote master location.

get_master_location

raises an exception

get_module_objects

Gets all the classes from a module.

get_nb_commits

Returns the number of commit.

get_nb_commits

returns the number of commit

get_notebook_kernel

Returns a KernelSpec.

get_package_info

Calls pip show to retrieve information about packages.

get_packages_list

calls pip list to retrieve the list of packages

get_parser

Defines the way to parse the magic command %encrypt and %decrypt.

get_parser

defines the way to parse the magic command %encrypt and %decrypt

get_password

Restores a password. By default, uses keyring.

get_path

entry-point for sphinx theme.

get_platform

Returns platform if not None, sys.platform otherwise.

get_prefix

Returns a prefix for a file based on time.

get_pyproj_project

returns a string which corresponds to a pyproj project

get_relative_path

private function, return the relative path or absolute between a folder and a file, use relpath

get_repo_log

Gets the latest changes operated on a file in a folder or a subfolder.

get_repo_log

get the latest changes operated on a file in a folder or a subfolder

get_repo_version

Gets the latest check for a specific path or version number based on the date (if usedate is True). If usedate

get_repo_version

get the latest check in number for a specific path

get_script_command

Produces a script which runs a command available through the setup.

get_script_extension

Returns the scripts extension based on the system it is running on.

get_script_module

Produces a script which runs the notebook, a documentation server, which publishes and other scripts.

get_size

Get size.

get_source

get_temp_folder

Creates and returns a local temporary folder to store files when unit testing.

get_test_file

Returns the list of test files.

get_url_content

retrieve the content of an url

get_url_content_timeout

Downloads a file from internet (by default, it assumes it is text information, otherwise, encoding should be None).

get_urls_content_timeout

Downloads data from urls (by default, it assumes it is text information, otherwise, encoding should be None).

get_user

Returns the user name.

getsitepackages

Overwrites function getsitepackages which does not work for a virtual environment.

getstate

Returns the state of an objects. It cannot be used to restore the object.

githublink_role

Defines custom role githublink. The following instruction add a link to the documentation on github.

gitlog_role

Defines custom role gitlog. The following instruction prints out the date of the last modification for the current …

guess_machine_parameter

Determines many parameters on this machine:

guess_module_name

Guesses the module name based on a function.

guess_svg_size

Guesses the dimension of a SVG image.

guess_type_list

guess the type of a list

guess_type_value

Guessees the type of a value.

guess_type_value_type

gzip_files

Compresses all files from an iterator in a zip file and then in a gzip file.

has_been_updated

It assumes dest is a copy of source, it wants to know if the copy is up to date or not.

hash_list

Proposes a hash for the list of arguments.

heading

directives choices for heading tag

html_diffs

Comparares two strings and renders the results as HTML.

html_in_frame

Inserts HTML text into a frame in binary format.

ignore_warnings

Catches warnings.

images2pdf

Merges multiples images into one single pdf. Relies on img2pdf. If an image name contains '*', the function …

import_any_object

Extracts an object defined by its name including the module name.

import_files

Runs all tests in file list li.

import_module

Imports a module using its filename.

import_object

Extracts an object defined by its name including the module name.

import_path

Determines the import path which is the shortest way to import the function. In case the following from module.submodule import function

import_pywin32

For the module pywin32, this function tries to add the path to the DLL to PATH before throwing the exception: …

infer_project_name

Infers a project name based on yml file.

info_blocref

Log information with Sphinx.

init

initialisation

initialize_simpleimages_directive

Initializes the image directives.

initialize_videos_directive

Initializes the video directives.

install_backend_static_files

local function

install_javascript_tools

Installs extra dependencies such as reveal.js.

install_jupyter_kernel

Installs a kernel based on executable (this python by default).

install_node_js_modules

Installs missing dependencies to compile a convert a javascript libraries.

install_notebook_extension

Installs notebook extensions, see install_nbextension

install_python_kernel_for_unittest

Installs a kernel based on this python (sys.executable) for unit test purposes.

interpret_instruction

Interprets an instruction with if statement.

is_file_string

Tells if the string s could be a filename.

is_file_string

Says if the string s could be a filename.

is_html5_writer_available

is_travis_or_appveyor

Tells if is a travis environment or appveyor.

is_url_string

Tells if the string s could be a url.

is_valid_error

Checks if the text written on stderr is an error or not, a local server can push logs on this stream, it looks for …

is_virtual_environment

Tells if the script is run from a virtual environment.

isempty

checks that a string is empty, returns also True if s is NaN

isnan

calls numpy.isnan but checks it is a float first

jenkins_final_postprocessing

Postprocesses a job produced by Jenkins.

latex2rst

convert a latex document into a rst document using pandoc

latex_preamble

Default latex preamble.

load_content_file_with_encoding

Tries different encoding to load a file, tries utf8, latin1 and None.

load_ipython_extension

to allow the call %load_ext pyquickhelper

load_yaml

Loads a yml file (.yml).

local_url

Replaces the url by a local file in a folder or an environment variable if folder is None.

locate_image_documentation

Tries to local an image in the module for help generation in a folder _doc.

main

Implements python -m pyquickhelper <command> <args>.

main

Starts the parser on the file given by the filename as the first argument on the commandline.

main

main

main_run_test

Runs all unit tests, the function looks into the folder _unittest and extract from all files beginning by test_

main_wrapper_tests

Calls function main and throws an exception if it fails.

make_label_index

Builds a sphinx label from a string by removing any odd characters.

make_link_node

Create a link to a github file.

measure_documentation

Measures the fact a module is documented.

measure_documentation_module

Measures the fact a module is documented.

merge_blocref

merge_blocref

merge_cmdref

merge_cmdref

merge_exref

merge_exref

merge_faqref

merge_faqref

merge_mathdef

merge_mathdef

merge_nbref

merge_nbref

merge_todoext

merge_todoext

migrating_doxygen_doc

Migrates the doxygen documentation to rst format.

modifies_init_file

Automatically modifies the init file.

must_build

Determines if the module must be built before running the command in argv.

my_date_conversion

Converts a date into a datetime.

my_date_conversion

Converts a date into a datetime.

nb2html

Converts a notebook into HTML.

nb2rst

Converts a notebook into RST.

nb2slides

Converts a notebook into slides, it copies reveal.js if not present in the folder of the output.

noLOG

does nothing

nodejs_version

Returns node.js version.

notebook_coverage

Extracts a list of notebooks and merges with a list of runs dumped by function execute_notebook_list_finalize_ut(). …

numeric_module_version

Converts a string into a tuple with numbers wherever possible.

open_html_form

The function displays a form onto a notebook, it requires a notebook to be open.

open_input_output

Converts filename and out_filename as streams.

open_script

Open a filename but read the encoding from the first line.

optParse

Parses commandline options.

ospathdirname

Simple o.path.dirname for a specific platform.

ospathjoin

Simple o.path.join for a specific platform.

package2dict

Extracts information from a package.

parse_exception_message

Parses the message embedded in an exception and returns the standard output and error if it can be found.

parse_markdown

parse markdown text and return the markdown object

pickname

Picks the first string non null in the list.

plot_graphviz

Plots a dot graph into a matplotlib plot.

post_process_html_nb_output_static_file

post process the HTML files produced by Sphinx to adjust the static files in notebooks (IPython static files do have …

post_process_html_output

Processes a HTML file generated from the conversion of a notebook.

post_process_latex

Modifies a latex file after its generation by sphinx.

post_process_latex_output

Postprocesses the latex file produced by sphinx.

post_process_latex_output_any

Postprocesses the latex file produced by sphinx.

post_process_python

Modifies a python file after its generation by sphinx.

post_process_python_output

Postprocesses the python file produced by sphinx.

post_process_rst_output

Processes a rst file generated from the conversion of a notebook.

post_process_slides_output

Processes a HTML file generated from the conversion of a notebook.

prepare_file_for_sphinx_help_generation

Prepares all files for Sphinx generation.

private_path_choice

Custom logic to reference other currently developped modules.

private_replacement_

Less copy/paste.

private_script_replacements

Runs last replacements.

process_argv_for_unittest

Interprets command line arguments.

process_blocref_nodes

process_blocref_nodes

process_blocref_nodes_generic

process_blocref_nodes and other kinds of nodes, If the configuration file specifies a variable blocref_include_blocrefs

process_blocrefs

collect all blocrefs in the environment this is not done in the directive itself because it some transformations …

process_blocrefs_generic

collect all blocrefs in the environment this is not done in the directive itself because it some transformations …

process_blogpost_nodes

unused, kept as example

process_cmdref_nodes

process_cmdref_nodes

process_cmdrefs

Collect all cmdrefs in the environment this is not done in the directive itself because it some transformations …

process_copy_images

Looks into every file .rst or .py for images (

process_downloadlink_role

Defines custom role downloadlink. The following instructions defines a link which can be displayed or hidden based …

process_exref_nodes

process_blocref_nodes

process_exrefs

collect all exref in the environment this is not done in the directive itself because it some transformations …

process_faqref_nodes

process_faqref_nodes

process_faqrefs

collect all faqref in the environment this is not done in the directive itself because it some transformations …

process_look_for_tag

Looks for specific information in all files, collect them into one single page.

process_mathdef_nodes

process_mathdef_nodes

process_mathdefs

collect all mathdefs in the environment this is not done in the directive itself because it some transformations …

process_nbref_nodes

process_nbref_nodes

process_nbrefs

Collect all nbref in the environment this is not done in the directive itself because it some transformations …

process_notebooks

Converts notebooks into html, rst, latex, pdf, python, docx using …

process_postcontents

Collect all postcontents in the environment. Look for the section or document which contain them. Put them into …

process_raw_html

Replaces the output of add_menu_notebook

process_standard_options_for_setup

Processes the standard options the module pyquickhelper is able to process assuming the module which calls this function …

process_standard_options_for_setup_help

Prints the added options available through this module.

process_string

Applies the doxypy like process to a string.

process_tocdelay

Collect all tocdelay in the environment. Look for the section or document which contain them. Put them into the …

process_todoext_nodes

process_todoext_nodes

process_todoexts

collect all todoexts in the environment this is not done in the directive itself because it some transformations …

process_var_tag

Processes a docstring using tag @ var, and return a list of 2-tuple

produce_code_graph_changes

Returns the code for a graph which counts the number of changes per week over the last year.

produces_indexes

Produces a file for each category of object found in the module.

profile

Profiles the execution of a function.

profile2df

Converts profiling statistics into a Dataframe.

profile2graph

Converts profiling statistics into a graphs.

profile_stat

Analyses the output of a profiling measured by module cProfile.

publish_coverage_on_codecov

Publishes the coverage report on codecov. See blog post 2016-01-01 Badge for coverage.

purge_blocrefs

purge_blocrefs

purge_blogpost

unused, kept as example

purge_cmdrefs

purge_cmdrefs

purge_exrefs

purge_exrefs

purge_faqrefs

purge_faqrefs

purge_mathsext

purge_mathsext

purge_nbrefs

purge_nbrefs

purge_todosext

purge_todosext

py3to2_convert

converts a script into from python 3 to python 2

py3to2_convert_tree

Converts files in a folder and its subfolders from python 3 to python 2, the function only considers python script (verifying …

py3to2_future

checks that import from __future__ import unicode_literals is always present, the function assumes it is a python …

py3to2_imported_local_modules

See function py3to2_convert_tree() and documentation about parameter unittest_modules.

py3to2_remove_raise_from

Removes expression such as: raise Exception ("...") from e. The function is very basic. It should be done with a …

pyq_sync

Synchronizes a folder using function synchronize_folder().

python_link_doc

Returns a url about Python documentation.

read_content_ufs

Reads the content of a source, whether it is a url, a file, a stream or a string (in that case, it returns the string …

read_csv

Reads a file from a file, it adds the compression zip which was removed in the latest version, see pandas.read_csv. …

read_nb

Reads a notebook and return a NotebookRunner object.

read_nb_json

Reads a notebook from a JSON stream or string.

read_url

Reads the content of a url.

reap_children

Terminates children processes. Copied from psutil. …

rebase

Runs git pull -rebase on a repository.

register_file_magics

Registers magics function, can be called from a notebook.

register_file_magics

Register magics function, can be called from a notebook.

register_file_magics

Register magics function, can be called from a notebook.

register_file_magics

Registers magics functions, can be called from a notebook.

remove_character_under32

Removes ASCII characters in [0..31].

remove_diacritics

Removes diacritics.

remove_execution_number

Removes execution number from a notebook.

remove_extra_spaces_and_pep8

Removes extra spaces in a filename, replaces the file in place.

remove_extra_spaces_folder

Removes extra files in a folder for specific file extensions.

remove_folder

Removes everything in folder top.

remove_kernel

Removes a kernel.

remove_some_indent

Brings text to the left.

remove_undesired_part_for_documentation

Some files contains blocs inserted between the two lines:

removedirs

Removes all files and folders in folder.

repeat_execution

Runs a function on a regular basis. The function is not multithreaded, it returns when all execution are done.

repeat_script

Runs a python script on a regular basis. The function is not multithreaded, it returns when all execution are done. …

repeat_script_execution

Runs a python script on a regular basis. The function is not multithreaded, it returns when all execution are done. …

replace_placeholder_by_recent_blogpost

Replaces a place holder by a list of blog post.

replace_relative_import_fct

Takes a python file and replaces all relative imports it was able to find by an import which can be processed …

repo_ls

Runs ls on a path.

repo_ls

run ls on a path

require

Modified version of function require in node_import.py. …

retrieve_notebooks_in_folder

Retrieves notebooks in a test folder.

rss_update_run_server

Creates a database if it does not exists, add a table for blogs and posts, update the database, starts a server and …

rst2html

Converts a string from RST into HTML format or transformed RST.

rst2rst_folder

Converts a RST string into simplified RST.

run_base_script

Runs a script with the original intepreter even if this function is run from a virtual environment.

run_build_ext

Runs setup.py build_ext --inplace.

run_cmd

Runs a command line and wait for the result.

run_doc_server

Runs the server.

run_js_fct

Assuming script contains some javascript which produces SVG. This functions runs the code.

run_js_with_nodejs

Runs a javascript script with node.js.

run_nbconvert

run_notebook

Runs a notebook end to end, it is inspired from module runipy.

run_notebook

Runs a notebook end to end, it is inspired from module runipy.

run_pylint_for_setup

Applies pylint on subfolder folder.

run_python_script

Executes a script python as a string.

run_script

Runs a script.

run_sphinx_build

run_test_function

Runs test functions from module.

run_unittests_for_setup

Runs the unit tests and computes the coverage, stores the results in _doc/sphinxdoc/source/coverage assuming …

run_venv_script

Runs a script on a vritual environment (the script should be simple).

set_password

Stores a password. By default, uses keyring or keyrings.cryptfile.

set_sphinx_variables

Defines variables for Sphinx.

setup

Initialize

setup

entry-point for sphinx directive.

setup

Create a new directive called autosignature which displays the signature of the function.

setup

setup for bigger (sphinx)

setup

setup for blocref (sphinx)

setup

setup for blogpost (sphinx)

setup

setup for cmdref (sphinx)

setup

setup for collapse (sphinx)

setup

setup for docassert

setup

Initializes the doctree builder.

setup

setup for bigger (sphinx)

setup

setup for bigger (sphinx)

setup

setup for exref (sphinx)

setup

setup for faqref (sphinx)

setup

setup for gdot (sphinx)

setup

setup for githublink (sphinx)

setup

setup for gitlog (sphinx)

setup

setup for image (sphinx)

setup

Initializes builder EnhancedLaTeXBuilder.

setup

setup for mathdef (sphinx)

setup

Initializes the MD builder.

setup

setup for nbref (sphinx)

setup

setup for postcontents (sphinx)

setup

setup for mathdef (sphinx)

setup

Initializes the RST builder.

setup

setup for runpython (sphinx)

setup

setup for sharenet (sphinx)

setup

setup for bigger (sphinx)

setup

setup for tocdelay (sphinx)

setup

Setup for toctree and toctree2 (sphinx).

setup

Setup for todoext (sphinx).

setup

setup for video (sphinx)

setup

Setup for youtube extension.

setup

setup for sphinx extension

setup_docassert

Setup for docassert extension (sphinx). This changes DocFieldTransformer.transform and replaces it by a …

setup_environment_for_help

Modifies environment variables to be able to use external tools such as Inkscape.

setup_jenkins_server_yml

Sets up many jobs on Jenkins.

sharenet_role

Defines custom roles sharenet. The following instructions defines buttons of size 20 ( ) …

skip_run_cmd

Has the same signature as run_cmd() but does nothing.

skipif_appveyor

Skips a unit test if it runs on appveyor.

skipif_azure

Skips a unit test if it runs on azure pipeline.

skipif_azure_linux

Skips a unit test if it runs on azure pipeline on linux.

skipif_azure_macosx

Skips a unit test if it runs on azure pipeline on linux.

skipif_circleci

Skips a unit test if it runs on circleci.

skipif_linux

Skips a unit test if it runs on linux.

skipif_travis

Skips a unit test if it runs on travis.

skipif_vless

Skips a unit test if the version is stricly below version (tuple).

sphinx_add_scripts

copy additional scripts to a folder for sphinx documentation

sphinx_lang

Returns the language defined in the configuration file.

sphinx_rst

Converts a string from RST to HTML or RST format.

split_cmp_command

Splits a command line.

standard_help_for_setup

Standard function which generates help assuming they follow the same design as pyquickhelper.

str2datetime

convert a string into a datetime object, it can be:

svg2img

Converts an image in SVG format.

synchronize_folder

Synchronizes two folders (or copy if the second is empty), it only copies more recent files. It can walk through …

test_notebook_execution_coverage

Runs and tests a specific list of notebooks. The function raises an exception if the execution fails.

testlog

Logs before and after a function is called.

timestamp_to_datetime

convert a timestamp into a datetime

tpl_role

Defines custom role tpl. A template must be specified in the configuration file.

transform_postcontents

The function is called by event 'doctree_resolved'. It looks for every section in page stored in postcontents_all_postcontents

transform_tocdelay

The function is called by event 'doctree_resolved'. It looks for every section in page stored in tocdelay_all_tocdelay

traverse

Enumerates through all children but insert a node whenever digging or leaving the childrens nodes.

try_add_config_value

Add a variables in the config file if it does not have it yet.

un7zip_files

Unzips files from a zip archive compress with 7z.

ungzip_files

Uncompresses files from a gzip file.

unittest_require_at_least

Skips a unit test if the version of one module is not at least the provided version.

unrar_files

Uncompresses files from a rar archive compress with 7z on Window or unrar on linux.

untar_files

Uncompresses files from a tar file.

unzip

Unzips a file into the temporary folder, the function expects to have only one zipped file.

unzip_files

Unzips files from a zip archive.

update_docutils_languages

Updates docutils/languages/en.py with missing labels. It Does it for languages en.

update_notebook_link

A notebook can contain a link [anchor](find://...) and it will be converted into: :ref:... in rst format.

upgrade_notebook

Converts a notebook from version 2 to latest.

uvicorn_app

Runs a uvicorn application. It should be used for testing not for production. Use host:post/redoc or host:post/docs

validate_file_for_help

Accepts or rejects a file to be copied in the help folder.

validate_urls

Checks that all urls are valid.

validate_urls_in_folder

Looks for all files in a folder and return all invalid urls.

venv_install

Installs a package or a list of packages in a virtual environment.

verification_html_file

Verifies a file produced by sphinx and checks basic mistakes.

verification_html_format

dig into folders abd subfolders to find HTML files produced by Sphinx, does some verification to detect errors, …

visit_autosignature_node

What to do when visiting a node autosignature_node.

visit_bigger_node

what to do when visiting a node bigger the function should have different behaviour, depending on the format, …

visit_bigger_node_latex

what to do when visiting a node bigger the function should have different behaviour, depending on the format, …

visit_bigger_node_rst

what to do when visiting a node bigger the function should have different behaviour, depending on the format, …

visit_blocref_node

visit_blocref_node

visit_blocreflist_node

visit_blocreflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

visit_blogpost_node

what to do when visiting a node blogpost the function should have different behaviour, depending on the format, …

visit_blogpostagg_node

what to do when visiting a node blogpost the function should have different behaviour, depending on the format, …

visit_cmdref_node

visit_cmdref_node

visit_cmdreflist_node

visit_cmdreflist_node see sphinx/writers/html.py. …

visit_collapse_node

visit collapse_node

visit_collapse_node_html

visit collapse_node

visit_collapse_node_rst

visit collapse_node

visit_downloadlink_node_html

Converts node downloadlink into html.

visit_downloadlink_node_latex

Does notthing.

visit_downloadlink_node_md

Converts node downloadlink into md.

visit_downloadlink_node_rst

Converts node downloadlink into rst.

visit_downloadlink_node_text

Does notthing.

visit_epkg_node

What to do when visiting a node epkg.

visit_exref_node

visit_exref_node

visit_exreflist_node

visit_exreflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

visit_faqref_node

visit_faqref_node

visit_faqreflist_node

visit_faqreflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

visit_gdot_node_html

visit collapse_node, the function switches between graphviz.py

visit_gdot_node_html_svg

visit collapse_node

visit_gdot_node_rst

visit collapse_node

visit_gitlog_node

what to do when visiting a node gitlog the function should have different behaviour, depending on the format, …

visit_gitlog_node_latex

what to do when visiting a node gitlog the function should have different behaviour, depending on the format, …

visit_gitlog_node_rst

what to do when visiting a node gitlog the function should have different behaviour, depending on the format, …

visit_mathdef_node

visit_mathdef_node

visit_mathdeflist_node

visit_mathdeflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

visit_nbref_node

visit_nbref_node

visit_nbreflist_node

visit_nbreflist_node, see sphinx/writers/html.py. …

visit_postcontents_node

does nothing

visit_quote_node

visit_quote_node

visit_quote_node_rst

visit_quote_node

visit_revealjs

build start tag for revealjs

visit_runpython_node

What to do when visiting a node runpython_node the function should have different behaviour, depending …

visit_rv_code

build start tag for rv_code

visit_rv_note

build start tag for rv_note

visit_rv_small

build start tag for rv_small

visit_sharenet_node

what to do when visiting a node sharenet the function should have different behaviour, depending on the format, …

visit_sharenet_node_rst

what to do when visiting a node sharenet the function should have different behaviour, depending on the format, …

visit_simpleimage_node

Visits a image node. Copies the image.

visit_tocdelay_node

does nothing

visit_todoext_node

visit_todoext_node

visit_todoextlist_node

visit_todoextlist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py

visit_tpl_node

What to do when visiting a node tpl.

visit_video_node

Visits a video node. Copies the video.

visit_youtube_node

Visit youtube node (html).

walk

Does the same as os.walk plus does not go through a sub-folder if this one is big. Folders such build

white_to_transparency

Sets white color as transparency color.

write_module_scripts

Writes a couple of scripts which allow a user to be faster on some tasks or to easily get information about the module. …

write_pyproj

Creates a project pyproj

write_version_for_setup

Extracts the version number, the function writes the files version.txt in this folder.

writes

Write a notebook to a string in a given format in the current nbformat version. This function always writes the notebook …

yaml_load

Parses a yml file with yaml.

yield_sphinx_only_markup_for_pipy

Code from My rst README is not formatted on pypi.python.org. …

zip7_files

If 7z is installed, the function uses it to compress file into 7z format. The file filename_7z must not exist. …

zip_files

Zips all files from an iterator.

zoom_img

Zooms an image.