Branch name: main
File affected: /influpaint/utils/season_axis.py
Description:
There are two methods/functions with the same name in this module. One is class-level method get_season_week(self, ts) which is an instance method and belongs to the class namespace. The other is get_season_week(ts, start_month, start_day) which is a standalone function (module-level), it lives in the global namespace.
This is valid but slightly risky design because:
- same name could cause cognitive confusion for developers
- debugging stack traces become harder to read
Cleaner alternative is to rename the standalone function as below:
def compute_season_week(ts, start_month, start_day)
Then the class method becomes
def get_season_week(self, ts):
return compute_season_week(ts, ...)
I will let Joseph review and decide if we want to make this change.
Branch name: main
File affected: /influpaint/utils/season_axis.py
Description:
There are two methods/functions with the same name in this module. One is class-level method
get_season_week(self, ts)which is an instance method and belongs to the class namespace. The other isget_season_week(ts, start_month, start_day)which is a standalone function (module-level), it lives in the global namespace.This is valid but slightly risky design because:
Cleaner alternative is to rename the standalone function as below:
def compute_season_week(ts, start_month, start_day)Then the class method becomes
I will let Joseph review and decide if we want to make this change.