eclipse-ankaios / eclipse-ankaios/ank-sdk-python

Improve methods order

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Python
Stars
8
Forks
4
Avg merge
2d 3h
Merged PRs (30d)
1

Description

## 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

Contributor guide

Open the contributing guide

Research direction

Start by inventorying the SDK classes and their current method order, then inspect the unit test methods to determine whether they mirror the implementation. Discuss the intended use case and workflow with the committers before changing anything. Done means SDK methods follow the six-part ordering convention, with unit tests optionally reordered to match.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.