SPhinx document生成について
セットアップ
- ドキュメンテーションツール SPhinxのインストール
$ conda install sphinx $ pip install sphinx_rtd_theme
- 
スクラッチから始める際は以下のコマンドを用いてセットアップを行う (本パッケージではセットアップ済みであるため、この作業は不要) $ sphinx-quickstart- 
また、benten_clientの Pythonモジュールのドキュメントの自動生成を行うため、一つ上のディレクトリにて、以下のコマンドを実行する。 $ sphinx-apidoc -f -o docs/sphinx benten_client
 
- 
- sphinx-quickstart実行時に生成さた conf.py を修正する。
#1つ目の改修 # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys sys.path.insert(0, os.path.abspath('../../')) #2つ目の改修 # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ["sphinx.ext.autodoc"] # 3つ目の改修 # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # #html_theme = 'alabaster' html_theme = 'sphinx_rtd_theme'
- ドキュメントのインストール
$ cd docs $ make html
- 
生成されたドキュメントは以下のファイルから辿ることができる。ユーザーマニュアル等の詳細はこちらを参考にすること。 - _build\html\index.html