[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Fix up documentation
commit 9db45a1e8a31c6fff9a5a732ff307330ecdbcea3
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date: Tue Nov 6 22:31:22 2012 +0100
Fix up documentation
* Add proper requirements.txt file
---
docs/source/api/ooni.rst | 15 ++++-
docs/source/api/ooni.templates.rst | 15 ++++-
docs/source/api/ooni.utils.rst | 114 +++++++++++++++++++++++++++++++++--
docs/source/index.rst | 1 +
docs/source/writing_tests.rst | 3 +-
ooni/lib/txscapy.py | 12 ++--
ooni/nettest.py | 2 +-
ooni/templates/httpt.py | 6 ++
requirements.txt | 27 ++++++++-
9 files changed, 171 insertions(+), 24 deletions(-)
diff --git a/docs/source/api/ooni.rst b/docs/source/api/ooni.rst
index bcdd402..aee4ab6 100644
--- a/docs/source/api/ooni.rst
+++ b/docs/source/api/ooni.rst
@@ -9,10 +9,10 @@ ooni Package
:undoc-members:
:show-inheritance:
-:mod:`input` Module
--------------------
+:mod:`inputunit` Module
+-----------------------
-.. automodule:: ooni.input
+.. automodule:: ooni.inputunit
:members:
:undoc-members:
:show-inheritance:
@@ -25,6 +25,14 @@ ooni Package
:undoc-members:
:show-inheritance:
+:mod:`oconfig` Module
+---------------------
+
+.. automodule:: ooni.oconfig
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
:mod:`oonicli` Module
---------------------
@@ -54,6 +62,7 @@ Subpackages
.. toctree::
+ ooni.kit
ooni.lib
ooni.templates
ooni.utils
diff --git a/docs/source/api/ooni.templates.rst b/docs/source/api/ooni.templates.rst
index 662da1d..6951e31 100644
--- a/docs/source/api/ooni.templates.rst
+++ b/docs/source/api/ooni.templates.rst
@@ -1,11 +1,20 @@
templates Package
=================
-:mod:`http` Module
-------------------
+:mod:`httpt` Module
+-------------------
-.. automodule:: ooni.templates.http
+.. automodule:: ooni.templates.httpt
:members:
:undoc-members:
:show-inheritance:
+:mod:`scapyt` Module
+--------------------
+
+.. automodule:: ooni.templates.scapyt
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+
diff --git a/docs/source/api/ooni.utils.rst b/docs/source/api/ooni.utils.rst
index 5361b43..4478eaa 100644
--- a/docs/source/api/ooni.utils.rst
+++ b/docs/source/api/ooni.utils.rst
@@ -3,12 +3,19 @@ utils Package
:mod:`utils` Package
--------------------
-
.. automodule:: ooni.utils
:members:
:undoc-members:
:show-inheritance:
+..
+ :mod:`assertions` Module
+ ------------------------
+ .. automodule:: ooni.utils.assertions
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
:mod:`config` Module
--------------------
@@ -25,6 +32,30 @@ utils Package
:undoc-members:
:show-inheritance:
+:mod:`geodata` Module
+---------------------
+
+.. automodule:: ooni.utils.geodata
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+:mod:`hacks` Module
+-------------------
+
+.. automodule:: ooni.utils.hacks
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+..
+ :mod:`legacy` Module
+ --------------------
+ .. automodule:: ooni.utils.legacy
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
:mod:`log` Module
-----------------
@@ -41,11 +72,80 @@ utils Package
:undoc-members:
:show-inheritance:
-:mod:`net` Module
------------------
+..
+ :mod:`meta` Module
+ ------------------
+ .. automodule:: ooni.utils.meta
+ :members:
+ :undoc-members:
+ :show-inheritance:
-.. automodule:: ooni.utils.net
- :members:
- :undoc-members:
- :show-inheritance:
+..
+ :mod:`net` Module
+ -----------------
+..
+ .. automodule:: ooni.utils.net
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+..
+ :mod:`onion` Module
+ -------------------
+ .. automodule:: ooni.utils.onion
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+..
+ :mod:`otime` Module
+ -------------------
+ .. automodule:: ooni.utils.otime
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+..
+ XXX this is commented out because it triggers this error
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.CustomCircuit.circuit_failed:1: ERROR: Unknown interpreted
+ text role "ivar".
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.CustomCircuit.circuit_failed:5: ERROR: Unknown interpreted
+ text role "ivar".
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.CustomCircuit.waiting_on:5: ERROR: Unknown interpreted
+ text role "ivar".
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.start_tor_filter_nodes:1: ERROR: Unknown interpreted text
+ role "ivar".
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.start_tor_filter_nodes:22: ERROR: Unexpected indentation.
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.start_tor_filter_nodes_with_timer:1: ERROR: Unknown
+ interpreted text role "ivar".
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.start_tor_filter_nodes_with_timer:26: ERROR: Unexpected
+ indentation.
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.start_tor_with_timer:1: ERROR: Unknown interpreted text
+ role "ivar".
+ gcooni/utils/onion.py:docstring of
+ ooni.utils.onion.start_tor_with_timer:24: ERROR: Unexpected indentation.
+ :mod:`process` Module
+ ---------------------
+ .. automodule:: ooni.utils.process
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+..
+ XXX this is commented out because the indentation of the docstrings is
+ wrong.
+ :mod:`timer` Module
+ -------------------
+ .. automodule:: ooni.utils.timer
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/source/index.rst b/docs/source/index.rst
index e92cc5a..5c96dd1 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -43,6 +43,7 @@ Contents
:maxdepth: 2
:glob:
+ oonib
install
tutorial
writing_tests
diff --git a/docs/source/writing_tests.rst b/docs/source/writing_tests.rst
index 3d58dab..01ddfb5 100644
--- a/docs/source/writing_tests.rst
+++ b/docs/source/writing_tests.rst
@@ -12,7 +12,8 @@ Test Cases
The atom of OONI Testing is called a Test Case. A test case class may contain
multiple Test Functions.
-.. autoclass:: ooni.nettest.TestCase
+.. autoclass:: ooni.nettest.NetTestCase
+ :noindex:
:class:`ooni.nettest.TestCase` is a subclass of :class:`unittest.TestCase` so
the assert methods that apply to :class:`unittest.TestCase` will also apply to
diff --git a/ooni/lib/txscapy.py b/ooni/lib/txscapy.py
index dffda36..00224d6 100644
--- a/ooni/lib/txscapy.py
+++ b/ooni/lib/txscapy.py
@@ -1,12 +1,12 @@
# -*- coding:utf8 -*-
"""
- txscapy
- ******
- (c) 2012 Arturo Filastò
- a twisted wrapper for scapys send and receive functions.
+txscapy
+*******
+(c) 2012 Arturo Filastò
+a twisted wrapper for scapys send and receive functions.
- This software has been written to be part of OONI, the Open Observatory of
- Network Interference. More information on that here: http://ooni.nu/
+This software has been written to be part of OONI, the Open Observatory of
+Network Interference. More information on that here: http://ooni.nu/
"""
diff --git a/ooni/nettest.py b/ooni/nettest.py
index c2a8575..3534a32 100644
--- a/ooni/nettest.py
+++ b/ooni/nettest.py
@@ -63,7 +63,7 @@ class NetTestCase(unittest.TestCase):
you will subclass this object.
* inputs: can be set to a static set of inputs. All the tests (the methods
- starting with the "test_" prefix) will be run once per input. At every run
+ starting with the "test" prefix) will be run once per input. At every run
the _input_ attribute of the TestCase instance will be set to the value of
the current iteration over inputs. Any python iterable object can be set
to inputs.
diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py
index 0b0b7cb..1491cbc 100644
--- a/ooni/templates/httpt.py
+++ b/ooni/templates/httpt.py
@@ -144,16 +144,22 @@ class HTTPTest(NetTestCase):
Perform an HTTP request with the specified method.
url: the full url path of the request
+
method: the HTTP Method to be used
+
headers: the request headers to be sent
+
body: the request body
+
headers_processor: a function to be used for processing the HTTP header
responses (defaults to self.processResponseHeaders).
This function takes as argument the HTTP headers as a
dict.
+
body_processory: a function to be used for processing the HTTP response
body (defaults to self.processResponseBody).
This function takes the response body as an argument.
+
"""
log.debug("Performing request %s %s %s" % (url, method, headers))
diff --git a/requirements.txt b/requirements.txt
index faada4c..f9d7541 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,24 @@
-twisted
-Scapy
-pyyaml
+BeautifulSoup==3.2.1
+Jinja2==2.6
+PyYAML==3.10
+Pygments==1.5
+Sphinx==1.1.3
+Twisted==12.2.0
+argparse==1.2.1
+cyclone==1.0-rc13
+distribute==0.6.24
+dnspython==1.10.0
+docutils==0.9.1
+ipaddr==2.1.10
+numpy==1.6.2
+pyOpenSSL==0.13
+pygeoip==0.2.5
+repoze.sphinx.autointerface==0.7.1
+scapy==2.1.0
+storm==0.19
+transaction==1.3.0
+txtorcon==0.7
+wsgiref==0.1.2
+zope.component==4.0.0
+zope.event==4.0.0
+zope.interface==4.0.1
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits