Skip to content

Remove warnings in documentation - #2097

Merged
bchen1116 merged 15 commits into
mainfrom
bc_test_jupyter_doc
Apr 6, 2021
Merged

bchen1116 merged 15 commits into
mainfrom
bc_test_jupyter_doc

Conversation

@bchen1116

@bchen1116 bchen1116 commented Apr 6, 2021 •

Copy link
Copy Markdown
Contributor

fix #2011
testing to clean up documentation code
Before:
image

After:
image

@bchen1116 bchen1116 self-assigned this Apr 6, 2021
@codecov

codecov Bot commented Apr 6, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #2097 (c663650) into main (eb19b68) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb19b68...c663650. Read the comment docs.

@bchen1116 bchen1116 changed the title [TEST] Remove warnings in documentation Remove warnings in documentation Apr 6, 2021
@bchen1116
bchen1116 marked this pull request as ready for review April 6, 2021 19:34

@jeremyliweishih jeremyliweishih left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice and clean 😄

@angela97lin angela97lin left a comment

Copy link
Copy Markdown
Contributor

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 DeprecationWarnings. Okay to leave out of scope though, but could be good to file.

@@ -0,0 +1,2 @@
import warnings
warnings.filterwarnings('ignore')

Copy link
Copy Markdown
Contributor

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 DeprecationWarnings? 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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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

@freddyaboulton freddyaboulton left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread docs/source/conf.py

def setup(app):
os.makedirs("/home/docs/.ipython/profile_default/startup")
shutil.copy("disable-warnings.py", "/home/docs/.ipython/profile_default/startup/")

Copy link
Copy Markdown
Contributor

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? 😨

Copy link
Copy Markdown
Contributor Author

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

@angela97lin angela97lin Apr 7, 2021 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let the evil commence!

@bchen1116
bchen1116 merged commit 59f6433 into main Apr 6, 2021
@chukarsten chukarsten mentioned this pull request Apr 6, 2021
@freddyaboulton
freddyaboulton deleted the bc_test_jupyter_doc branch May 13, 2022 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find simpler implementation to address warnings in documentation

4 participants