2016-11-29 13 views
0

今すぐ私のドキュメント/ソースは、にdoctreeapi.rstという別のファイルをインポートするindex.rstを持っています。私はこのapi.rstファイルをpythonモジュールをautodocしたいと思います。このモジュールは、どのクラスにも付属していない多くの関数を持つ.pyですが、その機能によってグループ化されています。それはこれらのグループを考慮せずに、すべての機能をautodocのだろうしかしReadthedocs:1つのファイルで同じモデル関数を別々にオートドックする方法はありますか?

fbbotw api 
========== 

.. automodule:: fbbotw 
    :members: 

:私はこのようなAPIファイルを書くことができます。今、私はこのような.. autofunction::ディレクティブを使用していることをやろうとしている:それはローカルで動作しますが、オンラインreadthedocsだけapi.rstのタイトルを作成しますが、

fbbotw Functions reference 
========================== 

Graph API Functions 
------------------- 

.. autofunction:: fbbotw.get_user_information 


Send Api Functions 
------------------ 

Sender Actions 
~~~~~~~~~~~~~~ 

.. autofunction:: fbbotw.typing 

Content Types 
~~~~~~~~~~~~~ 

.. autofunction:: fbbotw.post_text_message 
.. autofunction:: fbbotw.post_audio_attachment 
.. autofunction:: fbbotw.post_file_attachment 
.. autofunction:: fbbotw.post_image_attachment 
.. autofunction:: fbbotw.post_video_attachment 

Quick Replies 
~~~~~~~~~~~~~ 

.. autofunction:: fbbotw.post_text_w_quickreplies 


Templates 
~~~~~~~~~ 

.. autofunction:: fbbotw.post_button_template 
.. autofunction:: fbbotw.post_generic_template 
.. autofunction:: fbbotw.post_list_template 
.. autofunction:: fbbotw.post_receipt_template 

Buttons 
~~~~~~~ 

.. autofunction:: fbbotw.post_call_button 


Thread Settings Functions 
------------------------- 

.. autofunction:: fbbotw.post_settings 
.. autofunction:: fbbotw.post_greeting_text 
.. autofunction:: fbbotw.post_start_button 
.. autofunction:: fbbotw.post_persistent_menu 
.. autofunction:: fbbotw.post_domain_whitelisting 
.. autofunction:: fbbotw.post_account_linking_url 

.. autofunction::は何もしません。それを行うための別の方法はありますか、あるいは構成を見落としていますか?私が試してみました

他のもの:グループごとに

api.rstでは、別のファイルを作成し、それをtoctreeインポートして、これらのグループ内のファイルは、私は、そのファイルにautodocのしたいメンバーを指定.. automodule: fbbotw :members: function1, function2...を使用しています。

私は実際にはreadthedocsの管理者には悪い設定かもしれないと思います。すべてがローカルでうまく動作するので、オンラインで動作させることはできません。

+1

あなたは[sphinx-apidoc](https://codeandchaos.wordpress.com/2012/07/30/sphinx-autodoc-tutorial-for-dummies/)(ページのbutt)を使ってみましたか?自動文書 – Tobey

+0

読書室ではオートイエッテは全く機能しますか? –

+0

@トビーほとんどのチュートリアルはreadthedocsのものと同じですので、これは私が行ったのと同じです。 –

答えて

0

Sphinxにはパッケージのrstファイルを自動的に生成するためのautodocs apiがあります。 auteesが実行された後、各最初の部分を編集して詳細情報を追加することができます。古いファイルを上書きする可能性があるため、autodeskを実行するときは注意してください。 @MikhailKorobovのコメントに回答

0

ので問題はautomoduleと対autofunctionに関連していない、それは正しい、動作していない autodocsのですか? http://read-the-docs.readthedocs.io/en/latest/faq.html#my-project-isn-t-building-with-autodoc

autodocのセットアップそれをできなかったので、ImportErrorは私のモジュールの上にありました。彼らはこの 問題のためのFAQセクションを持っています。 readthedocsビルディングログを調べると、私はこのImportErrorが私のテストではカバーされておらず、ドキュメントを作る環境も異なっていたことが分かりました。現在作業中:http://fbbotw.readthedocs.io/en/latest/

関連する問題