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

DOC: Adding header to the rst files that don't have it #24191

Merged
merged 3 commits into from
Dec 10, 2018
Merged

DOC: Adding header to the rst files that don't have it #24191

merged 3 commits into from
Dec 10, 2018

Conversation

datapythonista
Copy link
Member

When using the new style for the pandas documentation, we'll be using the {{ header }} context to set the :tocdepth: of all pages (sphinx does not have a setting to set all the :tocdepth: at once).

In #24086 we added to most .rst files the header, that it's also used to import pandas and numpy, and set some settings. Adding it to the pages that don't have it yet.

@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #24191 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24191      +/-   ##
==========================================
- Coverage   92.21%   92.21%   -0.01%     
==========================================
  Files         162      162              
  Lines       51723    51723              
==========================================
- Hits        47695    47694       -1     
- Misses       4028     4029       +1
Flag Coverage Δ
#multiple 90.61% <ø> (ø) ⬆️
#single 43.03% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/io/json/json.py 92.61% <0%> (-0.48%) ⬇️
pandas/util/testing.py 87.51% <0%> (+0.09%) ⬆️

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 77278ba...e794715. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #24191 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24191   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files         162      162           
  Lines       51723    51723           
=======================================
  Hits        47695    47695           
  Misses       4028     4028
Flag Coverage Δ
#multiple 90.61% <ø> (ø) ⬆️
#single 43.03% <ø> (ø) ⬆️

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 138a59a...edae762. Read the comment docs.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

(I would personally find it a bit cleaner to have a separate "common header" and "common imports", as they are used for different purposes, but doesn't matter much :-), and is more work to have it in all pages)

@pep8speaks
Copy link

Hello @datapythonista! Thanks for updating the PR.

@datapythonista
Copy link
Member Author

Didn't think about it. It could make sense in pages with no examples (e.g. api.rst) where we don't need to imports. But I think it'd add some extra complexity, having two jinja variables in almost each file, and also things like .. currentmodule:: would be ambiguous to know in which one should go.

We can always go back to it. But for now, besides making the imports simpler and more consistent, it allows me to set the :tocdepth: in all documents at once, and have reasonable sidebars in the new design (still wip of course): https://pandas-dev.github.io/pandas-sphinx-theme/pr-datapythonista_base/

@datapythonista datapythonista merged commit 8221ee9 into pandas-dev:master Dec 10, 2018
@jorisvandenbossche jorisvandenbossche added this to the 0.24.0 milestone Dec 11, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants