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

Docstrings for the python bindings #27

Open
mjlarson opened this issue Apr 20, 2021 · 0 comments
Open

Docstrings for the python bindings #27

mjlarson opened this issue Apr 20, 2021 · 0 comments

Comments

@mjlarson
Copy link

At the moment, the existing python interface is usable, but doesn't have great documentation. I often use jupyter's Shift+Tab keybindings to bring up docstrings for unfamiliar functions in order to better understand the purpose of each method. For NuSQuIDS, this currently brings up the default description showing the C++ signature, but not much less. For example, this, when trying to understand the Earth class:

> import nuSQuIDS as nsq
> nsq.Earth?

Docstring:      <no docstring>
Init docstring:
__init__( (object)arg1) -> None :

    C++ signature :
        void __init__(_object*)

__init__( (object)arg1, (str)arg2) -> None :

    C++ signature :
        void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
File:           /opt/conda/lib/python3.8/site-packages/nuSQuIDS.so
Type:           class
Subclasses:     

Adding python docstrings would help new users to understand the interface better and increase usability.

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