Read the docsにアップロードしたドキュメントにDocstring出力されない
環境
- sphinx 1.8.5
やりたいこと
Read the DocsにPythonライブラリのリファレンスを公開したいです。
リファレンスの主な内容はDocstringです。
今の状態
Read the Docsにアップロードはできましたが、Docstringは出力されていませんでした。
https://annofab-api-python-client.readthedocs.io/en/latest/annofabapi.html#annofabapi-api-module
ローカル環境で、make html
コマンドを実行した場合は、Docstringは出力されます。
怪しそうな部分
Read the Docsのログを見ると、以下の警告が表示されています。
WARNING: autodoc: failed to import module 'api' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'exceptions' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'generated_api' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'resource' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'typing' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'utils' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'wrapper' from module 'annofabapi'; the following exception was raised:
No module named 'backoff'
WARNING: autodoc: failed to import module 'annofabapi'; the following exception was raised:
No module named 'backoff'
https://readthedocs.org/api/v2/build/9201527.txt
backoffはannofabapiの依存パッケージです。
https://github.com/litl/backoff
他の依存パッケージと異なる部分は、backoffにはsetup.pyがないことです。
質問
Reat the DocsのドキュメントにDocstringを出力させるには、どのように対応すればよいでしょうか?」
追記:Read the Docsの設定
高度な設定のDefault Settings
requirements-doc.txtを追加
requirements-doc.txtを追加して、Read the Docsの高度な設定で、requirements-doc.txtを設定しました。
しかし、結果は変わりませんでした。
また、ビルド結果のログを見る限り、pip isntall
時にrequirements-doc.txt
が読み込まれていませんでした。
どのような設定にすれば、requirements-doc.txt
が読み込まれるでしょうか?
/home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/bin/python -m pip install --upgrade --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/.cache/pip Pygments==2.3.1 setuptools==41.0.1 docutils==0.14 mock==1.0.1 pillow==5.4.1 alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.8.1 recommonmark==0.5.0 sphinx<2 sphinx-rtd-theme<0.5 readthedocs-sphinx-ext<0.7
Requirement already up-to-date: Pygments==2.3.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (2.3.1)
Requirement already up-to-date: setuptools==41.0.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (41.0.1)
Requirement already up-to-date: docutils==0.14 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (0.14)
Requirement already up-to-date: mock==1.0.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (1.0.1)
Requirement already up-to-date: pillow==5.4.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (5.4.1)
Requirement already up-to-date: alabaster!=0.7.5,<0.8,>=0.7 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (0.7.12)
Requirement already up-to-date: commonmark==0.8.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (0.8.1)
Requirement already up-to-date: recommonmark==0.5.0 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (0.5.0)
Requirement already up-to-date: sphinx<2 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (1.8.5)
Requirement already up-to-date: sphinx-rtd-theme<0.5 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (0.4.3)
Requirement already up-to-date: readthedocs-sphinx-ext<0.7 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (0.6.0)
Requirement already satisfied, skipping upgrade: future in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from commonmark==0.8.1) (0.17.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (1.12.0)
Requirement already satisfied, skipping upgrade: packaging in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (19.0)
Requirement already satisfied, skipping upgrade: requests>=2.0.0 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (2.22.0)
Requirement already satisfied, skipping upgrade: babel!=2.0,>=1.3 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (2.7.0)
Requirement already satisfied, skipping upgrade: snowballstemmer>=1.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (1.2.1)
Requirement already satisfied, skipping upgrade: imagesize in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (1.1.0)
Requirement already satisfied, skipping upgrade: Jinja2>=2.3 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (2.10.1)
Requirement already satisfied, skipping upgrade: sphinxcontrib-websupport in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from sphinx<2) (1.1.2)
Requirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from packaging->sphinx<2) (2.4.0)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from requests>=2.0.0->sphinx<2) (2019.3.9)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from requests>=2.0.0->sphinx<2) (2.8)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from requests>=2.0.0->sphinx<2) (1.25.3)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from requests>=2.0.0->sphinx<2) (3.0.4)
Requirement already satisfied, skipping upgrade: pytz>=2015.7 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from babel!=2.0,>=1.3->sphinx<2) (2019.1)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /home/docs/checkouts/readthedocs.org/user_builds/annofab-api-python-client/envs/latest/lib/python3.7/site-packages (from Jinja2>=2.3->sphinx<2) (1.1.1)
Command time: 2s Return: 0