Skip to content

Commit ab2639b

Browse files
authored
MRG: Merge pull request #730 from octue/remove-app-configuration
Move app configuration into service configuration
2 parents 0e9337d + f3dde26 commit ab2639b

28 files changed

+397
-415
lines changed

docs/source/api.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,11 @@ FilterDict
5858

5959
Configuration
6060
=============
61-
.. autofunction:: octue.configuration.load_service_and_app_configuration
6261

6362
Service configuration
6463
---------------------
6564
.. autoclass:: octue.configuration.ServiceConfiguration
6665

67-
App configuration
68-
-----------------
69-
.. autoclass:: octue.configuration.AppConfiguration
70-
7166

7267
Runner
7368
======

docs/source/asking_questions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@ Asking a question within a service
223223
==================================
224224
If you have :doc:`created your own Twined service <creating_services>` and want to ask children questions, you can do
225225
this more easily than above. Children are accessible from the ``analysis`` object by the keys you give them in the
226-
:ref:`app configuration <app_configuration>` file. For example, you can ask an ``elevation`` service a question like
226+
:ref:`service configuration <service_configuration>` file. For example, you can ask an ``elevation`` service a question like
227227
this:
228228

229229
.. code-block:: python
230230
231231
answer, question_uuid = analysis.children["elevation"].ask(input_values={"longitude": 0, "latitude": 1})
232232
233-
if your app configuration file is:
233+
if these values are in your service configuration file:
234234

235235
.. code-block:: json
236236
@@ -272,7 +272,7 @@ and your ``twine.json`` file includes the child keys in its ``children`` field:
272272
]
273273
}
274274
275-
See the parent service's `app configuration <https://github.com/octue/octue-sdk-python/blob/main/octue/templates/template-child-services/parent_service/app_configuration.json>`_
275+
See the parent service's `service configuration <https://github.com/octue/octue-sdk-python/blob/main/octue/templates/template-child-services/parent_service/octue.yaml>`_
276276
and `app.py file <https://github.com/octue/octue-sdk-python/blob/main/octue/templates/template-child-services/parent_service/app.py>`_
277277
in the `child-services app template <https://github.com/octue/octue-sdk-python/tree/main/octue/templates/template-child-services>`_
278278
to see this in action.
@@ -285,14 +285,14 @@ If the child you're asking a question to has its own children (static children),
285285
IDs of the children you want it to use (dynamic children) to the :mod:`Child.ask <octue.resources.child.Child.ask>`
286286
method. Questions that would have gone to the static children will instead go to the dynamic children. Note that:
287287

288-
- You must provide the children in the same format as they're provided in the :ref:`app configuration <app_configuration>`
288+
- You must provide the children in the same format as they're provided in the :ref:`service configuration <service_configuration>`
289289
- If you override one static child, you must override others, too
290290
- The dynamic children must have the same keys as the static children (so the child knows which service to ask which
291291
questions)
292292
- You should ensure the dynamic children you provide are compatible with and appropriate for questions from the child
293293
service
294294

295-
For example, if the child requires these children in its app configuration:
295+
For example, if the child requires these children in its service configuration:
296296

297297
.. code-block:: json
298298

docs/source/creating_apps.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ When the analysis has finished, it is automatically finalised. This means:
156156
.. note::
157157

158158
You can manually call :mod:`analysis.finalise <octue.resources.analysis.Analysis.finalise>` if you want to upload
159-
any output datasets to a different location to the one specified in the app configuration. If you do this, the
159+
any output datasets to a different location to the one specified in the service configuration. If you do this, the
160160
analysis will not be finalised again - make sure you only call it when your output data is ready. Note that the
161-
``output_location`` and ``use_signed_urls_for_output_datasets`` settings in the app configuration are ignored if you
162-
call it manually.
161+
``output_location`` and ``use_signed_urls_for_output_datasets`` settings in the service configuration are ignored if
162+
you call it manually.

docs/source/creating_services.rst

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ a `requirements.txt file <https://learnpython.com/blog/python-requirements-file/
3131
`pyproject.toml file <https://python-poetry.org/docs/pyproject/>`_ listing all the python packages your app depends on
3232
and the version ranges that are supported.
3333

34-
.. _octue_yaml:
34+
.. _service_configuration:
3535

3636
octue.yaml
3737
----------
@@ -51,7 +51,6 @@ octue.yaml
5151
It may also need the following key-value pairs:
5252

5353
- ``app_source_path: <path>`` - if your ``app.py`` file is not in the repository root
54-
- ``app_configuration_path: <path>`` - if your app needs an app configuration file that isn't in the repository root
5554

5655
All paths should be relative to the repository root. Other valid entries can be found in the
5756
:mod:`ServiceConfiguration <octue.configuration.ServiceConfiguration>` constructor.
@@ -61,29 +60,15 @@ octue.yaml
6160
Currently, only one service can be defined per repository, but it must still appear as a list item of the
6261
"services" key. At some point, it will be possible to define multiple services in one repository.
6362

64-
.. _app_configuration:
65-
66-
App configuration file (optional)
67-
---------------------------------
68-
69-
.. collapse:: An optional app configuration JSON file specifying, for example, any children your app depends on - read more...
70-
71-
----
72-
73-
If your app needs any configuration, asks questions to any other Twined services, or produces output
74-
datafiles/datasets, you will need to provide an app configuration. Currently, this must take the form of a JSON
75-
file. It can contain the following keys:
63+
If a service's app needs any configuration, asks questions to any other Twined services, or produces output
64+
datafiles/datasets, you will need to provide some or all of the following values for that service:
7665

7766
- ``configuration_values``
7867
- ``configuration_manifest``
7968
- ``children``
8069
- ``output_location``
8170
- ``use_signed_urls_for_output_datasets``
8271

83-
If an app configuration file is provided, its path must be specified in ``octue.yaml`` under the
84-
"app_configuration_path" key.
85-
86-
See the :mod:`AppConfiguration <octue.configuration.AppConfiguration>` constructor for more information.
8772

8873
Dockerfile (optional)
8974
---------------------

0 commit comments

Comments
 (0)