-
Notifications
You must be signed in to change notification settings - Fork 21
Add class docstring for DiffractionObject
#265
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #265 +/- ##
===========================================
- Coverage 100.00% 98.68% -1.32%
===========================================
Files 8 8
Lines 404 379 -25
===========================================
- Hits 404 374 -30
- Misses 0 5 +5 |
@sbillinge ready for review - cc'ing @yucongalicechen |
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 fantastic! Few small comments inline then we can merge.
@@ -36,50 +36,38 @@ def _setter_wmsg(attribute): | |||
|
|||
class DiffractionObject: | |||
""" | |||
Initialize a DiffractionObject instance. | |||
A class to represent diffraction data for various scientific experiments involving scattering |
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.
Let's use the numpy standard. First line is <80 chars and gives a high level statement of the purpose.
Then a blank line. then a more meaty description such as you have here).
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.
done - do we want to use automatic doc formatting in pre-commit?
# docformatter - formats docstrings in python code
- repo: https://github.com/s-weigand/docformatter
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
??
This basically modifies our code to PEP 257, although it does not fix the length, it does change the format.
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.
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 can create a separate PR for this)
@sbillinge ready for review - some comments are "outdated" and no longer displayed under |
(fixed a quick typo) |
Closes #240 - DiffractionObject docstring do over