From 7907aaa1e05a2cfe42ae1423b73d2cac8eee29a2 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Tue, 19 Dec 2023 16:04:12 -0500 Subject: [PATCH] misc(docs): testing some changes to hopefully get docstrings working --- docs/source/api.rst | 12 ++++++++++++ docs/source/conf.py | 1 + pyzipline/zipline.py | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index eb9a12b..3c60da4 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -5,3 +5,15 @@ API Reference :toctree: generated pyzipline + + +.. automodule:: zipline + :members: + :undoc-members: + :show-inheritance: + :inherited-members: + :noindex: + :exclude-members: __init__, __repr__, __str__ + + .. automethod:: zipline.function_name + :noindex: diff --git a/docs/source/conf.py b/docs/source/conf.py index 655792e..a11c9de 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,3 +1,4 @@ +# pylint: skip-file # Configuration file for the Sphinx documentation builder. # -- Project information diff --git a/pyzipline/zipline.py b/pyzipline/zipline.py index 9f973a9..d93b136 100644 --- a/pyzipline/zipline.py +++ b/pyzipline/zipline.py @@ -16,14 +16,14 @@ class ZiplineApi: :param hostname: The hostname of your Zipline instance, WITHOUT https or http. :type hostname: str - :param token: (optional) String used for authentication when making requests. - :type token: str - :param ssl: (optional) Normally set to True, but if your Zipline instance doesn't use SSL/TLS, set this to False. - :type ssl: bool - :param enforced_signing: (optional) Normally set to True, but if having SSL/TLS cert validation issues, can turn off with False. - :type enforced_signing: bool - :param logger: (optional) If your app has a logger, pass it in here. - :type logger: logging.Logger + :param token: String used for authentication when making requests. + :type token: str, optional + :param ssl: Normally set to True, but if your Zipline instance doesn't use SSL/TLS, set this to False. + :type ssl: bool, optional + :param enforced_signing: Normally set to True, but if having SSL/TLS cert validation issues, can turn off with False. + :type enforced_signing: bool, optional + :param logger: If your app has a logger, pass it in here. + :type logger: logging.Logger, optional """ self._rest_adapter = RestAdapter(hostname=hostname, token=token, ssl=ssl, enforced_signing=enforced_signing, logger=logger) @@ -32,8 +32,8 @@ class ZiplineApi: :param user_id: Integer ID of the user :type user_id: int - :return: User object - :rtype: User + :return: The :class:`pyzipline.models.User` object matching the ID + :rtype: :class:`pyzipline.models.User` """ result = self._rest_adapter.get(endpoint=f"user/{user_id}") return User(**result.data) @@ -41,8 +41,8 @@ class ZiplineApi: def get_self(self) -> User: """Get the currently authenticated user - :return: User object - :rtype: User + :return: `pyzipline.models.User`object matching the authenticated user + :rtype: `pyzipline.models.User` """ result = self._rest_adapter.get(endpoint=f"user") return User(**result.data)