これは、 Sphinxに関する以前の質問の一般化されたバージョンです。
クラスと関数を含むモジュールまたはパッケージを再帰的に自動文書化する方法はありますか?
関数ごとにautofunction
orディレクティブを追加するのはばかげていると思います。automodule
プロセスを自動化する方法が必要です。そうしないと、Sphinxを使用する意味がまったくわかりません。
明確化: 代わりに:
.. automodule:: segments.segments
.. autoclass:: segments.segments.Seg
.. automethod:: Seg.method_1
.. automethod:: Seg.method_2
.. automethod:: Seg.method_3
.......
.. automethod:: Seg.method_n
すべてのメソッド名を手動でカットアンドペーストし、それに応じてドキュメントを更新する必要があるため、次のようなコマンドが必要です。
.. automodule:: segments.segments
.. autoclass:: segments.segments.Seg
.. MAGIC COMMAND: Automatically print the docstrings and signatures
of all Seg() methods.