-
Notifications
You must be signed in to change notification settings - Fork 32
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
problems using :members:
for autoclass in v0.8.0
#134
Comments
The issue appears to be with This has caused issues before --- it would probably be nice if we had a unit test to check for issues and prevent regressions. I think using pybind11 in the build process will be more trouble than it is worth, but perhaps we can simulate it. |
I was thinking of building docs for one of the pybind11 example repos, but that may also catch bugs in pybind11. Currently pybind11 doesn't append provided docstrings for class attributes... |
Can you perhaps create a self-contained example as a test case? |
In trying to create a simple example project, I think I narrowed it down to class instance attributes. Although, I'm starting to get the feeling that this may have something to do with the builtin "magic" methods that pybind11 automatically adds... The pybind11-doc-test project resembles the original repo in which I discovered this issue (just super simplified).
The sample's docs are designed to show the error (currently broken). The docs can be generated by removing the attributes' names from the
|
oh yea, check the doc-test project's CI artifacts for the built wheels (currently only targeting the OSs used in github runners) |
Thanks. I think potentially it would make sense to just include the |
How do want to rope in the pybind11 source? In the sample project, I used CMake. In the the pyrf24 project, I used a git submodule. |
It appears to be available on pypi. |
took me a while to figure out how to do it without cmake, but see #145 |
been looking into the autodoc_proprerty.py, and I found an unused var ( sphinx-immaterial/sphinx_immaterial/apidoc/python/autodoc_property_type.py Lines 28 to 40 in 412922e
- doc = obj.__doc__
+ doc = fget.__doc__ The working solution I did find was to make sphinx-immaterial/sphinx_immaterial/apidoc/python/autodoc_property_type.py Lines 19 to 25 in 412922e
only return |
I found a peculiarity in pybind11 concerning a class' property's If I build the test pkg using a singular module structure:
then
results from
|
I'm a bit confused --- for me, regardless of whether the C++ source file in a |
FYI, I just did a recently release of the problematic repo, pyrf24, where I moved the binding code out of the repo's src/pkg_name/ folder (its now just in src/) in an effort to discontinue using scikit-build pkg. I'm not sure how this may have effected the issue here... I say this because I because (using the latest release of pyrf24) the As it stands I think #145 is an accurate production of this issue because it does fail without the fix in #142 . I'll mark it ready to merge, so I can move on from this problem. I'm not concerned with getting the docstring from c-extended class properties' |
* Ignore exceptions in autodoc_property_type Fixes #134. * add simple pybind11 example for testing (#145) * add simple pybind11 example for testing * move pytest reqs, & add pytest config to toml * add failing test also test to validate example pkg * install test deps with pkg/lint tools - force black exit code to reflect required changes - ran black on object_toc.py - move linting tools' config to pyproject.toml The repo structure has changed since refactors (in previous PRs). So, the CI now does: - run mypy on all py files. - run pylint on all pkg files. - run black on all py files. * add pyyaml to test reqs * use custon sig in pybind11 test and show c'tor in test's rendered output * Fix regression in extracting return type from pybind11 properties This regression was introduced by 8e4485e. * Apply black to more files * Fix missing-timeout lint warning in external_resource_cache * Update pyproject.toml Co-authored-by: Brendan <[email protected]> Co-authored-by: Brendan <[email protected]>
fixed in v0.9.0 |
Latest release (v0.8.0) seems to have broken the use of the
autoclass
directive's:members:
option. I'm getting the following unhelpful errorThe traceback isn't helpful at all. the only thing I notice from the error message is that the object's name is missing:
objtype ?? at offset
.full traceback
simple example
Note: The separating backslash

\
isn't required in sphinx v4.0+In v0.7.3, this renders as
At first I, thought it was related to my overloaded
__init__()
, but it seems to be happening anytime I specify themembers
option.As a workaround I can use
but it breaks when I use
The text was updated successfully, but these errors were encountered: