Skip to content

Doctoring formatting? #103

@dsm-72

Description

@dsm-72

Here is an example of an nbdev project I have created:
https://dsm-72.github.io/sugar/

I am using what I believe to be proper docstrings, e.g.

def validate_sigma(
    sigma:SigmaType, 
    logger:Optional[logging.Logger]=None
) -> None:
    '''
    Notes:
    ---------
        - `sigma` (Gaussian kernel bandwidth)
            + `"std"`: standard deviation of the distances
            + `"knn"`: adaptive bandwidth, eg kth neighbor distance
            + `"minmax"`: min-max on the distance matrix
            + `"median"`: the median of the distances
            + `callable`: a function, f, such that f(d) returns a scalar or N-length vector
                where d is an NxN distance matrix
            + `scalar`: pre-computed bandwidth

    Arguments:
    ----------
        sigma (str | Callable): The type of sigma function to use or a user defined function. 
            Valid `sigma` values include `"minmax"`, `"median"`, `"std"`, `"knn"`. Defaults to 
            `"knn"`.
            
        logger (logging.Logger): The logger to which to log to. Defaults to `None`.
    
    Returns:
    ----------
        None
    '''

but it renders weird on pages.
What style guide should I be using for documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions