Skip to content
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

pyglet needs a full docstring review and cleanup #1084

Open
17 of 23 tasks
benmoran56 opened this issue Apr 3, 2024 · 12 comments
Open
17 of 23 tasks

pyglet needs a full docstring review and cleanup #1084

benmoran56 opened this issue Apr 3, 2024 · 12 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@benmoran56
Copy link
Member

benmoran56 commented Apr 3, 2024

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
@benmoran56 benmoran56 added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 3, 2024
pushfoo pushed a commit to pushfoo/pyglet that referenced this issue Apr 8, 2024
@pushfoo
Copy link
Contributor

pushfoo commented Apr 14, 2024

Starting on shapes.

@benmoran56
Copy link
Member Author

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
Copy link
Member Author

app and canvas base classes have been completed.

@benmoran56
Copy link
Member Author

finished event

@benmoran56
Copy link
Member Author

Finished sprite.

@pushfoo
Copy link
Contributor

pushfoo commented Apr 27, 2024

Starting on lib

@benmoran56
Copy link
Member Author

Finished the model module.

@benmoran56
Copy link
Member Author

Working on media now.

@benmoran56
Copy link
Member Author

First pass of media is done.

@pushfoo
Copy link
Contributor

pushfoo commented May 14, 2024

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:

@matanox
Copy link
Contributor

matanox commented May 18, 2024

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
Copy link
Contributor

matanox commented May 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants