Beispiel #1
0
import os
import sphinx_readable_theme
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet

sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))

set_sphinx_variables(__file__, "pyensae", "Xavier Dupré", 2020,
                     "readable", sphinx_readable_theme.get_html_theme_path(),
                     locals(), add_extensions=None,
                     extlinks=dict(issue=('https://github.com/sdpython/pyensae/issues/%s', 'issue')))

blog_root = "http://www.xavierdupre.fr/app/pyensae/helpsphinx/"
blog_background = False

html_context = {
    'css_files': get_default_stylesheet() + ['_static/my-styles.css'],
}

nblinks = {"code-r2python": blog_root + "pyensae/languages/rconverter.html"}

epkg_dictionary = ({
    "antlr4": 'https://github.com/antlr/antlr4',
    "blockdiag": 'http://blockdiag.com/',
    'GeoDataFrame': 'https://geopandas.org/reference/geopandas.GeoDataFrame.html',
    'geopandas': 'https://geopandas.org/',
    "json": 'https://en.wikipedia.org/wiki/JSON',
    "manydataapi": 'http://www.xavierdupre.fr/app/manydataapi/helpsphinx/index.html',
    "networkx": 'https://networkx.github.io/',
    "pyenbc": 'http://www.xavierdupre.fr/app/pyenbc/helpsphinx/index.html',
    "SQLite3": 'https://www.sqlite.org/index.html',
})
Beispiel #2
0
        ("blog", "blog/main_0000.html", True),
        ("index", "genindex"),
    ],
    'navbar_sidebarrel': True,
    'navbar_pagenav': True,
    'navbar_pagenav_name': "Page",
    'bootswatch_theme': "readable",
    'bootstrap_version': "3",
    'source_link_position': "footer",
}

blog_root = "http://www.xavierdupre.fr/app/jupytalk/helpsphinx/"
blog_background = False
pygments_style = 'default'
html_context = {
    'css_files': get_default_stylesheet() + ['_static/my-styles.css'],
}

# https://github.com/peterhudec/foundation-sphinx-theme
# http://docs.guzzlephp.org/en/latest/
# http://sphinx-better-theme.readthedocs.io/en/latest/

epkg_dictionary.update({
    'cartopy': 'https://scitools.org.uk/cartopy/docs/latest/',
    'Custom Extensions to ML.net': 'http://www.xavierdupre.fr/app/machinelearningext/helpsphinx/index.html',
    'C#': 'https://fr.wikipedia.org/wiki/C_sharp',
    'CNTK': 'https://github.com/Microsoft/CNTK',
    'jupytalk': 'http://www.xavierdupre.fr/app/jupytalk/helpsphinx/index.html',
    'Microsoft': 'https://docs.microsoft.com/en-us/',
    'ML.net': "https://github.com/dotnet/machinelearning",
    'networkx': "https://networkx.github.io/",
Beispiel #3
0
import alabaster

sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet

set_sphinx_variables(
    __file__,
    "pyquickhelper",
    "Xavier Dupré",
    2020,
    "alabaster",
    alabaster.get_path(),
    locals(),
    github_repo="https://github.com/sdpython/pyquickhelper.git",
    extlinks=dict(issue=('https://github.com/sdpython/pyquickhelper/issues/%s',
                         'issue ')),
    link_resolve="http://www.xavierdupre.fr/app/")

# there is an issue with this attribute on Anaconda math_number_all
assert math_number_all or not math_number_all
blog_root = "http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/"

# remove notebooks following this pattern
nbneg_pattern = ".*[\\\\/]temp_.*"

html_context = {
    'css_files':
    get_default_stylesheet() +
    ['_static/my-styles.css', '_static/gallery.css'],
}
Beispiel #4
0
    from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet
except ImportError as e:
    import os
    import sys
    paths = "\n".join(sys.path)
    raise ImportError("pyquickhelper is not installed. PYTHONPATH={0}\nsys.path=\n{1}".format(
        os.environ.get("PYTHONPATH", None), paths))

set_sphinx_variables(__file__, "project_name", "author(s)", 2016,
                     "wild", wild_sphinx_theme.get_theme_dir(), locals(), book=True,
                     extlinks=dict(issue=('https://github.com/sdpython/python3_module_template/issues/%s', 'issue')))

blog_root = "http://www.xavierdupre.fr/app/python3_module_template/helpsphinx/"

html_context = {
    'css_files': get_default_stylesheet(),
}


def custom_latex_processing(latex):
    """
    process a latex file and returned the modified version
    
    @param      latex       string
    @return                 string
    """
    if latex is None:
        raise ValueError("Latex is null")
    # this weird modification is only needed when jenkins run a unit test in pyquickhelper (pycode)
    return latex
set_sphinx_variables(
    __file__,
    "python3_module_template",
    "sdpython",
    2018,
    "sphinx_rtd_theme", [sphinx_rtd_theme.get_html_theme_path()],
    locals(),
    book=True,
    extlinks=dict(
        issue=('https://github.com/sdpython/python3_module_template/issues/%s',
               'issue')))

blog_root = "http://www.xavierdupre.fr/app/python3_module_template/helpsphinx/"

html_context = {
    'css_files': get_default_stylesheet(),
}

nblinks = {'slideshowrst': 'http://www.xavierdupre.fr/'}


def custom_latex_processing(latex):
    """
    process a latex file and returned the modified version

    @param      latex       string
    @return                 string
    """
    if latex is None:
        raise ValueError("Latex is null")
    # this weird modification is only needed when jenkins run a unit test in
Beispiel #6
0
    "pymlbenchmark",
    "Xavier Dupré",
    2021,
    "bootstrap",
    sphinx_bootstrap_theme.get_html_theme_path(),
    locals(),
    extlinks=dict(issue=('https://github.com/sdpython/pymlbenchmark/issues/%s',
                         'issue')),
    title="Benchmarks around Machine Learning with Python",
    book=False)

blog_root = "http://www.xavierdupre.fr/app/pymlbenchmark/helpsphinx/"

html_context = {
    'css_files':
    get_default_stylesheet(['_static/my-styles.css', '_static/gallery.css']),
}

html_logo = "phdoc_static/project_ico.png"

language = "en"

mathdef_link_only = True

epkg_dictionary.update({
    'Benchmarks about Machine Learning':
    'http://www.xavierdupre.fr/app/_benchmarks/helpsphinx/index.html',
    'C': "https://en.wikipedia.org/wiki/C_(programming_language)",
    'cffi': "https://cffi.readthedocs.io/en/latest/",
    'cProfile':
    'https://docs.python.org/3/library/profile.html#module-cProfile',
 def test_default_conf(self):
     self.assertNotEmpty(get_default_stylesheet())
     self.assertNotEmpty(get_default_javascript())
     app = MockSphinxApp.create()[0]
     res = custom_setup(app, "x")
     self.assertNotEmpty(res)
 def test_default_conf(self):
     self.assertNotEmpty(get_default_stylesheet())
     self.assertNotEmpty(get_default_javascript())
     app = MockSphinxApp.create()[0]
     res = custom_setup(app, "x")
     self.assertNotEmpty(res)
Beispiel #9
0
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet


sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))

local_template = os.path.join(os.path.abspath(
    os.path.dirname(__file__)), "phdoc_templates")

set_sphinx_variables(__file__, "mlinsights", "Xavier Dupré", 2021,
                     "alabaster", alabaster.get_path(),
                     locals(), extlinks=dict(
                         issue=('https://github.com/sdpython/mlinsights/issues/%s', 'issue')),
                     title="mlinsights", book=True)

blog_root = "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/"
html_context = {'css_files': get_default_stylesheet() +
                ['_static/my-styles.css']}
html_logo = "phdoc_static/project_ico.png"
html_sidebars = {}
language = "en"

mathdef_link_only = True

custom_preamble = """\n
\\newcommand{\\vecteur}[2]{\\pa{#1,\\dots,#2}}
\\newcommand{\\N}[0]{\\mathbb{N}}
\\newcommand{\\indicatrice}[1]{\\mathbf{1\\!\\!1}_{\\acc{#1}}}
\\newcommand{\\infegal}[0]{\\leqslant}
\\newcommand{\\supegal}[0]{\\geqslant}
\\newcommand{\\ensemble}[2]{\\acc{#1,\\dots,#2}}
\\newcommand{\\fleche}[1]{\\overrightarrow{ #1 }}