[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50706] trunk/blender/source/tests/ bl_rna_wiki_reference.py: wiki reference checker now prints undocumented sections, more helpful then a massive list of all props.

Campbell Barton ideasman42 at gmail.com
Tue Sep 18 02:41:03 CEST 2012


Revision: 50706
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50706
Author:   campbellbarton
Date:     2012-09-18 00:41:00 +0000 (Tue, 18 Sep 2012)
Log Message:
-----------
wiki reference checker now prints undocumented sections, more helpful then a massive list of all props.

Modified Paths:
--------------
    trunk/blender/source/tests/bl_rna_wiki_reference.py

Modified: trunk/blender/source/tests/bl_rna_wiki_reference.py
===================================================================
--- trunk/blender/source/tests/bl_rna_wiki_reference.py	2012-09-18 00:27:13 UTC (rev 50705)
+++ trunk/blender/source/tests/bl_rna_wiki_reference.py	2012-09-18 00:41:00 UTC (rev 50706)
@@ -54,21 +54,38 @@
         struct = rna_info.BuildRNAInfo()[0]
         for struct_id, v in sorted(struct.items()):
             props = [(prop.identifier, prop) for prop in v.properties]
+            struct_path = "bpy.types.%s" % struct_id[1]
             for prop_id, prop in props:
-                yield "bpy.types.%s.%s" % (struct_id[1], prop_id)
+                yield (struct_path, "%s.%s" % (struct_path, prop_id))
 
         for submod_id in dir(bpy.ops):
+            op_path = "bpy.ops.%s" % submod_id
             for op_id in dir(getattr(bpy.ops, submod_id)):
-                yield "bpy.ops.%s.%s" % (submod_id, op_id)
+                yield (op_path, "%s.%s" % (op_path, op_id))
 
     # check coverage
     from bl_operators import wm
 
-    for rna_id in rna_ids():
+    set_group_all = set()
+    set_group_doc = set()
+
+    for rna_group, rna_id in rna_ids():
         url = wm.WM_OT_doc_view_manual._lookup_rna_url(rna_id, verbose=False)
         print(rna_id, "->", url)
 
+        set_group_all.add(rna_group)
+        if url is not None:
+            set_group_doc.add(rna_group)
 
+    # finally report undocumented groups
+    print("")
+    print("---------------------")
+    print("Undocumented Sections")
+    
+    for rna_group in sorted(set_group_all):
+        if rna_group not in set_group_doc:
+            print("%s.*" % rna_group)
+
 def test_urls():
     pass  # TODO
 




More information about the Bf-blender-cvs mailing list