f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Python `help(f3d)` is not helpful

Open Meakk opened this issue 2 years ago • 2 comments

Describe the bug Running help(f3d) is not helpful and returns:

Help on package f3d:

NAME
    f3d

DESCRIPTION
    # This file is auto-generated by CMake, do not edit!
    # Refer to python/__init__.py.in source file

PACKAGE CONTENTS
    pyf3d

FUNCTIONS
    add_deprecation_warnings()

    deprecated_decorator(f, reason)

    f3d_options_update(self, arg)

DATA
    F3D_ABSOLUTE_DLLS = []
    F3D_RELATIVE_DLLS = ['bin']
    rel_path = 'bin'
    root = WindowsPath('C:/Users/Michael/AppData/Local/Programs/Python/Pyt...

VERSION
    2.2.0-RC2

FILE
    c:\users\michael\appdata\local\programs\python\python39\lib\site-packages\f3d\__init__.py

To Reproduce Steps to reproduce the behavior:

import f3d
help(f3d)

Expected behavior We should fill the expected information

F3D Information 2.2 RC2

Meakk avatar Sep 30 '23 20:09 Meakk

@Meakk @snoyer do you know what we need to do to improve this ?

mwestphal avatar Jan 26 '24 07:01 mwestphal

I believe it is generated through https://docs.python.org/3/library/pydoc.html so we'd need to study the documentation.

off the top of my head:

  • having a doctring at the top of the file ("""triple quoted text""") should avoid it picking up the # This file is auto-generated by comment as description
  • the internal stuff we don't want to show up can be prefixed with underscore to "make it private", ie. rename F3D_ABSOLUTE_DLLS to _F3D_ABSOLUTE_DLLS and so on
  • not sure how to make it list the functions from the pybind lib tho

snoyer avatar Jan 26 '24 08:01 snoyer