paulscherrerinstitute / pcaspy

Portable Channel Access Server in Python
BSD 3-Clause "New" or "Revised" License
32 stars 24 forks source link

pcaspy.driver.SimpleServer - no docstrings #81

Closed vstadnytskyi-FDA closed 2 years ago

vstadnytskyi-FDA commented 2 years ago

I thought I would edit my message and add "this is a great library. Thank you for developing it"

I am looking into what methods and variable 'pcaspy.driver.SimpleServer' has. But it seems there is no docstrings attached for example to method 'show' hence I do not know what 'level' is.

In [5]: server.show?
Signature: server.show(level)
Docstring: <no docstring>
File:      c:\users\user\appdata\local\programs\python\python38\lib\site-packages\pcaspy\cas.py
Type:      method

In [6]: server
Out[6]: <pcaspy.driver.SimpleServer; proxy of <Swig Object of type 'caServer *' at 0x00000278FDF8C0F0> >
xiaoqiangwang commented 2 years ago

The show method is part of the underlying C++ class and not in the public API.

Another reason is that I was not sure how to document swig wrapped C++ classes. But after a quick look at the document, %feature("docstring") seems to solve the problem. I will give it a try. https://www.swig.org/Doc1.3/Python.html#Python_nn71

vstadnytskyi-FDA commented 2 years ago

@xiaoqiangwang Thank you!