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

fixing return types of some methods and updating their docstrings #325

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

arik-shurygin
Copy link
Collaborator

many methods were updating self instead of returning the value, this is bad practice as it is a side effect and means the order in which methods are run can change results. This also had direct impacts on the effort to refactor method docstrings as Modifies is not a section in the numpy format.

Merging this PR in with #323 so that further docstring compliance can be done with the new method headers.

@arik-shurygin arik-shurygin merged commit b2a571f into docstring-compliance Jan 13, 2025
4 checks passed
@arik-shurygin arik-shurygin deleted the pure-functions branch January 13, 2025 23:31
arik-shurygin added a commit that referenced this pull request Jan 16, 2025
* checkpoint revamping comments on most of dynode except for utils and vis_utils

* checkpoint more comment work

* more conscise comments

* fixing comments vis_utils

* comment concise abstract_parameters

* fixing return types of some methods and updating their docstrings (#325)

* all functions now return instead of updating self

* small bugfix

* fixing mypy

* checkpoint using pydocstyle to format comments  on first four files, __init__.py, abstract_initializer.py, abstract_parameters.py, and config.py. Had to make many config functions private to avoid numpy comments on 1 liners

* mypy bugfix

* pydocstyle covid_sero_initializer.py

* small tweaks to dynode_runner since many methods are being moved out in a different PR

* pydocstyle mechanistic_inferer.py

* pydocstyle mechanistic_runner.py

* pydocstyle static_value_parameters.py

* pydocstyle utils.py

* pydocstyle vis_utils.py

* Notes section does not need to be indented

* adding --convention=numpy flag to pydocstyle to also check numpy conventions of methods

* note->notes in comment
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.

1 participant