From 219e7ca2ba4181dfb5ffc98d8cd935cd1debb6af Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 19 Dec 2024 14:21:13 +0100 Subject: [PATCH] :construction_worker: [#501] Make sure docs are built in CI --- .github/workflows/ci.yml | 1 + docs/installation/config_cli.rst | 74 ++++++++++++++------------------ requirements/ci.in | 5 +++ requirements/ci.txt | 44 +++++++++++++++++++ 4 files changed, 83 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 475a64ff..dda9f46b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,6 +91,7 @@ jobs: - store-reusable-workflow-vars with: main-branch: 'master' + run-docs: true python-version: '3.11' docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} diff --git a/docs/installation/config_cli.rst b/docs/installation/config_cli.rst index 4445262a..281e414c 100644 --- a/docs/installation/config_cli.rst +++ b/docs/installation/config_cli.rst @@ -37,37 +37,37 @@ Objecttypes configuration To configure objecttypes the following configuration could be used: .. code-block:: yaml - ... - zgw_consumers_config_enable: true - zgw_consumers: - services: - - identifier: objecttypen-foo - label: Objecttypen API Foo - api_root: http://objecttypen.foo/api/v1/ - api_type: orc - auth_type: api_key - header_key: Authorization - header_value: Token ba9d233e95e04c4a8a661a27daffe7c9bd019067 - - - identifier: objecttypen-bar - label: Objecttypen API Bar - api_root: http://objecttypen.bar/api/v1/ - api_type: orc - auth_type: api_key - header_key: Authorization - header_value: Token b9f100590925b529664ed9d370f5f8da124b2c20 - - objecttypes_config_enable: true - objecttypes: - items: - - uuid: b427ef84-189d-43aa-9efd-7bb2c459e281 - name: Object Type 1 - service_identifier: objecttypen-foo - - - uuid: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2 - name: Object Type 2 - service_identifier: objecttypen-bar - ... + + zgw_consumers_config_enable: true + zgw_consumers: + services: + - identifier: objecttypen-foo + label: Objecttypen API Foo + api_root: http://objecttypen.foo/api/v1/ + api_type: orc + auth_type: api_key + header_key: Authorization + header_value: Token ba9d233e95e04c4a8a661a27daffe7c9bd019067 + + - identifier: objecttypen-bar + label: Objecttypen API Bar + api_root: http://objecttypen.bar/api/v1/ + api_type: orc + auth_type: api_key + header_key: Authorization + header_value: Token b9f100590925b529664ed9d370f5f8da124b2c20 + + objecttypes_config_enable: true + objecttypes: + items: + - uuid: b427ef84-189d-43aa-9efd-7bb2c459e281 + name: Object Type 1 + service_identifier: objecttypen-foo + + - uuid: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2 + name: Object Type 2 + service_identifier: objecttypen-bar + .. note:: The ``uuid`` field will be used to lookup existing ``ObjectType``'s. Objecttypes require a corresponding ``Service`` to work correctly. Creating @@ -81,7 +81,6 @@ In order to be able to retrieve objecttypes, a corresponding ``Service`` should created. An example of a configuration could be seen below: .. code-block:: yaml - ... zgw_consumers_config_enable: true zgw_consumers: @@ -102,15 +101,13 @@ created. An example of a configuration could be seen below: auth_type: api_key header_key: Authorization header_value: Token b9f100590925b529664ed9d370f5f8da124b2c20 - .... Tokens configuration -------------------- Create or update the (single) YAML configuration file with your settings: .. code-block:: yaml - - ... + tokenauth_config_enable: true tokenauth: items: @@ -127,7 +124,6 @@ Create or update the (single) YAML configuration file with your settings: token: 7b2b212d9f16d171a70a1d927cdcfbd5ca7a4799 contact_person: Person 2 email: person-2@example.com - ... Mozilla-django-oidc-db ---------------------- @@ -136,7 +132,6 @@ Create or update the (single) YAML configuration file with your settings: .. code-block:: yaml - ... oidc_db_config_enable: true oidc_db_config_admin_auth: items: @@ -150,7 +145,6 @@ Create or update the (single) YAML configuration file with your settings: # workaround for https://github.com/maykinmedia/django-setup-configuration/issues/27 userinfo_claims_source: id_token - ... More details about configuring mozilla-django-oidc-db through ``setup_configuration`` can be found at the _`documentation`: https://mozilla-django-oidc-db.readthedocs.io/en/latest/setup_configuration.html. @@ -159,14 +153,13 @@ Sites configuration ------------------- Notifications configuration -------------------------- +--------------------------- To configure sending notifications for the application ensure there is a ``services`` item present that matches the ``notifications_api_service_identifier`` in the ``notifications_config`` namespace: .. code-block:: yaml - ... zgw_consumers_config_enable: true zgw_consumers: @@ -184,7 +177,6 @@ item present that matches the ``notifications_api_service_identifier`` in the notification_delivery_max_retries: 1 notification_delivery_retry_backoff: 2 notification_delivery_retry_backoff_max: 3 - .... Execution diff --git a/requirements/ci.in b/requirements/ci.in index 76375907..92e713a9 100644 --- a/requirements/ci.in +++ b/requirements/ci.in @@ -1,2 +1,7 @@ codecov pytest + +# Documentation +sphinx +sphinx-rtd-theme +sphinx-tabs diff --git a/requirements/ci.txt b/requirements/ci.txt index 82456248..fc54dcf5 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,6 +4,8 @@ # # pip-compile --no-emit-index-url --output-file=requirements/ci.txt requirements/base.txt requirements/ci.in requirements/test-tools.in # +alabaster==1.0.0 + # via sphinx amqp==5.2.0 # via # -r requirements/base.txt @@ -33,6 +35,8 @@ attrs==20.3.0 # -r requirements/base.txt # glom # jsonschema +babel==2.16.0 + # via sphinx beautifulsoup4==4.9.3 # via webtest billiard==4.2.0 @@ -288,6 +292,11 @@ djangorestframework-inclusions==1.2.0 # via # -r requirements/base.txt # open-api-framework +docutils==0.21.2 + # via + # sphinx + # sphinx-rtd-theme + # sphinx-tabs drf-nested-routers==0.94.1 # via # -r requirements/base.txt @@ -346,6 +355,8 @@ idna==3.7 # -r requirements/base.txt # requests # yarl +imagesize==1.4.1 + # via sphinx inflection==0.5.1 # via # -r requirements/base.txt @@ -371,6 +382,7 @@ jinja2==3.1.4 # via # -r requirements/base.txt # coreschema + # sphinx josepy==1.9.0 # via # -r requirements/base.txt @@ -427,6 +439,7 @@ packaging==23.2 # black # drf-yasg # pytest + # sphinx pathspec==0.12.1 # via black phonenumberslite==8.13.30 @@ -470,6 +483,10 @@ pydantic-settings[yaml]==2.6.1 # django-setup-configuration pyflakes==3.2.0 # via flake8 +pygments==2.18.0 + # via + # sphinx + # sphinx-tabs pyjwt==2.4.0 # via # -r requirements/base.txt @@ -537,6 +554,7 @@ requests==2.32.3 # mozilla-django-oidc # open-api-framework # requests-mock + # sphinx # zgw-consumers requests-mock==1.12.1 # via @@ -557,8 +575,34 @@ six==1.16.0 # python-dateutil # qrcode # webtest +snowballstemmer==2.2.0 + # via sphinx soupsieve==2.2.1 # via beautifulsoup4 +sphinx==8.1.3 + # via + # -r requirements/ci.in + # sphinx-rtd-theme + # sphinx-tabs + # sphinxcontrib-jquery +sphinx-rtd-theme==3.0.2 + # via -r requirements/ci.in +sphinx-tabs==3.4.7 + # via -r requirements/ci.in +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx sqlparse==0.5.0 # via # -r requirements/base.txt