eclipse-ankaios / eclipse-ankaios/ank-sdk-python
Improve methods order
- 主要言語
- Python
- スター
- 8
- フォーク
- 4
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 1
説明
## Description
The methods of a class should follow an ordering convention. Currently, all the methods are placed by either their usecase or just randomly in the class. The order should be like this:
1. Class-level attributes
2. init()
3. Magic methods like str, len, ...
4. Public instance methods
5. private or protected methods
6. static and class methods
7. cleanup (del)
Comment that mentioned this: https://github.com/eclipse-ankaios/ank-sdk-python/pull/43#discussion_r1867710186
## Goals
The code is refactored and the methods are in a proper order.
## Final result
### Summary
**To be filled when the final solution is sketched.**
### Tasks
- [ ] Reorder the methods in the sdk
- [ ] Optional: Reorder the unit test methods to match the implementation
コントリビューションガイド
調査の方向性
まず SDK クラスとそのメソッドの現在の順序を一覧化し、次に単体テストのメソッドを調べて実装を反映しているかどうかを確認します。何かを変更する前に、想定されるユースケースとワークフローについて committers と話し合います。SDK メソッドが6部構成の順序規約に従い、単体テストが任意でそれに合わせて並べ替えられていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend-api-design
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100