-
Notifications
You must be signed in to change notification settings - Fork 21
Deprecate Diffraction_object, rename to DiffractionObject
#165
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
Changes from 2 commits
25a089e
558cc1e
6e9b465
2b0b112
0161a8b
da60a89
71c9f99
dca3e23
86838de
7c73140
16b8bbe
ca872c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import datetime | ||
| import warnings | ||
| from copy import deepcopy | ||
|
|
||
| import numpy as np | ||
|
|
@@ -18,6 +19,20 @@ | |
|
|
||
|
|
||
| class Diffraction_object: | ||
| """FIXME: Add class docstring. | ||
| .. deprecated:: 3.5.1 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Following the numpy deprecation standards:
Ref: https://numpydoc.readthedocs.io/en/latest/format.html#deprecation-warning |
||
| `Diffraction_object` will be removed in diffpy.utils 3.6.0, it is replaced by | ||
| `DiffractionObject` to follow the class naming convention. | ||
| """ | ||
|
|
||
| warnings.warn( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks good. Here I would maybe begin with the words "Diffraction_object is deprecated and will be removed....."
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
| "Diffraction_object` will be removed in diffpy.utils 3.6.0, it is replaced by " | ||
| "DiffractionObject` to follow the class naming convention.", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) | ||
|
|
||
| def __init__(self, name="", wavelength=None): | ||
| self.name = name | ||
| self.wavelength = wavelength | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.
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.
Two deprecation messages written 1) docstring level 2) class level