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
Remove warnings in documentation #2097
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2097 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 288 288
Lines 23419 23419
=======================================
Hits 23409 23409
Misses 10 10 Continue to review full report at Codecov.
|
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.
nice and clean 😄
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.
LGTM! Just left one comment about whether we should filter all warnings, or just DeprecationWarning
s. Okay to leave out of scope though, but could be good to file.
@@ -0,0 +1,2 @@ | |||
import warnings | |||
warnings.filterwarnings('ignore') |
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.
Just thinking out loud... do we want to disable all warnings? Is it possible to disable just DeprecationWarning
s? I know warnings in the past have been useful in showing where some things are not as we expected, could be out of scope for this PR though.
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.
Agree on the idea but I also think it's best suited for a different PR. We'll have to modify deprecate_arg to issue a DeprecationWarning
for starters which, although is a small change, seems out of scope for this PR. I think the intent was a refactor without changing behavior.
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.
Great idea! Filed a new issue 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.
Cool solution @bchen1116! Looks good to me.
@@ -261,6 +263,8 @@ class AccessorMethodDocumenter(AccessorLevelDocumenter, MethodDocumenter): | |||
|
|||
|
|||
def setup(app): | |||
os.makedirs("/home/docs/.ipython/profile_default/startup") | |||
shutil.copy("disable-warnings.py", "/home/docs/.ipython/profile_default/startup/") |
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.
They let you run arbitrary code on start-up? 😨
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.
Yep, apparently! This is what the support team suggested
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.
fix #2011

testing to clean up documentation code
Before:
After:
