Conversation
this commit depreceates all methods ending with `f` (get_sectionsf for instance) or `_s` (keep_params_s for instance). Instead we use overloaded functions that can be used as a decorator or with strings as input
and add new tests for deprecated functions
to ensure python 2.7 compatibility (for the last time...)
in favor of get_docstring
using the autosummary by autodocsumm
into on single decorator: deprecated
the call is now keep_params(s, *params), not anymore keep_params(s, params)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR unifies how we name the various methods of the docstring processor. Multiple methods accept both, functions and strings
Changed
The following methods of the
DocstringProcessorclass have been deprecated:dedentsin favor ofDocstringProcessor.dedentwith_indentsin favor ofDocstringProcessor.with_indentget_sectionsfin favor ofDocstringProcessor.get_sectionsget_summaryfin favor ofDocstringProcessor.get_summaryget_full_descriptionfin favor ofDocstringProcessor.get_full_descriptionget_extended_summaryfin favor ofDocstringProcessor.get_extended_summarysave_docstringin favor ofDocstringProcessorget_docstringdelete_params_sin favor ofdocrep.delete_paramsdelete_types_sin favor ofdocrep.delete_typesdelete_kwargs_sin favor ofdocrep.delete_kwargskeep_params_sin favor ofdocrep.keep_paramskeep_types_sin favor ofdocrep.keep_typesMigrating from 0.2.8 to 0.3.0
Migration is possible using the following steps:
just use the above-mentioned replacement. They work for both, as
decorators and with strings.
get_sectionsffor instance, use thereplacement) but you need to explicitly state the [base]{.title-ref}
parameter.
@get_sectionsf('something')for instance needs to bereplaced with
@get_sections(base='something')corresponding module level function mentioned
above