Skip to content

Commit

Permalink
DOC/MAINT: docs ignore slot_wrappers; py3.6 min
Browse files Browse the repository at this point in the history
  • Loading branch information
thermokarst authored and ebolyen committed Feb 28, 2020
1 parent 9c4827b commit 6ccba40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ scikit-bio is an open-source, BSD-licensed Python 3 package providing data struc
To view scikit-bio's documentation, visit `scikit-bio.org
<http://scikit-bio.org>`__.

**Note:** scikit-bio is no longer compatible with Python 2. scikit-bio is compatible with Python 3.4 and later.
**Note:** scikit-bio is no longer compatible with Python 2. scikit-bio is compatible with Python 3.6 and later.

scikit-bio is currently in beta. We are very actively developing it, and **backward-incompatible interface changes can and will arise**. To avoid these types of changes being a surprise to our users, our public APIs are decorated to make it clear to users when an API can be relied upon (stable) and when it may be subject to change (experimental). See the `API stability docs <https://github.com/biocore/scikit-bio/blob/master/doc/source/user/api_stability.rst>`_ for more details, including what we mean by *stable* and *experimental* in this context.

Expand Down
20 changes: 17 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def fix_item(display_name, sig, summary, real_name):
nice_name = all_cap_re.sub(r'\1_\2', s1).lower()
if len(nice_name) > 10:
nice_name = ''.join([e[0] for e in nice_name.split('_')])

def fmt(string):
count = string.count('%s')
return string % tuple([nice_name] * count)
Expand All @@ -59,13 +60,26 @@ def fmt(string):
'__deepcopy__': fmt('copy.deepcopy(%s)'),
}
if display_name in specials:
prefixes = autosummary.get_import_prefixes_from_env(self.env)
obj = autosummary.import_by_name(display_name,
prefixes=prefixes)
# Filter out any slot_wrappers that work their way in (more below)
if type(obj[1]).__name__ == 'wrapper_descriptor':
return None
return specials[display_name], '', summary, real_name
return display_name, sig, summary, real_name

skip = []
skip = ['__init_subclass__']

items = []
for item in super(NewAuto, self).get_items(names):
if item[0] not in skip:
temp_item = fix_item(*item)
# Drop slot_wrappers (see above)
if temp_item is not None:
items.append(temp_item)

return [fix_item(*e) for e in super(NewAuto, self).get_items(names)
if e[0] not in skip]
return items

autosummary.Autosummary = NewAuto

Expand Down

0 comments on commit 6ccba40

Please sign in to comment.