-
Notifications
You must be signed in to change notification settings - Fork 20
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
Deprecate Diffraction_object
, rename to DiffractionObject
(new clean PR)
#172
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #172 +/- ##
=======================================
Coverage 99.17% 99.17%
=======================================
Files 7 7
Lines 242 242
=======================================
Hits 240 240
Misses 2 2
|
Once this PR is merged, I can then fix some minor cosmetics issues that you've pointed out in our original PR such as using "the", etc. #165 |
@@ -461,3 +476,449 @@ def dump(self, filepath, xtype=None): | |||
f.write(f"{key} = {value}\n") | |||
f.write("\n#### start data\n") | |||
np.savetxt(f, data_to_save, delimiter=" ") | |||
|
|||
|
|||
class DiffractionObject: |
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.
A direct copy of Diffraction_object
above. No modification created.
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.
Fixing the test.
@sbillinge ready for review |
nicely done there. As a matter of principle, we could discuss whether to continue to test the deprecated class until it is removed. I think it general we should do so (which means copy-pasting the old test to a new one so that both the old and new one is tested), but I think it is better to just merge this and not worry about it here.... We are just figuring out how to deprecate things and we are the only people using |
@sbillinge Yes, good idea to copy and paste existing tests too. |
It was a direct copy from
Diffraction_object
toDiffractionObject
(no manual modification) except the deprecation warnings/docstrings.