Skip to content
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

Configure display setting of Dataframe in 2.0 tutorial #215

Merged
merged 7 commits into from
Apr 15, 2022
Merged

Configure display setting of Dataframe in 2.0 tutorial #215

merged 7 commits into from
Apr 15, 2022

Conversation

JohnsonKuan
Copy link
Contributor

@JohnsonKuan JohnsonKuan commented Apr 15, 2022

Configure display setting of Dataframe in 2.0 tutorial to address issues with background color of header in dark mode for docs.

Background color of rows will be addressed in another PR after 2.0 tagging.

from IPython.core.display import HTML
HTML("""
<style>
    .dataframe {
        background: #D7D7D7;
    }
    
    th {
        color:black;
    }
</style>
""")

Preview in dark mode of Jupyter Lab:
image

Preview in non-dark mode:
image

@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #215 (1de5853) into master (22e2395) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #215   +/-   ##
=======================================
  Coverage   95.40%   95.40%           
=======================================
  Files          12       12           
  Lines         915      915           
  Branches      184      184           
=======================================
  Hits          873      873           
  Misses         16       16           
  Partials       26       26           
Impacted Files Coverage Δ
cleanlab/count.py 94.96% <0.00%> (ø)
cleanlab/filter.py 93.58% <0.00%> (ø)
cleanlab/internal/util.py 99.01% <0.00%> (ø)
cleanlab/internal/latent_algebra.py 100.00% <0.00%> (ø)
cleanlab/benchmarking/noise_generation.py 95.53% <0.00%> (ø)

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 22e2395...1de5853. Read the comment docs.

"metadata": {},
"outputs": [],
"source": [
"%%HTML\n",
Copy link
Member

Choose a reason for hiding this comment

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

Won't this be visible in the docs build and in the colab notebook?

Copy link
Member

@jwmueller jwmueller Apr 15, 2022

Choose a reason for hiding this comment

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

At least need to replace metadata above with:

"metadata": {
    "nbsphinx": "hidden"
   },

That will at least hide in the docs website.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I believe so, the code will be visible. I'm not sure how to hide it though.

Copy link
Member

@jwmueller jwmueller Apr 15, 2022

Choose a reason for hiding this comment

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

Actually if you want to add this stuff to this notebook it should go into the cell that is already hidden (the one starting with # Package installation.).

I'd add it before/after:

%config InlineBackend.print_figure_kwargs={"facecolor": "w"}

We should not have many hidden cells in one notebook, it makes the colab / local versions look too different from the docs website one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, agree. I moved it to the cell that is already hidden.

Copy link
Member

@cgnorthcutt cgnorthcutt left a comment

Choose a reason for hiding this comment

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

LGTM. Double check jonas's comment. After merge, double check it worked (takes a few minutes to load) and double check these settings and weird code blocks are not visible to user.

@JohnsonKuan JohnsonKuan merged commit aa892c6 into cleanlab:master Apr 15, 2022
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.

None yet

3 participants