-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add DepWarnings to X3DNA code and docs #4333
Conversation
This reverts commit dff31c1.
Hello @hmacdope! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2023-11-05 08:51:21 UTC |
Linter Bot Results:Hi @hmacdope! Thanks for making this PR. We linted your code and found the following: Some issues were found with the formatting of your code.
Please have a look at the Please note: The |
""" | ||
warnings.warn("X3DNA module is deprecated and will be removed in MDAnalysis 3.0, see #3788", category=DeprecationWarning) |
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.
Thanks for testing this locally, that's probably good enough.
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.
Thanks @hmacdope - I've got two comments here:
- I believe someone at some point mentioned this code wasn't even usable - can you actually get these warnings if you try to use the method / class locally?
- Please use the relevant decorator for the method.
""" | ||
warnings.warn("X3DNA module is deprecated and will be removed in MDAnalysis 3.0, see #3788", category=DeprecationWarning) |
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.
we have a decorator for this - please see
mdanalysis/package/MDAnalysis/analysis/hole2/hole.py
Lines 50 to 52 in 5fa0d27
@deprecate(release="2.6.0", remove="3.0.0", | |
message=("This method has been moved to the MDAKit hole2-mdakit: " | |
"https://github.com/MDAnalysis/hole2-mdakit")) |
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.
ah ta.
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.
RE: 1 if the code is not usable and we are removing it i don't really want to invest any energy in finding out why / how. Is it okay just to put the warnings in as is? Let me know wither way.
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.
@hmacdope - my point here is "what's the point in putting in a warning if it won't even work locally". If you can get the warnings locally then it's fine, otherwise I'd just add in the docstring changes and call it a day.
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.
@IAlibay Okay you can get the warnings on before whatever is broken, at least it may warn the (possibly 0) people that have a niche setup that this works for this that it will be removed.
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.
Thanks for testing this locally, that's probably good enough.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4333 +/- ##
==========================================
Coverage 93.37% 93.37%
==========================================
Files 170 184 +14
Lines 22295 23403 +1108
Branches 4075 4075
==========================================
+ Hits 20818 21853 +1035
- Misses 962 1035 +73
Partials 515 515 ☔ View full report in Codecov by Sentry. |
thanks @hmacdope ! |
Fixes #3788
Changes made in this Pull Request:
PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4333.org.readthedocs.build/en/4333/