Skip to content

Commit

Permalink
Docs: Add a nice looking summary to the apidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Jun 24, 2015
1 parent 79da431 commit 2a297c3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ install:
- cd ..
- ./convert_to_py2.sh
- pip install -e .[all]
- pip install -r docs_requirements.txt
- sudo apt-get install texlive-latex-extra texlive-pictures texlive-science
script: ./testall.sh
5 changes: 5 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'numpydoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.intersphinx',
'sphinx.ext.autosummary',
]

numpydoc_show_inherited_class_members = False
numpydoc_class_members_toctree = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
1 change: 1 addition & 0 deletions docs_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+https://github.com/numpy/numpydoc.git@16ef04c
16 changes: 8 additions & 8 deletions pylatex/base_classes/latex_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ def dumps(self):
class.
"""

def dump(self, file_):
def dump(self, file_w):
"""Write the LaTeX representation of the class to a file.
:param file_: The file object in which to save the data
:param file_w: The file object in which to save the data
:type file_: io.TextIOBase
:type file_w: io.TextIOBase
"""

file_.write(self.dumps())
file_w.write(self.dumps())

def generate_tex(self, filepath):
"""Generate a .tex file.
Expand All @@ -70,12 +70,12 @@ def dumps_packages(self):

return dumps_list(self.packages)

def dump_packages(self, file_):
def dump_packages(self, file_w):
"""Write the LaTeX representation of the packages to a file.
:param file_: The file object in which to save the data
:param file_w: The file object in which to save the data
:type file_: io.TextIOBase
:type file_w: io.TextIOBase
"""

file_.write(self.dumps_packages())
file_w.write(self.dumps_packages())
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
'matrices': ['numpy'],
'matplotlib': ['matplotlib'],
'quantities': ['quantities', 'numpy'],
'testing': ['flake8', 'pep8-naming', 'flake8_docstrings', 'nose'],
'testing': ['flake8', 'pep8-naming', 'flake8_docstrings', 'nose']
}

extras['all'] = list(set([req for reqs in extras.values() for req in reqs]))
Expand Down

0 comments on commit 2a297c3

Please sign in to comment.