From acc4b67cd3fc0d2c43f4dd63b6f374ac8e81aeb5 Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Fri, 20 Sep 2024 09:28:46 +0900 Subject: [PATCH] docs: add top-level intro and module-level intros (#1320) Docs: Ops: Add top-level intro, clean up ops.module intro in light of that, flesh out ops.pebble and ops.testing intros a bit more https://warthogs.atlassian.net/browse/CHARMTECH-183 - [x] "home page" library reference - [x] ops module - [x] ops.main entry point - [x] ops.pebble module - [x] ops.testing module --- docs/index.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 8ac0abcee..2860bdf61 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,6 +25,24 @@ integrations with other services, and making the charm easier to test. .. _available on PyPI: https://pypi.org/project/ops/ +The `ops` library is a Python framework for writing and testing Juju charms. + + See more: `Charm SDK documentation `_ + +The library provides: + +- :ref:`ops_main_entry_point`, used to initialise and run your charm; +- :ref:`ops_module`, the API to respond to Juju events and manage the application; +- :ref:`ops_pebble_module`, the Pebble client, a low-level API for Kubernetes containers; +- :ref:`ops_testing_module`, the framework for unit testing charms in a simulated environment; + +You can structure your charm however you like, but with the `ops` library, you +get a framework that promotes consistency and readability by following best +practices. It also helps you organise your code better by separating different +aspects of the charm, such as managing the application’s state, handling +integrations with other services, and making the charm easier to test. + + .. toctree:: :hidden: :maxdepth: 2 @@ -44,6 +62,8 @@ ops .. _ops_main_entry_point: +.. _ops_main_entry_point: + ops.main entry point --------------------