| 1 | # |
| 2 | # build requires sphinx_rtd_theme and numpydoc. |
| 3 | |
| 4 | import sys |
| 5 | import os |
| 6 | import extinction |
| 7 | |
| 8 | # ensure that plot helper is on the path |
| 9 | sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
| 10 | |
| 11 | # generate api directory if it doesn't already exist |
| 12 | if not os.path.exists('api'): |
| 13 | os.mkdir('api') |
| 14 | |
| 15 | # -- General configuration ------------------------------------------------ |
| 16 | |
| 17 | intersphinx_mapping = { |
| 18 | 'python': ('https://docs.python.org/3/', None), |
| 19 | 'numpy': ('https://numpy.org/doc/stable/', None)} |
| 20 | |
| 21 | extensions = [ |
| 22 | 'sphinx.ext.autodoc', |
| 23 | 'sphinx.ext.autosummary', |
| 24 | 'sphinx.ext.intersphinx', |
| 25 | 'sphinx.ext.mathjax', |
| 26 | 'numpydoc', |
| 27 | 'matplotlib.sphinxext.plot_directive'] |
| 28 | |
| 29 | numpydoc_show_class_members = False |
| 30 | autosummary_generate = True |
| 31 | autoclass_content = "class" |
| 32 | autodoc_default_options = {"members": True} |
| 33 | |
| 34 | # The suffix of source filenames. |
| 35 | source_suffix = '.rst' |
| 36 | |
| 37 | |
| 38 | # The master toctree document. |
| 39 | master_doc = 'index' |
| 40 | |
| 41 | # General information about the project. |
| 42 | project = u'extinction' |
| 43 | copyright = u'2016, Kyle Barbary and contributors' |
| 44 | |
| 45 | # The version info for the project you're documenting, acts as replacement for |
| 46 | # |version| and |release|, also used in various other places throughout the |
| 47 | # built documents. |
| 48 | # |
| 49 | # THe short X.Y version. |
| 50 | version = '.'.join(extinction.__version__.split('.')[0:2]) |
| 51 | |
| 52 | # The full version, including alpha/beta/rc tags. |
| 53 | release = extinction.__version__ |
| 54 | |
| 55 | # List of patterns, relative to source directory, that match files and |
| 56 | # directories to ignore when looking for source files. |
| 57 | exclude_patterns = ['_build'] |
| 58 | |
| 59 | # The reST default role (used for this markup: `text`) to use for all |
| 60 | # documents. |
| 61 | default_role = 'obj' |
| 62 | |
| 63 | # The name of the Pygments (syntax highlighting) style to use. |
| 64 | pygments_style = 'sphinx' |
| 65 | |
| 66 | |
| 67 | # -- Options for HTML output ---------------------------------------------- |
| 68 | |
| 69 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 70 | # a list of builtin themes. |
| 71 | html_theme = "sphinx_rtd_theme" |
| 72 | |
| 73 | # Add any paths that contain custom static files (such as style sheets) here, |
| 74 | # relative to this directory. They are copied after the builtin static files, |
| 75 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 76 | html_static_path = [] |
| 77 | |
| 78 | # Output file base name for HTML help builder. |
| 79 | htmlhelp_basename = 'extinctiondoc' |
| 80 | |
| 81 | |
| 82 | # -- Options for LaTeX output --------------------------------------------- |
| 83 | |
| 84 | latex_elements = { |
| 85 | # The paper size ('letterpaper' or 'a4paper'). |
| 86 | #'papersize': 'letterpaper', |
| 87 | |
| 88 | # The font size ('10pt', '11pt' or '12pt'). |
| 89 | #'pointsize': '10pt', |
| 90 | |
| 91 | # Additional stuff for the LaTeX preamble. |
| 92 | #'preamble': '', |
| 93 | } |
| 94 | |
| 95 | # Grouping the document tree into LaTeX files. List of tuples |
| 96 | # (source start file, target name, title, |
| 97 | # author, documentclass [howto, manual, or own class]). |
| 98 | latex_documents = [ |
| 99 | ('index', 'extinction.tex', u'extinction Documentation', |
| 100 | u'Kyle Barbary', 'manual'), |
| 101 | ] |
| 102 | |
| 103 | # -- Options for manual page output --------------------------------------- |
| 104 | |
| 105 | # One entry per manual page. List of tuples |
| 106 | # (source start file, name, description, authors, manual section). |
| 107 | man_pages = [ |
| 108 | ('index', 'extinction', u'extinction Documentation', |
| 109 | [u'Kyle Barbary'], 1) |
| 110 | ] |
| 111 | |
| 112 | # -- Options for Texinfo output ------------------------------------------- |
| 113 | |
| 114 | # Grouping the document tree into Texinfo files. List of tuples |
| 115 | # (source start file, target name, title, author, |
| 116 | # dir menu entry, description, category) |
| 117 | texinfo_documents = [ |
| 118 | ('index', 'extinction', u'extinction Documentation', |
| 119 | u'Kyle Barbary', 'extinction', 'One line description of project.', |
| 120 | 'Miscellaneous'), |
| 121 | ] |