You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
The sktm/patchwork.py needs refactoring as it's hard to understand, use and maintain. Some ideas include:
Extract common interface into an abstract class to be the base for both Patchwork interfaces.
Make methods and variables not used from outside private
Create a type/class for data both implementations need about a patch, make the implementations provide functions for fetching those and implement the rest of the handling in the base, abstract class.
Separate classes into their own files. This way it's easier to look at implementations separately. Right now, when searching for an implementation of a function, you often don't know which class you're looking at, which makes it difficult to understand what's going on.
Also, rename the classes to make more sense. E.g. Patchwork for the base class, PatchworkXMLRPC for XML RPC interface, and PatchworkREST for the REST API.
Note to self: get_patch_by_id for PW2 raises an exception when it can't get the data needed, while PW1just logs that it couldn't get the data and returns None. We should throw the exception in both cases, and this would also allow us to remove the checks for no patch returned elsewhere.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The sktm/patchwork.py needs refactoring as it's hard to understand, use and maintain. Some ideas include:
More ideas are welcome!
The text was updated successfully, but these errors were encountered: