File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ def _auto_package(mod: dc.Module) -> list[Section]:
55
55
else :
56
56
desc = ""
57
57
58
- return [Section (title = mod .name , desc = desc , contents = contents )]
58
+ return [Section (title = mod .path , desc = desc , contents = contents )]
59
59
60
60
61
61
def _is_external_alias (obj : dc .Alias | dc .Object , mod : dc .Module ):
62
- package_name = mod .name .split ("." )[0 ]
62
+ package_name = mod .path .split ("." )[0 ]
63
63
64
64
if not isinstance (obj , dc .Alias ):
65
65
return False
Original file line number Diff line number Diff line change @@ -106,3 +106,14 @@ def test_blueprint_lookup_error_message(bp):
106
106
"Does an object with the path quartodoc.bbb.ccc exist?"
107
107
in exc_info .value .args [0 ]
108
108
)
109
+
110
+
111
+ def test_blueprint_auto_package (bp ):
112
+ layout = blueprint (lo .Layout (package = "quartodoc.tests.example" ))
113
+ sections = layout .sections
114
+ assert len (sections ) == 1
115
+ assert sections [0 ].title == "quartodoc.tests.example"
116
+ assert sections [0 ].desc == "A module"
117
+
118
+ # 4 objects documented
119
+ assert len (sections [0 ].contents ) == 4
You can’t perform that action at this time.
0 commit comments