Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1388 +/- ##
=========================================
Coverage ? 85.11%
=========================================
Files ? 327
Lines ? 49531
Branches ? 0
=========================================
Hits ? 42156
Misses ? 7375
Partials ? 0Continue to review full report at Codecov.
|
|
These options seem to improve the output, and in particular document Including Update: https://stackoverflow.com/questions/3757500/connect-sphinx-autodoc-skip-member-to-my-function#3757526 suggests a way to do this via the |
|
I hinted at this in a comment in the last commit referencing my Sphinx pull request sphinx-doc/sphinx#4076 which adds a new Sphinx Running this with my branch of Sphinx, we can manage the special settings for |
|
TODO: Resolve all the scary Sphinx warnings |
d79cade to
76dbb65
Compare
|
Cross reference sphinx-doc/sphinx#4170 for the |
76dbb65 to
da04f02
Compare
ce9c85b to
6d5ea13
Compare
|
Note to self: Sphinx, apidoc, and readthedocs I think we need to run However, out of the box, readthedocs seems to focus on the running sphinx with the readthedocs/readthedocs.org#1139 That issue includes a workaround where they modify import sys, os
# append the next line to conf.py, should change "backend" to your module name
sys.path.insert(0, os.path.join(os.path.dirname(__file__),'..','backend'))
# ensure the autodoc and napoleon are in the extensions
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
def run_apidoc(_):
from sphinx.apidoc import main
parentFolder = os.path.join(os.path.dirname(__file__), '..')
cur_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.append(parentFolder)
# change "backend" to your module name
module = os.path.join(parentFolder,'backend')
output_path = os.path.join(cur_dir, 'api')
main(['-e','-f','-o', output_path, module])
def setup(app):
# overrides for wide tables in RTD theme
app.add_stylesheet('theme_overrides.css')
# trigger the run_apidoc
app.connect('builder-inited', run_apidoc) |
de4d2e7 to
05acdf4
Compare
9c85749 to
9ca2f7e
Compare
9ca2f7e to
a2dae56
Compare
a2dae56 to
4412c7e
Compare
|
I'm going to remove the |
|
Running locally without |
Need to see if can disable some, e.g. __dict__ or __weakref__ but for things like __hash__ and __eq__ if we have documented it we want to show this information.
This makes sense for use in continuous integration.
Don't know or currently care how these would work for Bio and BioSQL top level modules together.
In theory this would allow readthedocs to be used and generate the API documentation *.rst files on demand. See readthedocs/readthedocs.org#1139
Calling sphinx-apidoc via conf.py broke on Sphinx 1.7.1, $ make SPHINXBUILD=python -msphinx -W -C Doc/api/ html make: Entering directory `/home/travis/build/biopython/biopython/Doc/api' python -msphinx -W -b html -d _build/doctrees . _build/html Running Sphinx v1.7.1 loading translations [en]... done making output directory... loading pickled environment... not yet created usage: usage: __main__.py [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PATTERN, ...] __main__.py: error: argument -d/--maxdepth: invalid int value: '_build/doctrees' make: *** [html] Error 2 make: Leaving directory `/home/travis/build/biopython/biopython/Doc/api' ERROR: InvocationError: '/usr/bin/make SPHINXBUILD=python -msphinx -W -C Doc/api/ html'
Under Sphinx 1.7 the Makefile calls sphinx-build with the -M argument which must be the first argument.
This reverts commit 95bae71. Currently strict mode fails due to TOC problems: .../Doc/api/Bio.Align.Applications.rst: WARNING: document isn't included in any toctree .../Doc/api/Bio.Graphics.GenomeDiagram.rst: WARNING: document isn't included in any toctree .../Doc/api/Bio.Phylo.Applications.rst: WARNING: document isn't included in any toctree .../Doc/api/Bio.Sequencing.Applications.rst: WARNING: document isn't included in any toctree .../Doc/api/Bio.motifs.applications.rst: WARNING: document isn't included in any toctree
|
Given sphinx-doc/sphinx#5215 was merged and is part of Sphinx 1.8.0, updating the branch (and rebasing)... |
98569cb to
37f8931
Compare
This replaced my proposed autodoc_exclude_members setting which was put forward on another Sphinx pull request.
|
Closing in favour of #1803 (which clears up the history) now that this seems to be working. |
This pull request would in part address issue #906, the goal of replacing epydoc for our API documentation.
Note in addition to Sphinx specific changes, there are some code changes in
Bio.RestrictionandBio.Graphics.GenomeDiagramin order to avoid an exception and include the classes in the public documentation.Still needs work, e.g. dealing with special methods like
__init__which we probably want to be included by default.