Skip to content

Commit aec3112

Browse files
authored
Merge pull request #81 from carterbox/revise-docs
DOC: Revise documentation
2 parents bf130c7 + 8e41e80 commit aec3112

File tree

3 files changed

+30
-191
lines changed

3 files changed

+30
-191
lines changed

docs/source/conf.py

Lines changed: 30 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@
3434
'sphinx.ext.autosummary',
3535
'sphinx.ext.doctest',
3636
'sphinx.ext.intersphinx',
37-
'sphinx.ext.todo',
38-
'sphinx.ext.coverage',
39-
'sphinx.ext.mathjax',
40-
'sphinx.ext.ifconfig',
41-
'sphinx.ext.viewcode',
4237
'sphinx.ext.napoleon',
38+
'sphinx.ext.viewcode',
39+
'sphinx.ext.todo',
4340
'sphinxcontrib.bibtex',
4441
'nbsphinx',
45-
'IPython.sphinxext.ipython_console_highlighting',
42+
]
43+
44+
bibtex_bibfiles = [
45+
'bibtex/refs.bib',
46+
'bibtex/cite.bib',
4647
]
4748

4849
# Napoleon settings
@@ -79,55 +80,17 @@
7980
copyright = u'2016, UChicago Argonne, LLC'
8081
author = u'Doga Gursoy'
8182

82-
# The version info for the project you're documenting, acts as replacement for
83-
# |version| and |release|, also used in various other places throughout the
84-
# built documents.
85-
#
86-
# The short X.Y version.
87-
# The full version, including alpha/beta/rc tags.
88-
# release = '0.3'
89-
90-
# The language for content autogenerated by Sphinx. Refer to documentation
91-
# for a list of supported languages.
92-
#
93-
# This is also used if you do content translation via gettext catalogs.
94-
# Usually you set "language" from the command line for these cases.
95-
language = None
96-
97-
# There are two options for replacing |today|: either, you set today to some
98-
# non-false value, then it is used:
99-
#today = ''
100-
# Else, today_fmt is used as the format for a strftime call.
101-
#today_fmt = '%B %d, %Y'
102-
10383
# List of patterns, relative to source directory, that match files and
10484
# directories to ignore when looking for source files.
10585
exclude_patterns = ['_build', '**.ipynb_checkpoints']
10686

107-
# The reST default role (used for this markup: `text`) to use for all
108-
# documents.
109-
#default_role = None
110-
111-
# If true, '()' will be appended to :func: etc. cross-reference text.
112-
#add_function_parentheses = True
113-
114-
# If true, the current module name will be prepended to all description
115-
# unit titles (such as .. function::).
116-
#add_module_names = True
117-
11887
# If true, sectionauthor and moduleauthor directives will be shown in the
11988
# output. They are ignored by default.
120-
#show_authors = False
89+
show_authors = True
12190

12291
# The name of the Pygments (syntax highlighting) style to use.
12392
pygments_style = 'sphinx'
12493

125-
# A list of ignored prefixes for module index sorting.
126-
#modindex_common_prefix = []
127-
128-
# If true, keep warnings as "system message" paragraphs in the built documents.
129-
#keep_warnings = False
130-
13194
# If true, `todo` and `todoList` produce output, else they produce nothing.
13295
todo_include_todos = True
13396

@@ -154,16 +117,6 @@
154117
"display_version": True,
155118
}
156119

157-
# Add any paths that contain custom themes here, relative to this directory.
158-
#html_theme_path = []
159-
160-
# The name for this set of Sphinx documents. If None, it defaults to
161-
# "<project> v<release> documentation".
162-
#html_title = None
163-
164-
# A shorter title for the navigation bar. Default is the same as html_title.
165-
#html_short_title = None
166-
167120
# The name of an image file (relative to this directory) to place at the top
168121
# of the sidebar.
169122
#html_logo = None
@@ -173,149 +126,44 @@
173126
# pixels large.
174127
#html_favicon = None
175128

176-
# Add any paths that contain custom static files (such as style sheets) here,
177-
# relative to this directory. They are copied after the builtin static files,
178-
# so a file named "default.css" will overwrite the builtin "default.css".
179-
# html_static_path = ['_static']
180-
181-
# Add any extra paths that contain custom files (such as robots.txt or
182-
# .htaccess) here, relative to this directory. These files are copied
183-
# directly to the root of the documentation.
184-
#html_extra_path = []
185-
186-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
187-
# using the given strftime format.
188-
#html_last_updated_fmt = '%b %d, %Y'
189-
190-
# If true, SmartyPants will be used to convert quotes and dashes to
191-
# typographically correct entities.
192-
#html_use_smartypants = True
193-
194-
# Custom sidebar templates, maps document names to template names.
195-
#html_sidebars = {}
196-
197-
# Additional templates that should be rendered to pages, maps page names to
198-
# template names.
199-
#html_additional_pages = {}
200-
201-
# If false, no module index is generated.
202-
#html_domain_indices = True
203-
204-
# If false, no index is generated.
205-
#html_use_index = True
206-
207-
# If true, the index is split into individual pages for each letter.
208-
#html_split_index = False
209-
210-
# If true, links to the reST sources are added to the pages.
211-
#html_show_sourcelink = True
212-
213-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
214-
#html_show_sphinx = True
215-
216-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
217-
#html_show_copyright = True
218-
219-
# If true, an OpenSearch description file will be output, and all pages will
220-
# contain a <link> tag referring to it. The value of this option must be the
221-
# base URL from which the finished HTML is served.
222-
#html_use_opensearch = ''
223-
224-
# This is the file name suffix for HTML files (e.g. ".xhtml").
225-
#html_file_suffix = None
226-
227129
# Language to be used for generating the HTML full-text search index.
228130
# Sphinx supports the following languages:
229131
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
230132
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
231-
#html_search_language = 'en'
232-
233-
# A dictionary with options for the search language support, empty by default.
234-
# Now only 'ja' uses this config value
235-
#html_search_options = {'type': 'default'}
236-
237-
# The name of a javascript file (relative to the configuration directory) that
238-
# implements a search results scorer. If empty, the default will be used.
239-
#html_search_scorer = 'scorer.js'
133+
html_search_language = 'en'
240134

241135
# Output file base name for HTML help builder.
242136
htmlhelp_basename = 'xdesigndoc'
243137

244-
# -- Options for LaTeX output ---------------------------------------------
245-
246-
latex_elements = {
247-
# The paper size ('letterpaper' or 'a4paper').
248-
#'papersize': 'letterpaper',
249-
250-
# The font size ('10pt', '11pt' or '12pt').
251-
#'pointsize': '10pt',
252-
253-
# Additional stuff for the LaTeX preamble.
254-
#'preamble': '',
255-
256-
# Latex figure (float) alignment
257-
#'figure_align': 'htbp',
258-
}
259-
260-
# Grouping the document tree into LaTeX files. List of tuples
261-
# (source start file, target name, title,
262-
# author, documentclass [howto, manual, or own class]).
263-
latex_documents = [
264-
(master_doc, 'xdesign.tex', u'XDesign Documentation', copyright, 'manual'),
138+
nbsphinx_execute_arguments = [
139+
"--InlineBackend.figure_formats={'svg', 'pdf'}",
140+
"--InlineBackend.rc={'figure.dpi': 96}",
265141
]
266142

267-
# The name of an image file (relative to this directory) to place at the top of
268-
# the title page.
269-
#latex_logo = None
270-
271-
# For "manual" documents, if this is true, then toplevel headings are parts,
272-
# not chapters.
273-
#latex_use_parts = False
274-
275-
# If true, show page references after internal links.
276-
#latex_show_pagerefs = False
143+
# This is processed by Jinja2 and inserted before each notebook
144+
nbsphinx_prolog = r"""
145+
{% set docname = env.doc2path(env.docname, base='docs/source') %}
277146
278-
# If true, show URL addresses after external links.
279-
#latex_show_urls = False
147+
.. only:: html
280148
281-
# Documents to append as an appendix to all manuals.
282-
#latex_appendices = []
149+
.. role:: raw-html(raw)
150+
:format: html
283151
284-
# If false, no module index is generated.
285-
#latex_domain_indices = True
286-
287-
# -- Options for manual page output ---------------------------------------
288-
289-
# One entry per manual page. List of tuples
290-
# (source start file, name, description, authors, manual section).
291-
man_pages = [(master_doc, 'xdesign', u'XDesign Documentation', [author], 1)]
292-
293-
# If true, show URL addresses after external links.
294-
#man_show_urls = False
295-
296-
# -- Options for Texinfo output -------------------------------------------
297-
298-
# Grouping the document tree into Texinfo files. List of tuples
299-
# (source start file, target name, title, author,
300-
# dir menu entry, description, category)
301-
texinfo_documents = [
302-
(
303-
master_doc, 'xdesign', u'XDesign Documentation', author, copyright,
304-
'Benchmarking tools for tomography.', 'Miscellaneous'
305-
),
306-
]
152+
.. nbinfo::
307153
308-
# Documents to append as an appendix to all manuals.
309-
#texinfo_appendices = []
154+
This page was generated from `{{ docname }}`__.
155+
Interactive online version:
156+
:raw-html:`<a href="https://mybinder.org/v2/gh/tomography/xdesign/{{ env.config.release }}?filepath={{ docname }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>`
310157
311-
# If false, no module index is generated.
312-
# texinfo_domain_indices = True
158+
__ https://github.com/tomography/xdesign/blob/
159+
{{ env.config.release }}/{{ docname }}
313160
314-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
315-
# texinfo_show_urls = 'footnote'
161+
.. raw:: latex
316162
317-
# If true, do not generate a @detailmenu in the "Top" node's menu.
318-
# texinfo_no_detailmenu = False
163+
\nbsphinxstartnotebook{\scriptsize\noindent\strut
164+
\textcolor{gray}{The following section was generated from
165+
\sphinxcode{\sphinxupquote{\strut {{ docname | escape_latex }}}} \dotfill}}
166+
"""
319167

320168
# Example configuration for intersphinx: refer to the Python standard library.
321169
intersphinx_mapping = {
@@ -342,13 +190,13 @@ def __getattr__(cls, name):
342190
'matplotlib.patheffects',
343191
'matplotlib.axis',
344192
'matplotlib.collections',
193+
'matplotlib.colors',
345194
'cached_property',
346195
'scipy',
347196
'scipy.stats',
348197
'scipy.ndimage',
349198
'scipy.spatial',
350199
'cycler',
351-
'phasepack',
352200
]
353201

354202
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

docs/source/examples.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,3 @@ To `run <http://jupyter.readthedocs.org/en/latest/running.html>`_ these examples
1616
demos/Parameterized
1717
demos/NoReferenceMetrics
1818
demos/FullReferenceMetrics
19-
demos/WetCircles
20-
21-
22-
23-
.. automodule:: xdesign
24-
:members:
25-
:undoc-members:
26-
:show-inheritance:

src/xdesign/phantom/custom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
__all__ = [
1010
'Soil',
1111
'WetCircles',
12-
'SiemensStar',
1312
'Foam',
1413
'Softwood',
1514
]

0 commit comments

Comments
 (0)