From 7015e5a5838b6da02a2dc202e97f2e0db0eccadd Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Thu, 8 Jun 2023 11:47:17 +0100 Subject: [PATCH] first-pass of API docs for met_processing --- coordinator/EnvSuitPipeline.py | 2 +- docs/_source/installation.rst | 16 +++++++++++----- docs/conf.py | 3 ++- docs/index.rst | 24 ++++++++++++------------ 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/coordinator/EnvSuitPipeline.py b/coordinator/EnvSuitPipeline.py index 636e08e..7a76e82 100644 --- a/coordinator/EnvSuitPipeline.py +++ b/coordinator/EnvSuitPipeline.py @@ -104,7 +104,7 @@ def run_extraction(run_params: dict, sys_params: dict): def run_post_processing(run_params: dict, sys_params: dict, processor_name: str): - logger.info(f"Running post-processing in multi process mode.") + logger.info(f"Running post-processing.") job_runner.run_post_processing(run_params, sys_params, processor_name) logger.info('Data extracted and chunked') diff --git a/docs/_source/installation.rst b/docs/_source/installation.rst index 42d7cdb..b0d8354 100644 --- a/docs/_source/installation.rst +++ b/docs/_source/installation.rst @@ -1,8 +1,3 @@ -.. ews-plotting documentation master file, created by - sphinx-quickstart on Thu May 25 13:28:43 2023. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - Installation ============ @@ -11,3 +6,14 @@ Installation To install the package, do stuff +for sections +============ + +for subsections +--------------- + +for subsubsections +^^^^^^^^^^^^^^^^^^ + +for paragraphs +"""""""""""""" diff --git a/docs/conf.py b/docs/conf.py index 56a9b2d..40f4c70 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,6 +37,7 @@ autosummary_generate = True # Turn on sphinx.ext.autosummary autoclass_content = "both" # Add __init__ doc (ie. params) to class summaries html_show_sourcelink = False # Remove 'view source code' from top of page (for html, not python) autodoc_inherit_docstrings = True # If no docstring, inherit from base class +autodoc_typehints_description_target = "documented" set_type_checking_flag = True # Enable 'expensive' imports for sphinx_autodoc_typehints nbsphinx_allow_errors = True autodoc_typehints = "description" # Sphinx-native method. Not as good as sphinx_autodoc_typehints @@ -69,6 +70,6 @@ html_static_path = ['_static'] # # Connect the autodoc-skip-member event from apidoc to the callback # app.connect('autodoc-skip-member', autodoc_skip_member_handler) - +# customised the css to make the pages wider def setup(app): app.add_css_file('css/extra.css') \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 1b60133..009d806 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,17 +4,6 @@ Welcome to the EWS documentation! ======================================== -for sections -============ - -for subsections ---------------- - -for subsubsections -^^^^^^^^^^^^^^^^^^ - -for paragraphs -"""""""""""""" .. toctree:: Home <self> @@ -32,7 +21,7 @@ for paragraphs coordinator API <_autosummary/coordinator> plotting API <_autosummary/plotting> post processing API <_autosummary/ews_postprocessing> - met processing processing API <_autosummary/met_processing> + met processing API <_autosummary/met_processing> source gen API <_autosummary/source_gen> .. admonition:: Box thingy @@ -46,6 +35,17 @@ this is is a load of ``text`` that has ``plotting.common.utils`` this function i and this should be on a new line + +Note that to link to a method: :meth:`~met_processing.runner.common.job_runner.run_extraction` +or a function: :func:`~met_processing.common.met_field_name_constants_parser.parse_constants_file` +or a class :class:`~met_processing.common.MetDataConstants.MetDataConstants`, the target concerned has to have docs, +otherwise there will be no file to generate a link to + +note that you can also link to :class:`met_processing.met_extraction` modules, but you use the :class: markup for some +reason + +The code blocks above also work in the docstrings. + .. autosummary:: plotting.common.utils.build_standard_depo_diseases ews_postprocessing.deposition.NAME_to_csv.NAMEToCSV -- GitLab