openPMD/openPMD-api

docstrings in python version / Python documentation

开放

#1,328 创建于 2022年11月11日

 (4 条评论) (2 个反应) (0 位负责人)C++ (57 个派生)auto 404
feature requestfrontend: Python3help wanted

仓库指标

星标
 (160 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Is your feature request related to a problem? If so, please describe. If one interactively uses openpmd-api in python e.g. via ipython or jupyter, one might need to look up the usage via reading the docstrings as e.g. below

Python:

import openpmd_api as io
io.Series?

results in a less-user-friendly output

Docstring:      <no docstring>
Init docstring:
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: openpmd_api.openpmd_api_cxx.Series, filepath: str, access: openpmd_api.openpmd_api_cxx.Access, options: str = '{}') -> None

2. __init__(self: openpmd_api.openpmd_api_cxx.Series, filepath: str, access: openpmd_api.openpmd_api_cxx.Access, mpi_communicator: object, options: str = '{}') -> None
File:           /trinity/shared/pkg/filelib/openpmd/0.14.4/gcc/7.3.0/openmpi/4.1.1-no-cuda/lib64/python3.6/site-packages/openpmd_api/openpmd_api_cxx.cpython-36m-x86_64-linux-gnu.so
Type:           pybind11_type
Subclasses:     

Describe the solution you'd like It would be fantastic if one could have a more readably docstring for the openPMD-api python module.

Describe alternatives you've considered Currently the best way (for me) is to follow the examples.

Additional context This is not urgent, but it would enhance productivity if one does not have to look for the right example or to scroll through the source code to figure out how to use the python version.

贡献者指南