Commit 49ddc4c
committed
fix(docs): make ai_shell example sphinx-gallery compatible
- Rename to ai_shell_machine.py to match gallery filename_pattern
- Move PEP 723 metadata after docstring so gallery finds the RST title
- Lazy-import openai so the class definition works without the package
(allows diagram generation during docs build)
- Skip sphinx-gallery execution via sys.modules guard
- Graceful degradation: main() prints a message if openai is missing1 parent b4265c6 commit 49ddc4c
1 file changed
Lines changed: 18 additions & 3 deletions
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
410 | 408 | | |
411 | 409 | | |
412 | 410 | | |
| 411 | + | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
513 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
514 | 529 | | |
515 | 530 | | |
516 | 531 | | |
| |||
534 | 549 | | |
535 | 550 | | |
536 | 551 | | |
537 | | - | |
| 552 | + | |
538 | 553 | | |
0 commit comments