Skip to content

Commit a156a0a

Browse files
authored
Merge pull request #259 from bluetech/doc-fixes
Minor doc improvements
2 parents 83c4fd0 + 6235a1a commit a156a0a

21 files changed

+183
-187
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ execnet: distributed Python deployment and communication
1616
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
1717
:target: https://github.com/python/black
1818

19-
.. _execnet: http://codespeak.net/execnet
19+
.. _execnet: https://execnet.readthedocs.io
2020

2121
execnet_ provides carefully tested means to ad-hoc interact with Python
2222
interpreters across version, platform and network barriers. It provides

doc/_templates/layout.html

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,3 @@ <h1>execnet: Distributed Python deployment and communication</h1>
1818
</code>
1919
</div>
2020
{% endblock %}
21-
22-
{% block footer %}
23-
{{ super() }}
24-
<script type="text/javascript">
25-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
26-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
27-
</script>
28-
<script type="text/javascript">
29-
try {
30-
var pageTracker = _gat._getTracker("UA-7597274-7");
31-
pageTracker._trackPageview();
32-
} catch(err) {}</script>
33-
{% endblock %}

doc/basics.rst

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ execnet ad-hoc instantiates local and remote Python interpreters.
66
Each interpreter is accessible through a **Gateway** which manages
77
code and data communication. **Channels** allow to exchange
88
data between the local and the remote end. **Groups**
9-
help to manage creation and termination of sub interpreters.
9+
help to manage creation and termination of sub-interpreters.
1010

1111
.. image:: _static/basic1.png
1212

@@ -26,10 +26,10 @@ Here is an example which instantiates a simple Python subprocess::
2626

2727
>>> gateway = execnet.makegateway()
2828

29-
gateways allow to `remote execute code`_ and
29+
Gateways allow to `remote execute code`_ and
3030
`exchange data`_ bidirectionally.
3131

32-
examples for valid gateway specifications
32+
Examples for valid gateway specifications
3333
-------------------------------------------
3434

3535
* ``ssh=wyvern//python=python3.3//chdir=mycache`` specifies a Python3.3
@@ -82,15 +82,15 @@ in the instantiated subprocess-interpreter:
8282
.. automethod:: Gateway.remote_exec(source)
8383

8484
It is allowed to pass a module object as source code
85-
in which case it's source code will be obtained and
85+
in which case its source code will be obtained and
8686
get sent for remote execution. ``remote_exec`` returns
8787
a channel object whose symmetric counterpart channel
8888
is available to the remotely executing source.
8989

9090

9191
.. method:: Gateway.reconfigure([py2str_as_py3str=True, py3str_as_py2str=False])
9292

93-
reconfigures the string-coercion behaviour of the gateway
93+
Reconfigures the string-coercion behaviour of the gateway
9494

9595
.. _`Channel`:
9696
.. _`channel-api`:
@@ -164,17 +164,10 @@ you can execute this little test file::
164164
<RInfo 'numchannels=0, numexecuting=0, execmodel=thread'>
165165
1
166166

167-
.. note::
168-
169-
With python3 you can (as of December 2013) only use the thread model
170-
because neither eventlet-0.14.0 nor gevent-1.0 support Python3.
171-
When they start to support Python3, execnet will probably just work
172-
because it is itself Python3 compatible.
173-
174167
How to execute in the main thread
175168
------------------------------------------------
176169

177-
When the remote side of a gateway uses the 'thread' model, execution
170+
When the remote side of a gateway uses the "thread" model, execution
178171
will preferably run in the main thread. This allows GUI loops
179172
or other code to behave correctly. If you, however, start multiple
180173
executions concurrently, they will run in non-main threads.
@@ -227,7 +220,7 @@ configure a tracing mechanism:
227220
.. _`dumps/loads`:
228221
.. _`dumps/loads API`:
229222

230-
cross-interpreter serialization of python objects
223+
Cross-interpreter serialization of Python objects
231224
=======================================================
232225

233226
.. versionadded:: 1.1

doc/conf.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
# Add any Sphinx extension module names here, as strings.
2727
# They can be extensions
2828
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest"]
29+
extensions = [
30+
"sphinx.ext.autodoc",
31+
"sphinx.ext.doctest",
32+
"sphinx.ext.intersphinx",
33+
]
3034

3135
# Add any paths that contain templates here, relative to this directory.
3236
templates_path = ["_templates"]
@@ -83,6 +87,16 @@
8387
# A list of ignored prefixes for module index sorting.
8488
# modindex_common_prefix = []
8589

90+
intersphinx_mapping = {
91+
"python": ("https://docs.python.org/3", None),
92+
}
93+
94+
nitpicky = True
95+
nitpick_ignore = [
96+
("py:class", "execnet.gateway_base.ChannelFileRead"),
97+
("py:class", "execnet.gateway_base.ChannelFileWrite"),
98+
("py:class", "execnet.gateway.Gateway"),
99+
]
86100

87101
# -- Options for HTML output --------------------------------------------------
88102

doc/example/test_debug.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Debugging execnet / Wire messages
2+
Debugging execnet / wire messages
33
===============================================================
44

55
By setting the environment variable ``EXECNET_DEBUG`` you can

doc/example/test_group.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Usings Groups for managing multiple gateways
55
------------------------------------------------------
66

77
Use ``execnet.Group`` to manage membership and lifetime of
8-
of multiple gateways::
8+
multiple gateways::
99

1010
>>> import execnet
1111
>>> group = execnet.Group(['popen'] * 2)
@@ -25,7 +25,7 @@ of multiple gateways::
2525
>>> group
2626
<Group []>
2727

28-
Assigning Gateway IDs
28+
Assigning gateway IDs
2929
------------------------------------------------------
3030

3131
All gateways are created as part of a group and receive
@@ -66,12 +66,12 @@ you actually use the ``execnet.default_group``::
6666
>>> execnet.default_group.defaultspec # used for empty makegateway() calls
6767
'popen'
6868

69-
Robust Termination of ssh/popen processes
69+
Robust termination of SSH/popen processes
7070
-----------------------------------------------
7171

7272
Use ``group.terminate(timeout)`` if you want to terminate
73-
member gateways and ensure that no local sub processes remain
74-
you can specify a ``timeout`` after which an attempt at killing
73+
member gateways and ensure that no local subprocesses remain.
74+
You can specify a ``timeout`` after which an attempt at killing
7575
the related process is made::
7676

7777
>>> import execnet
@@ -86,7 +86,7 @@ the related process is made::
8686

8787
execnet aims to provide totally robust termination so if
8888
you have left-over processes or other termination issues
89-
please :doc:`report them <../support>`. thanks!
89+
please :doc:`report them <../support>`. Thanks!
9090

9191

9292
Using Groups to manage a certain type of gateway

doc/example/test_info.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
basic local and remote communication
2-
=========================================
1+
Basic local and remote communication
2+
====================================
33

44
Execute source code in subprocess, communicate through a channel
55
-------------------------------------------------------------------
@@ -25,8 +25,8 @@ messages between two processes.
2525

2626
.. _`share-nothing model`: http://en.wikipedia.org/wiki/Shared_nothing_architecture
2727

28-
remote-exec a function (avoiding inlined source part I)
29-
-------------------------------------------------------------------
28+
Remote-exec a function (avoiding inlined source part I)
29+
-------------------------------------------------------
3030

3131
You can send and remote execute parametrized pure functions like this:
3232

@@ -49,8 +49,8 @@ Notes:
4949
between the nodes).
5050

5151

52-
remote-exec a module (avoiding inlined source part II)
53-
--------------------------------------------------------------
52+
Remote-exec a module (avoiding inlined source part II)
53+
------------------------------------------------------
5454

5555
You can pass a module object to ``remote_exec`` in which case
5656
its source code will be sent. No dependencies will be transferred
@@ -86,8 +86,8 @@ A local subprocess gateway has the same working directory as the instantiatior::
8686

8787
"ssh" gateways default to the login home directory.
8888

89-
Get information from remote ssh account
90-
--------------------------------------------
89+
Get information from remote SSH account
90+
---------------------------------------
9191

9292
Use simple execution to obtain information from remote environments::
9393

@@ -143,7 +143,7 @@ and use it to transfer information::
143143

144144

145145

146-
a simple command loop pattern
146+
A simple command loop pattern
147147
--------------------------------------------------------------
148148

149149
If you want the remote side to serve a number
@@ -189,6 +189,6 @@ itself into the remote socket endpoint::
189189
gw = execnet.makegateway("socket=TARGET-IP:8888")
190190

191191
That's it, you can now use the gateway object just like
192-
a popen- or ssh-based one.
192+
a popen- or SSH-based one.
193193

194194
.. include:: test_ssh_fileserver.rst

doc/example/test_multi.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
advanced (multi) channel communication
1+
Advanced (multi) channel communication
22
=====================================================
33

44
MultiChannel: container for multiple channels
@@ -19,7 +19,7 @@ Use ``execnet.MultiChannel`` to work with multiple channels::
1919
>>> sum(mch.receive_each())
2020
3
2121

22-
receive results from sub processes with a Queue
22+
Receive results from sub processes with a Queue
2323
-----------------------------------------------------
2424

2525
Use ``MultiChannel.make_receive_queue()`` to get a queue
@@ -52,7 +52,7 @@ data immediately and without blocking execution::
5252
Note that the callback function will be executed in the
5353
receiver thread and should not block or run for too long.
5454

55-
robustly receive results and termination notification
55+
Robustly receive results and termination notification
5656
-----------------------------------------------------
5757

5858
Use ``MultiChannel.make_receive_queue(endmarker)`` to specify
@@ -76,7 +76,7 @@ is blocked in execution and is terminated/killed::
7676

7777

7878

79-
saturate multiple Hosts and CPUs with tasks to process
79+
Saturate multiple Hosts and CPUs with tasks to process
8080
--------------------------------------------------------
8181

8282
If you have multiple CPUs or hosts you can create as many

doc/example/test_proxy.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Managing Proxied gateways
1+
Managing proxied gateways
22
==========================
33

4-
Simple Proxying
4+
Simple proxying
55
----------------
66

7-
Using the via arg of specs we can create a gateway
7+
Using the ``via`` arg of specs we can create a gateway
88
whose io is created on a remote gateway and proxied to the master.
99

1010
The simplest use case, is where one creates one master process

doc/example/test_ssh_fileserver.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Receive file contents from remote SSH account
32
-----------------------------------------------------
43

0 commit comments

Comments
 (0)