Skip to content

Commit

Permalink
Added nitpick to docs/Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
comrumino committed Oct 13, 2023
1 parent 96e8c74 commit 02d596a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest nitpick

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand Down Expand Up @@ -124,14 +124,14 @@ linkcheck:
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

nitpick:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) -E -W --keep-going $(BUILDDIR)/html
@echo "Nit-picky build test and treating warnings as errors."

doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

upload: html
rsync -r -v $(BUILDDIR)/html/ gangesmaster,[email protected]:htdocs/




2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.doctest']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/advanced-debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Unit tests can be ran using your desired Python version as well.

.. code-block:: bash
PYENV_VERSION=3.9-dev pyenv exec python -m unittest discover -s ./tests -k test_affinity
PYENV_VERSION=3.8-dev pyenv exec python -m unittest discover -s ./tests
PYENV_VERSION=3.9-dev pyenv exec python -m unittest discover -v -k test_affinity
PYENV_VERSION=3.8-dev pyenv exec python -m unittest discover
Testing Supported Python Versions via Docker
--------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ you can use the following receipt::

>>> import rpyc
>>> c = rpyc.classic.connect("localhost")
>>> c.execute("print 'hi there'") # this will print on the host
>>> c.execute("print('hi there')") # this will print on the host
>>> import sys
>>> c.modules.sys.stdout = sys.stdout
>>> c.execute("print 'hi here'") # now this will be redirected here
>>> c.execute("print('hi here')") # now this will be redirected here
hi here

Also note that if you are using classic mode RPyC, you can use the
`context manager <http://www.python.org/doc/2.5.2/lib/typecontextmanager.html>`_
``rpyc.classic.redirected_stdio``::

>>> c.execute("print 'hi there'") # printed on the server
>>> c.execute("print('hi there')") # printed on the server
>>>
>>> with rpyc.classic.redirected_stdio(c):
... c.execute("print 'hi here'") # printed on the client
... c.execute("print('hi here')") # printed on the client
...
hi here
>>> c.execute("print 'hi there again'") # printed on the server
>>> c.execute("print('hi there again')") # printed on the server
>>>

.. figure:: _static/howto-redirected.png
Expand Down

0 comments on commit 02d596a

Please sign in to comment.