Execute the validation of all docstrings, and return a dict with the results. Parameters ---------- prefix : str or None If provided, only the docstrings that start with this pattern will be validated. If None, all docstrings will be validated. ignore_deprec
(prefix, ignore_deprecated=False)
| 301 | |
| 302 | |
| 303 | def validate_all(prefix, ignore_deprecated=False): |
| 304 | """ |
| 305 | Execute the validation of all docstrings, and return a dict with the |
| 306 | results. |
| 307 | |
| 308 | Parameters |
| 309 | ---------- |
| 310 | prefix : str or None |
| 311 | If provided, only the docstrings that start with this pattern will be |
| 312 | validated. If None, all docstrings will be validated. |
| 313 | ignore_deprecated: bool, default False |
| 314 | If True, deprecated objects are ignored when validating docstrings. |
| 315 | |
| 316 | Returns |
| 317 | ------- |
| 318 | dict |
| 319 | A dictionary with an item for every function/method... containing |
| 320 | all the validation information. |
| 321 | """ |
| 322 | result = {} |
| 323 | seen = {} |
| 324 | |
| 325 | for func_name, _, section, subsection in get_all_api_items(): |
| 326 | if prefix and not func_name.startswith(prefix): |
| 327 | continue |
| 328 | doc_info = pandas_validate(func_name) |
| 329 | if ignore_deprecated and doc_info["deprecated"]: |
| 330 | continue |
| 331 | result[func_name] = doc_info |
| 332 | |
| 333 | shared_code_key = doc_info["file"], doc_info["file_line"] |
| 334 | shared_code = seen.get(shared_code_key, "") |
| 335 | result[func_name].update( |
| 336 | { |
| 337 | "in_api": True, |
| 338 | "section": section, |
| 339 | "subsection": subsection, |
| 340 | "shared_code_with": shared_code, |
| 341 | } |
| 342 | ) |
| 343 | |
| 344 | seen[shared_code_key] = func_name |
| 345 | |
| 346 | return result |
| 347 | |
| 348 | |
| 349 | def get_all_api_items(): |
no test coverage detected