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

Make experimental API not hidden in the docs anymore #3068

Merged
merged 5 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/reST/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,41 @@ section below, check out a video tutorial (`I'm a fan of this one
<https://www.youtube.com/watch?v=AY9MnQ4x3zk>`_), or reference the API
documentation by module.

Experimental modules
--------------------

Experimental modules are work in progress, this is why you should refrain from relying on any features
provided by these modules, as they are subject to change or removal without prior notice.
If you want to test these experimental modules, you might want to understand how you import
them, this is how you can do it:

.. code-block:: python

from pygame import experimental_module
# Or for specific modules like _sdl2.controller
from pygame._sdl2 import controller
# Or
import pygame.experimental_module

Don't forget to report us any problem with the experimental features on `github`_ so we can easily
turn them to stable API in the future ^^.

**Below is currently the list of experimental modules :**

:doc:`ref/geometry`
Pygame module for the Circle, Line, and Polygon objects.

:doc:`ref/window`
Pygame object that handles a window.

:doc:`ref/sdl2_controller`
Pygame module to work with controllers.

:doc:`ref/sdl2_video`
Pygame module for porting new SDL video systems.

.. _github: https://github.com/pygame-community/pygame-ce

Documents
---------

Expand Down
3 changes: 2 additions & 1 deletion docs/reST/themes/classic/elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ <h5>pygame-ce documentation</h5>

#}
{%- set basic = ['Color', 'display', 'draw', 'event', 'font', 'image', 'key', 'locals', 'mixer', 'mouse', 'music', 'pygame', 'Rect', 'Surface', 'time'] %}
{%- set experimental = ['sdl2_video', 'controller', 'geometry', 'Window'] %}
{%- set advanced = ['BufferProxy', 'freetype', 'gfxdraw', 'midi', 'PixelArray', 'pixelcopy', 'sndarray', 'surfarray', 'cursors', 'joystick', 'mask', 'math', 'sprite', 'transform'] %}
{%- set hidden = ['sdl2_video', 'sdl2_controller', 'geometry', 'Window'] %}
{%- set hidden = ['sdl2_video', 'geometry', 'Window'] %}
{%- if pyg_sections %}
<p class="bottom"><b>Most useful stuff</b>:
{% set sep = joiner(" | \n") %}
Expand Down