-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
add section on documentation and duck typing. #509
base: main
Are you sure you want to change the base?
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.
overall good.
please also change process_data = ProcessData(data=load_data)
to process_data = ProcessData(data=generate_data)
on line 19
Codecov Report
@@ Coverage Diff @@
## main #509 +/- ##
=======================================
Coverage 96.63% 96.63%
=======================================
Files 34 34
Lines 1663 1663
Branches 601 601
=======================================
Hits 1607 1607
Misses 56 56
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -148,7 +148,9 @@ | |||
"metadata": {}, | |||
"source": [ | |||
"The ZnTrack class generates an `__init__` method for all `zn.params` and other inputs automatically.\n", | |||
"When writing a custom `__init__` it is important to add `super().__init__(**kwargs)` for ZnTrack to work.\n", | |||
"The generated `__init__()` code will call a method named `_post_init_()` if it exists.\n", | |||
"You can use override this method to add custom initialization code.\n", |
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.
I don't understand this sentence grammatically
"When writing a custom `__init__` it is important to add `super().__init__(**kwargs)` for ZnTrack to work.\n", | ||
"The generated `__init__()` code will call a method named `_post_init_()` if it exists.\n", | ||
"You can use override this method to add custom initialization code.\n", | ||
"Alternatively, when writing a custom `__init__` it is important to add `super().__init__(**kwargs)` for ZnTrack to work.\n", |
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.
perphaps i'm not familiar enough with data classes but it is not clear what the advantage is of writing a custom _init_
over a _post_init_
.
No description provided.