mirror of https://github.com/borgbackup/borg.git
parent
8b2c9fd7db
commit
b1466f530b
86
docs/api.rst
86
docs/api.rst
|
@ -1,86 +0,0 @@
|
|||
|
||||
.. IMPORTANT: this file is auto-generated by "setup.py build_api", do not edit!
|
||||
|
||||
|
||||
API Documentation
|
||||
=================
|
||||
|
||||
.. automodule:: borg.archive
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.archiver
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.cache
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.chunker
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.compress
|
||||
:members: get_compressor, Compressor, CompressorBase
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.crypto
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.fuse
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.hashindex
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.helpers
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.key
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.keymanager
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.locking
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.logger
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.lrucache
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.platform
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.platform_linux
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.remote
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.repository
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.shellpattern
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: borg.xattr
|
||||
:members:
|
||||
:undoc-members:
|
|
@ -183,20 +183,19 @@ Important notes:
|
|||
Regenerate usage files
|
||||
----------------------
|
||||
|
||||
Usage and API documentation is currently committed directly to git,
|
||||
Usage documentation is currently committed directly to git,
|
||||
although those files are generated automatically from the source
|
||||
tree.
|
||||
|
||||
When a new module is added, the ``docs/api.rst`` file needs to be
|
||||
regenerated::
|
||||
|
||||
./setup.py build_api
|
||||
|
||||
When a command is added, a commandline flag changed, added or removed,
|
||||
the usage docs need to be rebuilt as well::
|
||||
|
||||
./setup.py build_usage
|
||||
|
||||
However, we prefer to do this as part of our :ref:`releasing`
|
||||
preparations, so it is generally not necessary to update these when
|
||||
submitting patches that change something about the command line.
|
||||
|
||||
Building the docs with Sphinx
|
||||
-----------------------------
|
||||
|
||||
|
@ -270,7 +269,7 @@ Checklist:
|
|||
- update ``CHANGES.rst``, based on ``git log $PREVIOUS_RELEASE..``
|
||||
- check version number of upcoming release in ``CHANGES.rst``
|
||||
- verify that ``MANIFEST.in`` and ``setup.py`` are complete
|
||||
- ``python setup.py build_api ; python setup.py build_usage`` and commit
|
||||
- ``python setup.py build_usage`` and commit
|
||||
- tag the release::
|
||||
|
||||
git tag -s -m "tagged/signed release X.Y.Z" X.Y.Z
|
||||
|
|
35
setup.py
35
setup.py
|
@ -213,43 +213,8 @@ class build_usage(Command):
|
|||
return is_subcommand
|
||||
|
||||
|
||||
class build_api(Command):
|
||||
description = "generate a basic api.rst file based on the modules available"
|
||||
|
||||
user_options = [
|
||||
('output=', 'O', 'output directory'),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
print("auto-generating API documentation")
|
||||
with open("docs/api.rst", "w") as doc:
|
||||
doc.write("""
|
||||
.. IMPORTANT: this file is auto-generated by "setup.py build_api", do not edit!
|
||||
|
||||
|
||||
API Documentation
|
||||
=================
|
||||
""")
|
||||
for mod in sorted(glob('borg/*.py') + glob('borg/*.pyx')):
|
||||
print("examining module %s" % mod)
|
||||
mod = mod.replace('.pyx', '').replace('.py', '').replace('/', '.')
|
||||
if "._" not in mod:
|
||||
doc.write("""
|
||||
.. automodule:: %s
|
||||
:members:
|
||||
:undoc-members:
|
||||
""" % mod)
|
||||
|
||||
|
||||
cmdclass = {
|
||||
'build_ext': build_ext,
|
||||
'build_api': build_api,
|
||||
'build_usage': build_usage,
|
||||
'sdist': Sdist
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue