Skip to content

pyglet needs a full docstring review and cleanup #1084

Closed

Description

@benmoran56

pyglet has gone through several documentation build tools in its life, leading to variation in the docstrings across the library.
Currently we use Sphinx to build the docs, which is capable of building a variety of formats. This works for the most part but, with recent additions of type hints across the library, there is a lot of inconsistency with how the API docs are rendering.

The purpose of this ticket is to get the ball rolling on a full review and refactoring of the docstrings. This can be done in multiple parts.

  • Decide on a consistent style that we will use. This is currently under discussion, and includes looking at additional sphinx plugins that may improve things with regards to type hints.
  • Update the section in the documentation that describes our desired docstring format. This is still referencing rst style, but will potentially change. This link is here, but will need to be updated after 1. is complete: https://pyglet.readthedocs.io/en/latest/internal/doc.html
  • Go through each module and update the docstrings to the new format. There are many cases where things are undocumented. It would be more time effective to skip over missing things at this time, and just focus on conversion. Many modules are still missing type hints as well, but again, it would be more time effective to leave this for later.

  • app
  • canvas
  • clock
  • customtypes
  • event
  • font
  • gl
  • graphics
  • gui
  • input
  • image
  • lib
  • math
  • media
  • model
  • resource
  • sprite
  • shapes
  • text
  • window

Activity

  1. pushfoo commented on Apr 14, 2024

    @pushfoo
    Contributor

    Starting on shapes.

    EDIT: finished shapes

  2. pinned this issue on Apr 14, 2024
  3. benmoran56 commented on Apr 15, 2024

    @benmoran56
    MemberAuthor

    First pass of input module is complete. input.base should now be fully type-hinted and documented, but will need to be checked if the docstrings are all building and showing.
    Platform specific submodules are not not type-hinted yet, but all existing docstrings have been updated. This will need to be fleshed out in a later pass.

  4. benmoran56 commented on Apr 16, 2024

    @benmoran56
    MemberAuthor

    app and canvas base classes have been completed.

  5. benmoran56 commented on Apr 23, 2024

    @benmoran56
    MemberAuthor

    finished event

  6. benmoran56 commented on Apr 24, 2024

    @benmoran56
    MemberAuthor

    Finished sprite.

  7. pushfoo commented on Apr 27, 2024

    @pushfoo
    Contributor

    Starting on lib

  8. benmoran56 commented on May 7, 2024

    @benmoran56
    MemberAuthor

    Finished the model module.

  9. benmoran56 commented on May 10, 2024

    @benmoran56
    MemberAuthor

    Working on media now.

  10. benmoran56 commented on May 10, 2024

    @benmoran56
    MemberAuthor

    First pass of media is done.

  11. pushfoo commented on May 14, 2024

    @pushfoo
    Contributor

    TL;DR: pyglet.libs is up for grabs

    1. I've unexpectedly had much less free time & access to an ARM64 Mac than I'd planned
    2. To make sure I don't block anyone or anything:
  12. benmoran56 commented on Jun 18, 2024

    @benmoran56
    MemberAuthor

    Working on image at the moment.

  13. caffeinepills commented on Jun 18, 2024

    @caffeinepills
    Collaborator

    Window was done. I will work on graphics.

  14. unpinned this issue on Jul 3, 2024
  15. pinned this issue on Jul 14, 2024
  16. shenjackyuanjie commented on Jul 15, 2024

    @shenjackyuanjie
    Contributor

    some cleanup in #1150

  17. benmoran56 commented on Jul 24, 2024

    @benmoran56
    MemberAuthor

    The image module has been done, and is part of this PR: #1179

    With that, it looks like our first pass is complete. All public modules should have been looked over and improved. Some internal modules still remain, but we can get to those as time allows.

    Thanks everyone for working on this!

  18. unpinned this issue on Jul 31, 2024
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

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions