-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Api calculate #11 #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class PtxCalc: | ||
def __init__( | ||
self, | ||
data_handler, | ||
): | ||
def __init__(self, data_handler: DataHandler): | ||
self.data_handler = data_handler | ||
|
||
def calculate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could get rid of the class here and just pass data_handler
to a function calculate
.
class PtxCalc: | ||
def __init__( | ||
self, | ||
data_handler, | ||
): | ||
def __init__(self, data_handler: DataHandler): | ||
self.data_handler = data_handler | ||
|
||
def calculate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a long function. Can calculate
be refactored to smaller functions? might be worth it if we need to touch it in the future again, otherwise let's keep it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,I want to go back to a class based implementation now that it works
yea, thanks! I am not used to pytest yet. Co-authored-by: Johannes Aschauer <[email protected]>
No description provided.