Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _doc/sphinxdoc/source/tutorial/mainf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Main Functionalities
* help generation including notebook conversion
(see :func:`generate_help_sphinx <pyquickhelper.helpgen.sphinx_main.generate_help_sphinx>`)
* simple server to server sphinx documentation
(see :func:`run_doc_server <pyquickhelper.serverdoc.documentation_server.run_doc_server>`)
(see :func:`run_doc_server <pyquickhelper.server.documentation_server.run_doc_server>`)
* function :func:`rst2html <pyquickhelper.helpgen.sphinxm_convert_doc_helper.rst2html>`
to convert RST into HTML
* Sphinx directive :class:`BlogPostDirective <pyquickhelper.sphinxext.sphinx_blog_extension.BlogPostDirective>`
Expand Down
4 changes: 2 additions & 2 deletions _unittests/ut_helpgen/data/html_example2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,14 @@ to display it in a notebook.</p>
<div class="section" id="run-a-local-server-which-serves-the-documentation">
<span id="lm-runalocalserverwhichservesthedocumentation"></span><h2><a class="toc-backref" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#id18">run a local server which serves the documentation</a><a class="headerlink" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#run-a-local-server-which-serves-the-documentation" title="Permalink to this headline">¶</a></h2>
<p>The following code will create a local server: <a class="reference external" href="http://localhost:8079/pyquickhelper/">http://localhost:8079/pyquickhelper/</a>.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">this_fold</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">pyquickhelper</span><span class="o">.</span><span class="n">serverdoc</span><span class="o">.</span><span class="n">documentation_server</span><span class="o">.</span><span class="n">__file__</span><span class="p">)</span>
<div class="highlight-python"><div class="highlight"><pre><span class="n">this_fold</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">pyquickhelper</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">documentation_server</span><span class="o">.</span><span class="n">__file__</span><span class="p">)</span>
<span class="n">this_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span> <span class="n">this_fold</span><span class="p">,</span> <span class="s">".."</span><span class="p">,</span> <span class="s">".."</span><span class="p">,</span> <span class="s">".."</span><span class="p">,</span> <span class="s">"dist"</span><span class="p">,</span> <span class="s">"html"</span><span class="p">)</span> <span class="p">)</span>
<span class="n">run_doc_server</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="n">mappings</span> <span class="o">=</span> <span class="p">{</span> <span class="s">"pyquickhelper"</span><span class="p">:</span> <span class="n">this_path</span> <span class="p">}</span> <span class="p">)</span>
</pre></div>
</div>
<p>The same server can serves more than one project.
More than one mappings can be sent.</p>
<p>see <a class="reference internal" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/pyquickhelper/serverdoc/documentation_server.html#le-documentation-server-l579"><span>file documentation_server.py</span></a></p>
<p>see <a class="reference internal" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/pyquickhelper/server/documentation_server.html#le-documentation-server-l579"><span>file documentation_server.py</span></a></p>
</div>
<div class="section" id="run-a-notebook-end-to-end">
<span id="lm-runanotebookendtoend"></span><h2><a class="toc-backref" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#id19">Run a notebook end to end</a><a class="headerlink" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#run-a-notebook-end-to-end" title="Permalink to this headline">¶</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_helpgen/test_convert_doc_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_rst2html(self):
::


this_fold = os.path.dirname(pyquickhelper.serverdoc.documentation_server.__file__)
this_fold = os.path.dirname(pyquickhelper.server.documentation_server.__file__)
this_path = os.path.abspath( os.path.join( this_fold, "..", "..", "..", "dist", "html") )
run_doc_server(None, mappings = { "pyquickhelper": this_path } )

Expand Down
8 changes: 4 additions & 4 deletions _unittests/ut_pycode/data/coverage/coverage_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12186,17 +12186,17 @@
</class>
</classes>
</package>
<package branch-rate="0" complexity="0" line-rate="0.5954" name="src.pyquickhelper.serverdoc">
<package branch-rate="0" complexity="0" line-rate="0.5954" name="src.pyquickhelper.server">
<classes>
<class branch-rate="0" complexity="0" filename="src/pyquickhelper/serverdoc/__init__.py" line-rate="1" name="__init__.py">
<class branch-rate="0" complexity="0" filename="src/pyquickhelper/server/__init__.py" line-rate="1" name="__init__.py">
<methods/>
<lines>
<line hits="1" number="5"/>
<line hits="1" number="6"/>
<line hits="1" number="7"/>
</lines>
</class>
<class branch-rate="0" complexity="0" filename="src/pyquickhelper/serverdoc/documentation_server.py" line-rate="0.5294" name="documentation_server.py">
<class branch-rate="0" complexity="0" filename="src/pyquickhelper/server/documentation_server.py" line-rate="0.5294" name="documentation_server.py">
<methods/>
<lines>
<line hits="1" number="2"/>
Expand Down Expand Up @@ -12456,7 +12456,7 @@
<line hits="0" number="595"/>
</lines>
</class>
<class branch-rate="0" complexity="0" filename="src/pyquickhelper/serverdoc/server_helper.py" line-rate="0.8966" name="server_helper.py">
<class branch-rate="0" complexity="0" filename="src/pyquickhelper/server/server_helper.py" line-rate="0.8966" name="server_helper.py">
<methods/>
<lines>
<line hits="1" number="2"/>
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_serverdoc/test_documentation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from http.server import HTTPServer as skip_

from pyquickhelper.loghelper import fLOG, get_url_content
from pyquickhelper.serverdoc import run_doc_server
from pyquickhelper.server import run_doc_server
from pyquickhelper.pycode import skipif_appveyor, ExtTestCase


Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_serverdoc/test_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import unittest

from pyquickhelper.loghelper import fLOG
from pyquickhelper.serverdoc import get_jenkins_mappings
from pyquickhelper.server import get_jenkins_mappings


class TestMappings(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions _unittests/ut_sphinxext/data/html_example2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,14 @@ to display it in a notebook.</p>
<div class="section" id="run-a-local-server-which-serves-the-documentation">
<span id="lm-runalocalserverwhichservesthedocumentation"></span><h2><a class="toc-backref" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#id18">run a local server which serves the documentation</a><a class="headerlink" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#run-a-local-server-which-serves-the-documentation" title="Permalink to this headline">¶</a></h2>
<p>The following code will create a local server: <a class="reference external" href="http://localhost:8079/pyquickhelper/">http://localhost:8079/pyquickhelper/</a>.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">this_fold</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">pyquickhelper</span><span class="o">.</span><span class="n">serverdoc</span><span class="o">.</span><span class="n">documentation_server</span><span class="o">.</span><span class="n">__file__</span><span class="p">)</span>
<div class="highlight-python"><div class="highlight"><pre><span class="n">this_fold</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">pyquickhelper</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">documentation_server</span><span class="o">.</span><span class="n">__file__</span><span class="p">)</span>
<span class="n">this_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span> <span class="n">this_fold</span><span class="p">,</span> <span class="s">".."</span><span class="p">,</span> <span class="s">".."</span><span class="p">,</span> <span class="s">".."</span><span class="p">,</span> <span class="s">"dist"</span><span class="p">,</span> <span class="s">"html"</span><span class="p">)</span> <span class="p">)</span>
<span class="n">run_doc_server</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="n">mappings</span> <span class="o">=</span> <span class="p">{</span> <span class="s">"pyquickhelper"</span><span class="p">:</span> <span class="n">this_path</span> <span class="p">}</span> <span class="p">)</span>
</pre></div>
</div>
<p>The same server can serves more than one project.
More than one mappings can be sent.</p>
<p>see <a class="reference internal" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/pyquickhelper/serverdoc/documentation_server.html#le-documentation-server-l579"><span>file documentation_server.py</span></a></p>
<p>see <a class="reference internal" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/pyquickhelper/server/documentation_server.html#le-documentation-server-l579"><span>file documentation_server.py</span></a></p>
</div>
<div class="section" id="run-a-notebook-end-to-end">
<span id="lm-runanotebookendtoend"></span><h2><a class="toc-backref" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#id19">Run a notebook end to end</a><a class="headerlink" href="http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/all_example.html#run-a-notebook-end-to-end" title="Permalink to this headline">¶</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion src/pyquickhelper/pycode/build_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def get_script_module(command, platform=sys.platform, blog_list=None,
script.append(("auto_doc_server.py", prefix_setup + """
# address http://localhost:8079/
from pyquickhelper import fLOG
from pyquickhelper.serverdoc import run_doc_server, get_jenkins_mappings
from pyquickhelper.server import run_doc_server, get_jenkins_mappings
fLOG(OutputPrint=True)
fLOG("running documentation server")
thisfile = os.path.dirname(__file__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def run_doc_server(server, mappings, thread=False, port=8079):

::

this_fold = os.path.dirname(pyquickhelper.serverdoc.documentation_server.__file__)
this_fold = os.path.dirname(pyquickhelper.server.documentation_server.__file__)
this_path = os.path.abspath( os.path.join( this_fold,
"..", "..", "..", "dist", "html") )
run_doc_server(None, mappings = { "pyquickhelper": this_path } )
Expand Down