paket yapısı ve dosyaları bu gibi ayarlanır:Sfenks ile fonksiyon imzası nasıl oluşturulur?
$ tree .
.
├── doc
│ ├── Makefile
│ ├── README.md
│ ├── _build
│ ├── _static
│ ├── conf.py
│ ├── foo.rst
│ ├── index.rst
│ └── make.bat
└── foo
├── __init__.py
└── spam.py
$ cat foo/__init__.py
r'''
The Foo module
==============
.. autosummary::
:toctree: generated
spam
'''
$ cat foo/spam.py
r'''
The Spam Module
===============
'''
def prepare(a):
'''Prepare function.
Parameters
----------
a : int
'''
print(a)
$ cat doc/index.rst
Welcome to foo's documentation!
=====================================
API Reference
-------------
.. toctree::
:maxdepth: 1
foo
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
$ cat doc/foo.rst
.. automodule:: foo
sfenks belgeleri oluşturmak için make html
sonra işlev prepare
dışarı listelenir ancak belgelenmiş bu fonksiyonun imzası var olmayan:
$ cat generated/foo.spam.rst
foo.spam
========
.. automodule:: foo.spam
.. rubric:: Functions
.. autosummary::
prepare
Benim soru nasıl üretilir, bu durumda otomatik olarak işlev imzasını nasıl üretebilir?
olurdu bu sorunu olduğunu düşünüyorum kodlanmış 'rst' stubs? – donkopotamus
'sphinx-autogen' – RNA
' foo.spam.rst''''namesinin 'autosummary' bloğu içinde' hazırla 'imzasını içereceğini mi düşünüyorsunuz? Çünkü "autodoc" tarafından üretilecek (ve sonuçta ortaya çıkan ** çıkışa eklenecektir). – donkopotamus