Skip to content

numpydoc does not render parameters as expected #329

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

Closed
ritchie46 opened this issue Aug 1, 2021 · 3 comments
Closed

numpydoc does not render parameters as expected #329

ritchie46 opened this issue Aug 1, 2021 · 3 comments

Comments

@ritchie46
Copy link

This docstring is rendered as:

    """
    Read into a DataFrame from a parquet file.

    Parameters
    ----------
    source
        Path to a file, list of files, or a file like object. If the path is a directory, that directory will be used
        as partition aware scan.
        If ``fsspec`` is installed, it will be used to open remote files
    use_pyarrow
            Use pyarrow instead of the rust native parquet reader. The pyarrow reader is more stable.
    stop_after_n_rows
        After n rows are read from the parquet, it stops reading.
        Only valid when 'use_pyarrow==False'
    memory_map
        Memory map underlying file. This will likely increase performance.
        Only used when 'use_pyarrow==True'
    columns
        Columns to project/ select.
        Only valid when 'use_pyarrow==True'
    storage_options
        Extra options that make sense for ``fsspec.open()`` or a particular storage connection, e.g. host, port, username, password, etc.
    **kwargs
        kwargs for [pyarrow.parquet.read_table](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html)

    Returns
    -------
    DataFrame
    """

image

Any ideas on what that could be?

@rossbar
Copy link
Contributor

rossbar commented Aug 1, 2021

I can't replicate this - if I add a dummy function to an existing project and cp/paste the above docstring it renders fine. Do you have a link to the source?

@ritchie46
Copy link
Author

I can't replicate this - if I add a dummy function to an existing project and cp/paste the above docstring it renders fine. Do you have a link to the source?

Thanks for taking a look, here is the source: https://github.com/pola-rs/polars/tree/master/py-polars/docs

@ritchie46
Copy link
Author

I already found what messes it up. It's the commonmark extension: https://github.com/pola-rs/polars/blob/8a926f9cb15005debd0b6be230e0dc901acbe7ee/py-polars/docs/source/conf.py#L92

Have you guys any tip for markdown rendering and numpy style docs?

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

2 participants