Reconsider position of Attributes and Methods sections
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
リンク先の行にある numpydoc/docscrape.py のセクション順序ロジックから始めてください。現在の順序が関数に対してクラスをどのように扱っているかを確認し、変更する前に未解決の設計に関する議論を解決してください。クラスのパラメーターを適切にグループ化しつつ、既存の関数およびメソッドのレイアウトを崩さない、合意された順序が決まれば完了です。
索引モデルが issue の本文から書いたものです。
説明
#571 changed the section order to move Attributes and Methods right behind Parameters.
The order is now https://github.com/numpy/numpydoc/blob/532cd7d71ceee4e00fd13fa5faf038f2b4d95905/numpydoc/docscrape.py#L118-L137
For classes, we can get the order Paramters > Attributes > Methods > Other Parameters , which IMHO is not quite usable as the Other Parameters are very far away from Parameters.
We have to consider that the ordering should work both for classes and methods. As far as I understand, the motivation for Other Parameters is to deemphasise them and for methods to have the (typically short) sections Returns/Yields/Receives closer to the top.
I propose to move Attributes and Methods below Other Parameters, i.e.
Parameters
Returns
Yields
Receives
Other Parameters
Attributes
Methods
- There's no change for functions / methods as the don't use Attributes and Methods
- There's no change for classes without "Other Parameters" because they don't use Returns/Yields/Receives
- For classes with "Other Parameters" the sequence is "Parameters > Other Parameters > Attributes > Methods", which I think is better because the first two are input values to the construtor, while the other two are properties of the class.
One could argue that one should alternatively not use "Other Parameters" if one wants to render them next to each other anyway. But I claim it's still helpful to de-emphasize additional parameters through that extra section.
- 主要言語
- Python
- スター
- 354
- フォーク
- 185
- 平均マージ
- 4分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
numpy/numpydoc のほかの issue
-
Don't require ``RT01`` for properties再び着手できるかも @Nani-2007-code が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
-
DOC: Version link overflowing on navbar再び着手できるかも @swoyer2 が 52 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
needs-decision
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
reflex-dev/reflex#8026 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
superlinked/sie#1033 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/ponymail-foal#365 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
NousResearch/hermes-labs-plugins#116 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
gcivil-nyu-org/team-3-fall26#192 ·
メンテナーはふだん 1 日以内に返信