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 DocstringProcessor class have been deprecated:
docstring update methods for strings:
dedents in favor of DocstringProcessor.dedent
with_indents in favor of DocstringProcessor.with_indent
docstring analysis decorators
get_sectionsf in favor of DocstringProcessor.get_sections
get_summaryf in favor of DocstringProcessor.get_summary
get_full_descriptionf in favor of DocstringProcessor.get_full_description
get_extended_summaryf in favor of DocstringProcessor.get_extended_summary
save_docstring in favor of DocstringProcessorget_docstring
docstring parameter and type extractors for strings
delete_params_s in favor of docrep.delete_params
delete_types_s in favor of docrep.delete_types
delete_kwargs_s in favor of docrep.delete_kwargs
keep_params_s in favor of docrep.keep_params
keep_types_s in favor of docrep.keep_types
Migrating from 0.2.8 to 0.3.0
Migration is possible using the following steps:
For the deprecated update methods,
just use the above-mentioned replacement. They work for both, as
decorators and with strings.
For the analysis decorators (get_sectionsf for instance, use the
replacement) but you need to explicitly state the [base]{.title-ref}
parameter. @get_sectionsf('something') for instance needs to be
replaced with @get_sections(base='something')
for the parameter and type extractor functions, just use the
corresponding module level function mentioned
above
Coverage decreased (-3.002%) to 93.333% when pulling e849ee246d05561436b28568caf02996993c7b85 on unify-methods into 6ae96d54e1d9ad389559c0aea03aa7e0621aad76 on master.
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
DocstringProcessor
class have been deprecated:dedents
in favor ofDocstringProcessor.dedent
with_indents
in favor ofDocstringProcessor.with_indent
get_sectionsf
in favor ofDocstringProcessor.get_sections
get_summaryf
in favor ofDocstringProcessor.get_summary
get_full_descriptionf
in favor ofDocstringProcessor.get_full_description
get_extended_summaryf
in favor ofDocstringProcessor.get_extended_summary
save_docstring
in favor ofDocstringProcessorget_docstring
delete_params_s
in favor ofdocrep.delete_params
delete_types_s
in favor ofdocrep.delete_types
delete_kwargs_s
in favor ofdocrep.delete_kwargs
keep_params_s
in favor ofdocrep.keep_params
keep_types_s
in favor ofdocrep.keep_types
Migrating from 0.2.8 to 0.3.0
Migration is possible using the following steps:
get_sectionsf
for instance, use the replacement) but you need to explicitly state the [base]{.title-ref} parameter.@get_sectionsf('something')
for instance needs to be replaced with@get_sections(base='something')