|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | + |
| 3 | +import sys |
| 4 | +import toml |
| 5 | +from pathlib import Path |
| 6 | +from pygments.lexers.python import CythonLexer |
| 7 | +from sphinx.highlighting import lexers |
| 8 | + |
| 9 | +pyproject = toml.load(Path(__file__).parents[1].joinpath('pyproject.toml')) |
| 10 | +# -- Path setup -------------------------------------------------------------- |
| 11 | + |
| 12 | +sys.path.append(Path(__file__).parents[1]) |
| 13 | +# -- Project information ----------------------------------------------------- |
| 14 | + |
| 15 | +project = pyproject['tool']['poetry']['name'] |
| 16 | +copyright = '2019, dxfeed' |
| 17 | +author = 'dxfeed' |
| 18 | + |
| 19 | +# The short X.Y version |
| 20 | +version = pyproject['tool']['poetry']['version'] |
| 21 | +# The full version, including alpha/beta/rc tags |
| 22 | +release = pyproject['tool']['poetry']['version'] |
| 23 | + |
| 24 | + |
| 25 | +# -- General configuration --------------------------------------------------- |
| 26 | +# Add any Sphinx extension module names here, as strings. |
| 27 | +extensions = [ |
| 28 | + 'sphinx.ext.autodoc', |
| 29 | + 'sphinx.ext.coverage', |
| 30 | + 'sphinx.ext.napoleon', # numpy style docstrings |
| 31 | + 'sphinx.ext.intersphinx' |
| 32 | +] |
| 33 | + |
| 34 | +# Add any paths that contain templates here, relative to this directory. |
| 35 | +templates_path = ['_templates'] |
| 36 | + |
| 37 | +# The suffix(es) of source filenames. |
| 38 | +source_suffix = '.rst' |
| 39 | + |
| 40 | +# The master toctree document. |
| 41 | +master_doc = 'index' |
| 42 | + |
| 43 | +# The language for content autogenerated by Sphinx. |
| 44 | +language = 'en' |
| 45 | + |
| 46 | +# List of patterns, relative to source directory, that match files and |
| 47 | +# directories to ignore when looking for source files. |
| 48 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 49 | + |
| 50 | +# -- Options for HTML output ------------------------------------------------- |
| 51 | +html_static_path = ['_static'] |
| 52 | +html_css_files = ['custom.css'] |
| 53 | +html_js_files = ['custom.js'] |
| 54 | + |
| 55 | +# The theme to use for HTML and HTML Help pages. |
| 56 | +html_theme = 'alabaster' |
| 57 | +html_theme_options = { |
| 58 | + 'body_max_width': '80%', |
| 59 | + 'show_powered_by': False, |
| 60 | + 'sidebar_collapse': True |
| 61 | +} |
| 62 | + |
| 63 | +# -- Options for HTMLHelp output --------------------------------------------- |
| 64 | + |
| 65 | +# Output file base name for HTML help builder. |
| 66 | +htmlhelp_basename = 'dxfeeddoc' |
| 67 | + |
| 68 | +# remove view source link |
| 69 | +html_show_sourcelink = False |
| 70 | + |
| 71 | +# highlight cython |
| 72 | +lexers['cython'] = CythonLexer() |
0 commit comments