pyglet / pyglet

pyglet is a cross-platform windowing and multimedia library for Python, for developing games and other visually rich applications.
http://pyglet.org
BSD 3-Clause "New" or "Revised" License
1.78k stars 294 forks source link

pyglet needs a full docstring review and cleanup #1084

Open benmoran56 opened 2 months ago

benmoran56 commented 2 months ago

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.


pushfoo commented 1 month ago

Starting on shapes.

EDIT: finished shapes

benmoran56 commented 1 month ago

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.

benmoran56 commented 1 month ago

app and canvas base classes have been completed.

benmoran56 commented 1 month ago

finished event

benmoran56 commented 1 month ago

Finished sprite.

pushfoo commented 1 month ago

Starting on lib

benmoran56 commented 3 weeks ago

Finished the model module.

benmoran56 commented 3 weeks ago

Working on media now.

benmoran56 commented 3 weeks ago

First pass of media is done.

pushfoo commented 2 weeks ago

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:
    • I PR'd my already-finished changes in #1108
    • I'm handing off further work on pyglet.libs to anyone who'd like to try
matanox commented 2 weeks ago

While reviewing my open issues v.s. issues here, I stumbled upon here and it struck a humble chord:

Maybe someone can obviate in PlatformEventLoop.notify's docstring whether this is a method that user code should ever call?

Do all docstrings end up on the online documentation, or is there a syntax which excludes a docstring for when it's too low level a class member?

matanox commented 2 weeks ago

Okay, read better above now, this is out of scope.