From d376c2867fb0285577a5437996bc41790fa7f964 Mon Sep 17 00:00:00 2001 From: wking Date: Tue, 22 Jun 2010 07:20:29 -0400 Subject: Added intersphinx_mapping to doc/conf.py. See http://sphinx.pocoo.org/ext/intersphinx.html#confval-intersphinx_mapping --- doc/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 1090a28..757211c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -196,3 +196,9 @@ latex_documents = [ # If false, no module index is generated. #latex_use_modindex = True + +# -- Options for Intersphinx --------------------------------------------------- + +intersphinx_mapping = { + 'http://docs.python.org/dev': None, + } -- cgit From 2d757a30f5c29d87ce5ebc4311b15f9c4fc6c4b4 Mon Sep 17 00:00:00 2001 From: wking Date: Tue, 22 Jun 2010 09:58:38 -0400 Subject: Use Sphinx autosummary (required by numpydoc) --- doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 757211c..371480e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -25,7 +25,8 @@ import libbe.version # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage', +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', + 'sphinx.ext.doctest', 'sphinx.ext.coverage', 'numpydoc'] # Add any paths that contain templates here, relative to this directory. -- cgit From a4ec8a0c99b2a918fa8a5ae1cab36652d2d9c83e Mon Sep 17 00:00:00 2001 From: wking Date: Tue, 22 Jun 2010 11:10:00 -0400 Subject: Added -c/--creator to `be new` Following Gour's suggestion on the mailing list. --- libbe/command/new.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libbe/command/new.py b/libbe/command/new.py index be18306..a2982a8 100644 --- a/libbe/command/new.py +++ b/libbe/command/new.py @@ -68,6 +68,10 @@ class New (libbe.command.Command): help='The user who reported the bug', arg=libbe.command.Argument( name='reporter', metavar='NAME')), + libbe.command.Option(name='creator', short_name='c', + help='The user who created the bug', + arg=libbe.command.Argument( + name='creator', metavar='NAME')), libbe.command.Option(name='assigned', short_name='a', help='The developer in charge of the bug', arg=libbe.command.Argument( @@ -85,7 +89,10 @@ class New (libbe.command.Command): summary = params['summary'] bugdir = self._get_bugdir() bug = bugdir.new_bug(summary=summary.strip()) - bug.creator = self._get_user_id() + if params['creator'] != None: + bug.creator = params['creator'] + else: + bug.creator = self._get_user_id() if params['reporter'] != None: bug.reporter = params['reporter'] else: -- cgit From 401152d6eec5167043dedde60c0a64d0affbd120 Mon Sep 17 00:00:00 2001 From: wking Date: Tue, 22 Jun 2010 11:30:26 -0400 Subject: Use os.path.join in libbe.storage.util.config.path. Versus previous hardcoded "~/.bugs_everywhere". Also improve docstrings for * libbe.storage.util.config.path * libbe.ui.util.user.get_user_id --- libbe/storage/util/config.py | 4 +++- libbe/ui/util/user.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libbe/storage/util/config.py b/libbe/storage/util/config.py index 724d2d3..7d59712 100644 --- a/libbe/storage/util/config.py +++ b/libbe/storage/util/config.py @@ -37,8 +37,10 @@ Initialized with :func:`libbe.util.encoding.get_filesystem_encoding`. def path(): """Return the path to the per-user config file. + + Defaults to :file:`~/.bugs_everywhere`. """ - return os.path.expanduser("~/.bugs_everywhere") + return os.path.expanduser(os.path.join('~','.bugs_everywhere')) def set_val(name, value, section="DEFAULT", encoding=None): """Set a value in the per-user config file. diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py index 460a1dd..412575f 100644 --- a/libbe/ui/util/user.py +++ b/libbe/ui/util/user.py @@ -101,10 +101,12 @@ def get_user_id(storage=None): The source order is: - 1. Global BE configuration. + 1. Global BE configuration [#]_ (default section, setting 'user'). 2. `storage.get_user_id`, if that function is defined. 3. :func:`get_fallback_username` and :func:`get_fallback_email`. + .. [#] See :mod:`libbe.storage.util.config`. + Notes ----- Sometimes the storage will keep track of the user ID (e.g. most -- cgit