-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: don't include all methods/attributes of IntervalIndex #16221
DOC: don't include all methods/attributes of IntervalIndex #16221
Conversation
@TomAugspurger I hope this fixes the warnings. Maybe we could also use this for the other Index subclasses like DatetimeIndex, MultiIndex, ... although it would be nice to still have a list of those attributes that are special to them, and to refer to the main Index docstring page for a list of all methods. But not sure if such flexibility is possible with sphinx/jinja (and for a later PR in any case :-)) |
Codecov Report
@@ Coverage Diff @@
## master #16221 +/- ##
=======================================
Coverage 90.86% 90.86%
=======================================
Files 162 162
Lines 50887 50887
=======================================
Hits 46240 46240
Misses 4647 4647
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #16221 +/- ##
==========================================
- Coverage 90.86% 90.23% -0.63%
==========================================
Files 162 164 +2
Lines 50887 50894 +7
==========================================
- Hits 46240 45926 -314
- Misses 4647 4968 +321
Continue to review full report at Codecov.
|
Another sphinx / rst mystery ... |
Strange... I thought I had tried it too, but I can't remember the outcome. Did you clear all the generated files before rebuilding? |
@jorisvandenbossche I wonder if it's cf40991#diff-4501fdb73fd4b9f09d44a3f4177d44aaR46 We special case |
No autosummary with methods for them. Added to our hacks list in our numpydoc
No new warnings with that. I spent a bit longer trying to get a an autosummary with a subset of the Methods specified in a |
Aha, you have found out how I hacked it before .. :-) Thanks! |
doc/sphinxext/numpydoc/numpydoc.py
Outdated
if what == "class" and name.endswith(".Categorical"): | ||
if what == "class" and (name.endswith(".Categorical") or | ||
name.endswith("CategoricalIndex") or | ||
name.endswith("Interval") or |
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.
@TomAugspurger I think Interval class itself is OK to have with all its methods / attributes ?
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.
Oh, right... Is that in the api.rst?
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.
Doesn't look like it, but I'll remove it anyway.
Doc build log looks good, merging: |
Great! |
yep looks great. thanks guys! |
…v#16221) * DOC: don't include all methods/attributes of IntervalIndex * Change docs for CategoricalIndex and IntervalIndex No autosummary with methods for them. Added to our hacks list in our numpydoc * Don't exclude Interval
…v#16221) * DOC: don't include all methods/attributes of IntervalIndex * Change docs for CategoricalIndex and IntervalIndex No autosummary with methods for them. Added to our hacks list in our numpydoc * Don't exclude Interval
Version 0.20.0 * tag 'v0.20.0': (742 commits) RLS: v0.20.0 DOC: Whatsnew cleanup (pandas-dev#16245) TST: Test CategoricalIndex in test_is_categorical (pandas-dev#16243) TST: xfail some bottleneck on windows (pandas-dev#16240) DOC, TST: Document and Test Functions in dtypes/common.py (pandas-dev#16237) TST: Remove __init__ statements in testing (pandas-dev#16238) DOC: don't include all methods/attributes of IntervalIndex (pandas-dev#16221) PKG: Fix ModuleNotFoundError: No module named 'pandas.formats' (pandas-dev#16239) RLS: v0.20.0rc2 CLN: make submodules of pandas.util private (pandas-dev#16223) MAINT: Remove tm.TestCase from testing (pandas-dev#16225) MAINT: Complete Conversion to Pytest Idiom (pandas-dev#16201) DOC: add whatsnew for 0.21.0 DEPR: correct deprecation message for datetools (pandas-dev#16202) API Change repr name for table schema (pandas-dev#16204) DOC: Remove various warnings from doc build (pandas-dev#16206) DOC: add whatsnew for v0.20.1 BUG: Fixed renaming of falsey names in build_table_schema (pandas-dev#16205) COMPAT: ensure proper extension dtype's don't pickle the cache (pandas-dev#16207) REF: register custom DisplayFormatter for table schema (pandas-dev#16198) ...
Alternative for #16050
I totally forgot I already had made such a "class without autosummary table" template before for Categorical, so I hope this should work for IntervalIndex as well.