Documentation Converter

Description

This is the main class of the package which will extract the docstrings of all exported classes and functions of an installed python package, and convert them into quarto markdown files (thus pyp2qmd; python package to quarto markdown).

The Config contains all the required arguments/settings to perform this task and is, thus, the only reqired input argument.

Usage

DocConverter(config)

Arguments

configConfig
See Config for details; must be set up properly.

Methods

DocConverter.add_favicon(file)
Add Favicon
DocConverter.add_issue_url(url)
Adding URL to Issue Trackign Page
DocConverter.add_logo(logo, title)
Adding Logo and/or Title
DocConverter.add_navbar_menu(menu)
Add Dropdown Menu to Navigation
DocConverter.add_navbar_page(src, dest, text, menu=None)
Add Page to Navigation
DocConverter.add_navbar_right(x)
Add Element To Navbar Right
DocConverter.add_repo_url(url, branch='main')
Adding Soruce Code Repository URL
DocConverter.add_scss(file)
WARNING(short_description missing)
DocConverter.config_get(what)
Get Config Attribute
DocConverter.document()
Document All
DocConverter.document_classes()
Examples of Classes and Methods
DocConverter.document_functions()
Document Functions
DocConverter.examples()
Extract Examples
DocConverter.examples_classes()
Document Classes
DocConverter.examples_functions()
Examples of Functions
DocConverter.get_classes(names_only=False)
Get Exported Classes
DocConverter.get_functions(names_only=False)
Get Exported Functions
DocConverter.update_quarto_yml()
Update Quarto

Raises

  • TypeError: If config is not of class Config.
  • Exception: If config object is not set up properly.
  • Exception: If the package which should be documented is not found (can't be imported).
  • ValueError: If package docstring_parser has no DocstringStyle class matching the docstringstyle defined by the user (handled as 'all upper case').