Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[FR] Make it easier to show source in docs for thin classes

オープン
#1,459 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
jupyter, python
領域
documentation

調査の方向性

nbdev の show_doc エントリーポイントから始め、Colors の例を再現して、現在薄いクラスがどのようにレンダリングされているかを調べます。ドキュメントのレンダリングパスを追跡し、full_source=True を指定するオプトイン形式ではクラスの完全なソースが表示される一方で、既存の show_doc(Colors) の動作は変わらないことを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug

Minimally reproducible example:

from enum import Enum  # StrEnum for python >= 3.12  
from nbdev import show_doc

class Colors(str, Enum):  # Or `StrEnum` if on python >= 3.12
    "Enum with the valid colors we can use in our package"
    RED = "red"
    GREEN = "green"
    BLUE = "blue"

show_doc(Colors)

image

Issue description

This it not really a bug, more like a feature request. When defining thin classes, such as enums or dataclasses, the documentation for those classes shows a very uninformative ClassName (*values).

For this use case, it would be really useful to have an option that would allow inlining the entire class source in the docs, to get a view of all the possible values. To avoid breaking existing code this could be implemented as an optional argument to the show_doc method, so to enable this one would do something like show_doc(Colors, full_source=True)

主要言語
Jupyter Notebook
スター
5.3k
フォーク
517
平均マージ
1分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AnswerDotAI/nbdev のほかの issue

AnswerDotAI/nbdev の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。