from test import python_tree
def title(modname):
- t = ':mod:`%s`' % modname
+ t = ':py:mod:`%s`' % modname
delim = '*'*len(t)
return '\n'.join([delim, t, delim, '', ''])
To write a plugin, you simply create a new file in the
:file:`libbe/command/` directory. Take a look at one of the simpler
-plugins (e.g. :mod:`libbe.command.remove`) for an example of how that
+plugins (e.g. :py:mod:`libbe.command.remove`) for an example of how that
looks, and to start getting a feel for the libbe interface.
-See :mod:`libbe.command.base` for the definition of the important
+See :py:mod:`libbe.command.base` for the definition of the important
classes :class:`~libbe.command.base.Option`,
:class:`~libbe.command.base.Argument`,
:class:`~libbe.command.base.Command`,
any of your completable :class:`~libbe.command.base.Argument`
instances (in your command's ``.options`` or ``.args``) should be
initialized with some valid completion_callback function. Some common
-cases are defined in :mod:`libbe.command.util`. If you need more
-flexibility, see :mod:`libbe.command.list`\'s ``--sort`` option for an
+cases are defined in :py:mod:`libbe.command.util`. If you need more
+flexibility, see :py:mod:`libbe.command.list`\'s ``--sort`` option for an
example of extensions via :class:`libbe.command.util.Completer`, or
write a custom completion function from scratch.
Adding user interfaces
======================
-Take a look at :mod:`libbe.ui.command_line` for an example.
+Take a look at :py:mod:`libbe.ui.command_line` for an example.
Basically you'll need to setup a
:class:`~libbe.command.base.UserInterface` instance for running
commands. More details to come after I write an HTML UI...
$ python interfaces/web/cfbe.py PATH_TO_REPO
-Eventually we'll move it into :mod:`libbe.ui` so it will be installed
+Eventually we'll move it into :py:mod:`libbe.ui` so it will be installed
automatically with every BE installation.
$ make
-to build some auto-generated files (e.g. :mod:`libbe._version`), and::
+to build some auto-generated files (e.g. :py:mod:`libbe._version`), and::
$ make install
However, there are some differences compared to centralized
bugtrackers. Because bugs and comments can be created by several
-users in parallel, they have globally unique :mod:`IDs
+users in parallel, they have globally unique :py:mod:`IDs
<libbe.util.id>` rather than numbers. There is also a
developer-friendly command-line_ interface to compliment the
user-friendly :doc:`web </http>` and :doc:`email </email>` interfaces.
Inside the ``.be`` directory (among other things) there will be a long
UUID_ directory. This is your bug directory. The idea is that you
could keep several bug directories in the same repository, using one
-to track bugs, another to track roadmap issues, etc. See :mod:`IDs
+to track bugs, another to track roadmap issues, etc. See :py:mod:`IDs
<libbe.util.id>` for details. For BE itself, the bug directory is
``bea86499-824e-4e77-b085-2d581fa9ccab``, which is why all the bug and
comment IDs in this tutorial will start with ``bea/``.
To facilitate faster loading, submodules are not imported by default.
The available submodules are:
-* :mod:`libbe.bugdir`
-* :mod:`libbe.bug`
-* :mod:`libbe.comment`
-* :mod:`libbe.command`
-* :mod:`libbe.diff`
-* :mod:`libbe.error`
-* :mod:`libbe.storage`
-* :mod:`libbe.ui`
-* :mod:`libbe.util`
-* :mod:`libbe.version`
-* :mod:`libbe._version`
+* :py:mod:`libbe.bugdir`
+* :py:mod:`libbe.bug`
+* :py:mod:`libbe.comment`
+* :py:mod:`libbe.command`
+* :py:mod:`libbe.diff`
+* :py:mod:`libbe.error`
+* :py:mod:`libbe.storage`
+* :py:mod:`libbe.ui`
+* :py:mod:`libbe.util`
+* :py:mod:`libbe.version`
+* :py:mod:`libbe._version`
"""
TESTING = False
To reduce module load time, test suite generation is turned of by
default. If you *do* want to generate the test suites, set
-``TESTING=True`` before loading any :mod:`libbe` submodules.
+``TESTING=True`` before loading any :py:mod:`libbe` submodules.
Examples
--------
Storage instance containing the bug directory. If
`from_storage` is `False`, `storage` may be `None`.
uuid : str, optional
- Set the bugdir UUID (see :mod:`libbe.util.id`).
+ Set the bugdir UUID (see :py:mod:`libbe.util.id`).
Useful if you are loading one of several bugdirs
stored in a single Storage instance.
from_storage : bool, optional
See Also
--------
-:mod:`libbe.storage.http` : the associated client
+:py:mod:`libbe.storage.http` : the associated client
"""
import logging
Also define assorted implementations for the Storage classes:
-* :mod:`libbe.storage.vcs`
-* :mod:`libbe.storage.http`
+* :py:mod:`libbe.storage.vcs`
+* :py:mod:`libbe.storage.http`
Also define an assortment of storage-related tools and utilities:
-* :mod:`libbe.storage.util`
+* :py:mod:`libbe.storage.util`
"""
import base
See Also
--------
-:mod:`libbe.command.serve_storage` : the associated server
+:py:mod:`libbe.command.serve_storage` : the associated server
"""
from __future__ import absolute_import
See Also
--------
-:mod:`libbe.storage.util.settings_object` : bundle properties into a convenient package
+:py:mod:`libbe.storage.util.settings_object` : bundle properties into a convenient package
"""
See Also
--------
-:mod:`libbe.storage.util.properties` : underlying property definitions
+:py:mod:`libbe.storage.util.properties` : underlying property definitions
"""
import libbe
.../.be/BUGDIR/bugs/BUG/comments/COMMENT
^-- root path
- See :mod:`libbe.util.id` for a discussion of ID formats.
+ See :py:mod:`libbe.util.id` for a discussion of ID formats.
Examples
--------
See Also
--------
- :mod:`libbe.storage.util.upgrade`
+ :py:mod:`libbe.storage.util.upgrade`
"""
if path == None:
path = os.path.join(self.repo, '.be', 'version')
"""Tools for getting, setting, creating, and parsing the user's ID.
IDs will look like 'John Doe <jdoe@example.com>'. Note that the
-:mod:`libbe.storage.vcs.arch <Arch VCS backend>` *enforces* IDs with
+:py:mod:`libbe.storage.vcs.arch <Arch VCS backend>` *enforces* IDs with
this format.
Do not confuse the user IDs discussed in this module, which refer to
-humans, with the "user IDs" discussed in :mod:`libbe.util.id`, which
+humans, with the "user IDs" discussed in :py:mod:`libbe.util.id`, which
are human-readable tags refering to objects.
"""
2. `storage.get_user_id`, if that function is defined.
3. :py:func:`get_fallback_username` and :py:func:`get_fallback_email`.
- .. [#] See :mod:`libbe.storage.util.config`.
+ .. [#] See :py:mod:`libbe.storage.util.config`.
Notes
-----