Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctoring formatting? #103

Open
dsm-72 opened this issue May 30, 2022 · 0 comments
Open

Doctoring formatting? #103

dsm-72 opened this issue May 30, 2022 · 0 comments

Comments

@dsm-72
Copy link

dsm-72 commented May 30, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant