Skip to content

Commit

Permalink
docs: move Pebble to a separate page (#1392)
Browse files Browse the repository at this point in the history
Pros:
* Significantly reduces the length of the right-hand sidebar for the
main API reference
* Clearly delineates ops.pebble, which could legitimately used
independently of ops as a Python Pebble API
* Separates duplication between ops.Container and ops.pebble into
separate pages

Cons:
* Browser search-on-page is less useful (although we already started
this process by splitting ops.testing out)
* Existing deep links into the docs will break (we should be able to
find and fix the ones on juju.is/docs at least)
  • Loading branch information
tonyandrewmeyer authored Sep 26, 2024
1 parent d342885 commit dcb4d78
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 2 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The library (`available on PyPI`_) provides:

- :ref:`ops_module`, the API to respond to Juju events and manage the application;
- :ref:`ops_main_entry_point`, used to initialise and run your charm;
- :ref:`ops_pebble_module`, the Pebble client, a low-level API for Kubernetes containers;
- :doc:`ops.pebble </pebble>`, the Pebble client, a low-level API for Kubernetes containers;
- the APIs for unit testing charms in a simulated environment:

- :doc:`State-transition testing </state-transition-testing>`. This is the
Expand All @@ -30,6 +30,7 @@ integrations with other services, and making the charm easier to test.
:maxdepth: 2

self
pebble
state-transition-testing
harness

Expand All @@ -56,15 +57,6 @@ legacy main module
.. automodule:: ops.main
:noindex:

.. _ops_pebble_module:

ops.pebble
----------

.. automodule:: ops.pebble

.. _ops_testing_module:


Indices
=======
Expand Down
6 changes: 6 additions & 0 deletions docs/pebble.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _ops_pebble_module:

Pebble client
=============

.. automodule:: ops.pebble
2 changes: 1 addition & 1 deletion ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"""The API to respond to Juju events and manage the application.
This module provides core features to your charm, including:
This API provides core features to your charm, including:
- :class:`~ops.CharmBase`, the base class for charms and :class:`~ops.Object`,
the base class for charm libraries.
Expand Down

0 comments on commit dcb4d78

Please sign in to comment.