Module 02: cover the underscore-prefix 'private/internal' convention
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 88/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
02_function_classes.qmd の命名規則のセクション付近から始め、既存の mikeio.pfs._pfssection.PfsSection の例を確認します。アンダースコア接頭辞、all、再エクスポート、ダブルアンダースコアに関する指針を追加し、その後 07_packaging.qmd の Breaking changes スライドを、公開 API であることの明記と相互参照を含むよう更新します。完了の条件は、両方のモジュールで内部名の規則とバージョニングが明確に結び付けられていることです。
索引モデルが issue の本文から書いたものです。
説明
Module 02 (02_function_classes.qmd) teaches Python naming conventions but does not cover the leading-underscore convention for internal/private names. This came up in practice: a user upgraded a dependency, found that several _-prefixed functions had been removed, and was upset — not realising those were never part of the public API.
The breaking-changes slide in 07_packaging.qmd (Removing a function / Renaming / Changing signature → bump major) is the counterpart to this: removing a _private function is not a breaking change. Worth a forward reference between the two modules.
Suggested content for module 02
Add a slide near the existing naming-conventions section (around 02_function_classes.qmd:802) covering:
_foosignals internal — not part of the public API- Consumers who import underscore-prefixed names do so at their own risk
- Maintainers may change/remove them without bumping the major version
__all__in__init__.pyto declare the public surface- Re-exporting internals into the package namespace (the existing
mikeio.pfs._pfssection.PfsSectionexample at02_function_classes.qmd:795is a natural lead-in) - Double-underscore (
__name) name mangling is a separate thing — mention briefly to avoid confusion
Cross-reference
Update the "Breaking changes" slide in 07_packaging.qmd to note that the rules apply to the public API only, with a pointer back to module 02.
See PEP 8 — Naming Conventions / Public and internal interfaces.
- 主要言語
- Jupyter Notebook
- スター
- 8
- フォーク
- 1
- 平均マージ
- 4分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DHI/python-package-development のほかの issue
-
難易度 2/5 1〜2日 初心者へのやさしさ 72/100
DHI/python-package-development#37 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
DHI/python-package-development の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agilepathway/label-checker#640 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
BasedHardware/omi#15662 · コメント 1 件 ·
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
amponce/archive-movie-browser#167 ·
-
user-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Kong/developer.konghq.com#7316 ·