Skip to content

Documentation for Edge is incomplete #813

Description

@jchia

Describe the bug
The documentation for Edge (https://python.igraph.org/en/main/api/igraph.Edge.html) is incomplete. It fails to mention source, target, tuple, graph, index, source_vertex at all, among other things.

To reproduce
Just view the documentation page at the URL.

Version information
Latest or stable.

Activity

  1. stale commented on Apr 27, 2025

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

  2. jchia commented on Apr 28, 2025

    @jchia
    Author

    Any updates?

  3. ntamas commented on Apr 28, 2025

    @ntamas
    Member

    I took a look at this now; apparently it seems that pydoctor does not recognize properties defined in classes implemented in C code automatically as it relies on parsing the Python source of the class, which is not accessible in this case. I'll check whether there's a way to tell PyDoctor the list of properties explicitly.

  4. ntamas commented on Apr 28, 2025

    @ntamas
    Member

    Unfortunately this seems to be an issue with pydoctor. pydoctor uses obj.__dict__.items() to iterate over all the members of a class to find out which ones are to be documented. The items that are missing from the documentation never appear in obj.__dict__, and even adding them manually to the class docstring with @ivar does not seem to help - the list of items to be documented in a class is still decided by obj.__dict__.items().

    The only option that we have right now (without patching pydoctor) would be to just document the missing attributes in the class docstring in plain text. They would not appear in the list of class members but at least they would be mentioned in the HTML docs. Would that be OK for you?

  5. jchia commented on Apr 28, 2025

    @jchia
    Author

    Yes, that would be an improvement over the current situation, where the functions are not discoverable from the documentation alone so the reader would not know what he is missing.

  6. tristanlatr commented on Jun 27, 2025

    @tristanlatr
    Contributor

    Adding @ivar fields in the class docstring should create attribute entries for these names. If you think you've hit a bug in pydoctor , please open an issue! Thanks

  7. added a commit that references this issue on Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions