Skip to content

Commit

Permalink
remove epydoc from the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hantek committed Dec 6, 2015
1 parent c13f339 commit 6cb95da
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 223 deletions.
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ before_install:
- export PATH=/home/travis/miniconda2/bin:$PATH
- conda update --yes conda

# Install Epydoc
- wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz
- gunzip epydoc-3.0.1.tar.gz
- tar -xvf epydoc-3.0.1.tar
- cd epydoc-3.0.1/
- sudo make install

install:
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then conda create --yes -q -n pyenv mkl python=2.6 numpy=1.7.1 scipy=0.11 nose=1.3.0 pyparsing=1.5 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pyparsing=1.5 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1; fi
Expand Down
3 changes: 1 addition & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ To install the package, see this page:

http://deeplearning.net/software/theano/install.html


For the documentation, see the project website:

http://deeplearning.net/software/theano/
Expand All @@ -14,7 +13,7 @@ Related Projects:
We recommend you look at the documentation on the website, since it
will be more current than the documentation included with the package.
If you really wish to build the documentation yourself, you will need
epydoc and sphinx. Issue the following command:
sphinx. Issue the following command:

python ./doc/scripts/docgen.py

Expand Down
152 changes: 0 additions & 152 deletions doc/api/epydoc.conf

This file was deleted.

3 changes: 1 addition & 2 deletions doc/dev_start_guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ To get up to speed, you'll need to
- Learn some non-basic Python to understand what's going on in some of the
trickier files (like tensor.py).
- Go through the `NumPy documentation`_.
- Learn to write reStructuredText_ for epydoc_ and Sphinx_.
- Learn to write reStructuredText_ for Sphinx_.
- Learn about how unittest_ and nose_ work

.. _Sphinx: http://sphinx.pocoo.org/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _epydoc: http://epydoc.sourceforge.net/
.. _NumPy documentation: http://docs.scipy.org/numpy/
.. _unittest: http://docs.python.org/library/unittest.html
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
Expand Down
2 changes: 1 addition & 1 deletion doc/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ We recommend you look at the documentation on the website, since it
will be more current than the documentation included with the package.

If you really wish to build the documentation yourself, you will need
epydoc and sphinx, as described above. Issue the following command::
sphinx, as described above. Issue the following command::

python ./doc/scripts/docgen.py

Expand Down
4 changes: 2 additions & 2 deletions doc/internal/metadocumentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Use ReST for documentation
--------------------------

* `ReST <http://docutils.sourceforge.net/rst.html>`__ is standardized.
epydoc is not. trac wiki-markup is not.
This means that ReST can be cut-and-pasted between epydoc, code, other
trac wiki-markup is not.
This means that ReST can be cut-and-pasted between code, other
docs, and TRAC. This is a huge win!
* ReST is extensible: we can write our own roles and directives to automatically link to WIKI, for example.
* ReST has figure and table directives, and can be converted (using a standard tool) to latex documents.
Expand Down
62 changes: 5 additions & 57 deletions doc/scripts/docgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,6 @@
import os
import shutil
import inspect

from epydoc import docintrospecter
from epydoc.apidoc import RoutineDoc


def Op_to_RoutineDoc(op, routine_doc, module_name=None):
routine_doc.specialize_to(RoutineDoc)

#NB: this code is lifted from epydoc/docintrospecter.py

# op should be an op instance
assert hasattr(op, 'perform')

# Record the function's docstring.
routine_doc.docstring = getattr(op, '__doc__', '')

# Record the function's signature.
func = op.__epydoc_asRoutine
if isinstance(func, type(Op_to_RoutineDoc)):
(args, vararg, kwarg, defaults) = inspect.getargspec(func)

# Add the arguments.
routine_doc.posargs = args
routine_doc.vararg = vararg
routine_doc.kwarg = kwarg

# Set default values for positional arguments.
routine_doc.posarg_defaults = [None] * len(args)

# Set the routine's line number.
if hasattr(func, '__code__'):
routine_doc.lineno = func.__code__.co_firstlineno
else:
# [XX] I should probably use UNKNOWN here??
# dvarrazzo: if '...' is to be changed, also check that
# `docstringparser.process_arg_field()` works correctly.
# See SF bug #1556024.
routine_doc.posargs = ['...']
routine_doc.posarg_defaults = [None]
routine_doc.kwarg = None
routine_doc.vararg = None

return routine_doc

docintrospecter.register_introspecter(
lambda value: getattr(value, '__epydoc_asRoutine', False),
Op_to_RoutineDoc,
priority=-1)


import getopt
from collections import defaultdict

Expand All @@ -66,24 +16,22 @@ def Op_to_RoutineDoc(op, routine_doc, module_name=None):
opts, args = getopt.getopt(
sys.argv[1:],
'o:f:',
['epydoc', 'rst', 'help', 'nopdf', 'cache', 'test'])
['rst', 'help', 'nopdf', 'cache', 'test'])
options.update(dict([x, y or True] for x, y in opts))
if options['--help']:
print('Usage: %s [OPTIONS] [files...]' % sys.argv[0])
print(' -o <dir>: output the html files in the specified dir')
print(' --cache: use the doctree cache')
print(' --rst: only compile the doc (requires sphinx)')
print(' --nopdf: do not produce a PDF file from the doc, only HTML')
print(' --epydoc: only compile the api documentation', end=' ')
print('(requires epydoc)')
print(' --test: run all the code samples in the documentaton')
print(' --help: this help')
print('If one or more files are specified after the options then only '
'those files will be built. Otherwise the whole tree is '
'processed. Specifying files will implies --cache.')
sys.exit(0)

if not (options['--epydoc'] or options['--rst'] or options['--test']):
if options['--rst'] or options['--test']:
# Default is now rst
options['--rst'] = True

Expand All @@ -105,8 +53,8 @@ def mkdir(path):
pythonpath = os.pathsep.join([throot, pythonpath])
sys.path[0:0] = [throot] # We must not use os.environ.

if options['--all'] or options['--epydoc']:
mkdir("api")
# if options['--all']:
# mkdir("api")

#Generate HTML doc

Expand All @@ -116,7 +64,7 @@ def mkdir(path):
# '-o', 'api']
#cli()
## So we use this instead
os.system("epydoc --config %s/doc/api/epydoc.conf -o api" % throot)
#os.system("epydoc --config %s/doc/api/epydoc.conf -o api" % throot)

# Generate PDF doc
# TODO
Expand Down

0 comments on commit 6cb95da

Please sign in to comment.