-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Formatted docstrings in files to pass with pydocstyle's criteria. #72
Conversation
…mmennts into separate lines to adhere the requirements specified by ruff
…x' in the 'foward' and '__init__' function to handle ambiguous variable name in ruff
… in models to adhere to requirements of pydocstyles
This looks good! Is there any chance you could also fix the last few pre-commit issues? I know they aren't strictly part of this issue, but then it could be a green pre-commit check! |
I can, but one of them is related to implicit import in the 'init.py' for the layers module for 'from .layers import *", where changing it to explicit import may affect the importing packages when the user is importing from packages, and the second one would require reducing the length of the summary text in the docstring. Would changing the length of the summary text be fine? |
I will get started on the undefined name error caused by explicit imports in the “init.py” in the base of the directory.
|
…f 'metnet/__init__.py' file to use explicit import instead of implicit to match the Ruff linter criteria
for more information, see https://pre-commit.ci
I have made changes to have the pre-commit work. @jacobbieker |
As this pull request solves the Ruff linter pre-commit issue, should it be linked to this pull request in the description of the issue alongside the pydocstyle one? |
1 similar comment
As this pull request solves the Ruff linter pre-commit issue, should it be linked to this pull request in the description of the issue alongside the pydocstyle one? |
Yes, you can add that it fixes that issue in the PR description here, that would link it enough and close that issue as well when this is merged. |
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.
Looks good overall! Just a few changes ideally.
Initialize the Upsample Residual Convolution. | ||
|
||
Args: | ||
input_channels: int, |
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.
Same here as above
metnet/models/metnet2.py
Outdated
center_crop_size: | ||
forecast_steps: | ||
**kwargs: | ||
image_encoder: string |
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.
Ideally, add the description for what these args are, like in the above ones. But there are a lot here, so feel free to leave this for this one.
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.
Thank you, I will work on adding descriptions to the args after I fix the Ruff linter issue.
Co-authored-by: Jacob Prince-Bieker <[email protected]>
for more information, see https://pre-commit.ci
Thank you, I have added the suggested changes to the commit. Currently, Ruff linter has an issue with the docstring in the 'metnet2.py' file summary description being 1 character longer than 100. We could remove the period from the sentence to solve the Ruff linter error, but then the Pydocstyle linter would error that the sentence does not contain a period at the end of it. |
…Net2' in the the 'models/metnet2.py' file to match the criteria of Ruff
In the summary text for the 'MetNet2.py' docstring, would it be fine to change 'an even larger context' to 'a larger context' to reduce the length below 100 characters? |
Yep, that sounds good! |
Thank you, I added the remaining changes to the pull request. |
Thank you for helping with the pull request. @jacobbieker |
Pull Request
Description
I changed and added docstrings in the '.py' files to match pydocstyle's criteria. In addition, docstrings with only single double quotes have been changed to triple quotes.
Relates to issues #1 and #66.
Fixes
How Has This Been Tested?
This was tested using the 'pydocstyle' command in the repository.
If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
Checklist: