Skip to content

Commit

Permalink
docs: autoload client methods and add missing parameter descriptions
Browse files Browse the repository at this point in the history
Configure Sphinx to autoload all the public methods from `api.client`
and add a small descriptions of the parameters and return value of a
function where it was missing.

Closes reanahub#665.
  • Loading branch information
giuseppe-steduto committed Aug 22, 2023
1 parent c9cb332 commit 5fc10fb
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 32 deletions.
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
from __future__ import print_function

import os
import sys

from unittest.mock import Mock

import sphinx.environment

Expand All @@ -33,6 +36,11 @@
#
# needs_sphinx = '1.0'

# Manually mock the modules to connect to the REANA server API.
# Note that autodoc_mock_imports does not work.
MOCK_MODULES = ["reana_commons.api_client"]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# Do not warn on external images.
suppress_warnings = ["image.nonlocal_uri"]

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ API docs
========

.. automodule:: reana_client.api.client
:members: create_workflow_from_json, upload_to_server, upload_file, start_workflow, list_files, get_workflow_status, download_file, get_workflow_logs
:members:

.. include:: ../CHANGES.rst

Expand Down
Loading

0 comments on commit 5fc10fb

Please sign in to comment.