sphinx and docstrings (was devhelp extension)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

sphinx and docstrings (was devhelp extension)

jerome
> "I did not look in details, but internal files generation for
 gramps API complains about gen.lib.media and gen.lib.citation.
 Something like Media class missing."

A little bit cryptic.

ImportError: No module named 'gramps.gen.lib.media'
Gramps/docs/gen/gen_lib.rst:222: WARNING: autodoc: failed to import class 'Media' from module 'gramps.gen.lib.citation';
the following exception was raised:
Traceback (most recent call last):
  File "Sphinx-1.5.2-py3.4.egg/sphinx/util/inspect.py", line 128, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: 'module' object has no attribute 'Media'

'gen.lib.citation' seems to only call MediaBase.
So, I do not understand from where comes this 'gen.lib.media' reference!!!
 
Maybe two updates:

diff --git a/gramps/gen/db/__init__.py b/gramps/gen/db/__init__.py
index a5c70dc..9359a72 100644
--- a/gramps/gen/db/__init__.py
+++ b/gramps/gen/db/__init__.py
@@ -70,3 +70,4 @@ from .txn import *
 from .exceptions import *
 from .undoredo import *
 from .utils import *
+from .generic import *

diff --git a/docs/gen/gen_display.rst b/docs/gen/gen_display.rst
index b2b84e7..8fe358f 100644
--- a/docs/gen/gen_display.rst
+++ b/docs/gen/gen_display.rst
@@ -10,3 +10,10 @@ Name
    :members:
    :undoc-members:
    :show-inheritance:
+
+Place
+====================================
+.. automodule:: gramps.gen.display.place
+   :members:
+   :undoc-members:
+   :show-inheritance:


Was not able to properly update DB modules.
Bug report #8855 was already filled for that.


[1] https://gramps-project.org/bugs/view.php?id=8855
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel