Skip to content

Commit 48fc421

Browse files
committed
allowing load chapters for Pymathics modules
1 parent 8170935 commit 48fc421

File tree

1 file changed

+5
-17
lines changed
  • mathics_django/web/controllers

1 file changed

+5
-17
lines changed

mathics_django/web/controllers/doc.py

+5-17
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def check_for_pymathics_load():
3131
print("XXX refresh pymathics doc", pymathics_modules)
3232
new_modules = pymathics_modules - seen_pymathics_modules
3333
for new_module in new_modules:
34-
title, _ = get_module_doc(new_module)
3534
mathics3_module_part = documentation.parts_by_slug.get(
3635
"mathics3-modules", None
3736
)
@@ -46,25 +45,14 @@ def check_for_pymathics_load():
4645
seen_pymathics_modules = copy(pymathics_modules)
4746
return
4847

49-
# The part already exists. Lets add the new chapter.
50-
51-
chapter = mathics3_module_part.doc.gather_chapter_doc_fn(
52-
mathics3_module_part,
53-
title,
54-
mathics3_module_part.doc,
55-
)
56-
from trepan.api import debug
57-
58-
debug()
59-
submodule_names_seen = set()
60-
chapter.doc.doc_chapter(
48+
# The "Mathics3 modules" part already exists. Lets add the new chapter.
49+
chapter = documentation.doc_chapter(
6150
new_module,
6251
mathics3_module_part,
63-
pymathics_builtins_by_module,
64-
seen_pymathics_modules,
65-
submodule_names_seen,
52+
pymathics_builtins_by_module
6653
)
67-
chapter.get_tests()
54+
mathics3_module_part.chapters.append(chapter)
55+
6856
seen_pymathics_modules = copy(pymathics_modules)
6957
pass
7058

0 commit comments

Comments
 (0)