Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PythonFZ
Copy link
Member

No description provided.

Copy link
Contributor

@MrJulEnergy MrJulEnergy left a 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

docs/source/_get-started/making_connections.rst Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Merging #509 (6f30551) into main (eddf81d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #509   +/-   ##
=======================================
  Coverage   96.63%   96.63%           
=======================================
  Files          34       34           
  Lines        1663     1663           
  Branches      601      601           
=======================================
  Hits         1607     1607           
  Misses         56       56           
Flag Coverage Δ
fulltest 95.97% <ø> (ø)

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",
Copy link
Contributor

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",
Copy link
Contributor

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_.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants