From 917a87beb85d18585a1e67557b916bf324b48776 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Wed, 17 Aug 2022 13:40:03 -0700 Subject: [PATCH] doc tweaks --- .pre-commit-config.yaml | 4 +-- docs/conf.py | 30 ++++++------------ docs/nitpick-exceptions | 3 -- hvpy/api_groups/jpeg2000/get_jp2_image.py | 2 +- hvpy/api_groups/movies/get_movie_status.py | 6 ++-- hvpy/api_groups/movies/queue_movie.py | 23 +++++++------- .../official_clients/get_closest_image.py | 4 +-- .../official_clients/get_data_sources.py | 4 +-- hvpy/api_groups/screenshots/get_tile.py | 31 +++++++------------ pyproject.toml | 1 - 10 files changed, 44 insertions(+), 64 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4efc2a..a765a10 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/myint/docformatter - rev: v1.4 + rev: v1.5.0-rc1 hooks: - id: docformatter args: [--in-place, --pre-summary-newline, --make-summary-multi] @@ -9,7 +9,7 @@ repos: hooks: - id: autoflake args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] - exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$" + exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py)$" - repo: https://github.com/psf/black rev: 22.6.0 hooks: diff --git a/docs/conf.py b/docs/conf.py index 2da64cf..1565311 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,22 +14,22 @@ # -- General configuration --------------------------------------------------- extensions = [ "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx_autodoc_typehints", - "sphinx.ext.intersphinx", - "sphinx.ext.todo", "sphinx.ext.coverage", - "sphinx.ext.inheritance_diagram", - "sphinx.ext.viewcode", "sphinx.ext.doctest", + "sphinx.ext.inheritance_diagram", + "sphinx.ext.intersphinx", "sphinx.ext.mathjax", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", + "sphinx_autodoc_typehints", ] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] source_suffix = ".rst" master_doc = "index" - +default_role = "obj" # Enable nitpicky mode, which forces links to be non-broken nitpicky = True # This is not used. See docs/nitpick-exceptions file for the actual listing. @@ -42,20 +42,10 @@ nitpick_ignore.append((dtype, target)) # -- Options for intersphinx extension ----------------------------------------- -# Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - "python": ( - "https://docs.python.org/3/", - (None, "http://www.astropy.org/astropy-data/intersphinx/python3.inv"), - ), - "numpy": ( - "https://numpy.org/doc/stable/", - (None, "http://www.astropy.org/astropy-data/intersphinx/numpy.inv"), - ), - "scipy": ( - "https://docs.scipy.org/doc/scipy/reference/", - (None, "http://www.astropy.org/astropy-data/intersphinx/scipy.inv"), - ), + "python": ("https://docs.python.org/3/", None), + "numpy": ("https://numpy.org/doc/stable/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/reference/", None), "matplotlib": ("https://matplotlib.org/stable", None), "aiapy": ("https://aiapy.readthedocs.io/en/stable/", None), "astropy": ("https://docs.astropy.org/en/stable/", None), diff --git a/docs/nitpick-exceptions b/docs/nitpick-exceptions index b39e5e2..f6d1359 100644 --- a/docs/nitpick-exceptions +++ b/docs/nitpick-exceptions @@ -1,5 +1,2 @@ -py:class optional py:class pydantic.main.BaseModel py:class pydantic.utils.Representation -py:class rtype -py:obj typing.Literal[, , ] diff --git a/hvpy/api_groups/jpeg2000/get_jp2_image.py b/hvpy/api_groups/jpeg2000/get_jp2_image.py index 8633d89..c9b1548 100644 --- a/hvpy/api_groups/jpeg2000/get_jp2_image.py +++ b/hvpy/api_groups/jpeg2000/get_jp2_image.py @@ -21,7 +21,7 @@ class getJP2ImageInputParameters(HvpyParameters): Returns a JPIP URI instead of the binary data of the image if set to True. Default is `False`, optional. json - Optionally, returns the JSON if set to `True`. + Returns the JSON if set to `True`. Default is `False`, optional. References diff --git a/hvpy/api_groups/movies/get_movie_status.py b/hvpy/api_groups/movies/get_movie_status.py index c74c5fc..0387a7e 100644 --- a/hvpy/api_groups/movies/get_movie_status.py +++ b/hvpy/api_groups/movies/get_movie_status.py @@ -15,14 +15,14 @@ class getMovieStatusInputParameters(HvpyParameters): format Movie format. verbose - Optionally include extra metadata in the response. - Defaults to `False`. + Include extra metadata in the response. + Defaults to `False`, optional. callback Wrap the response object in a function call of your choosing. Default is `None` (no wrapping), optional. token API token. - Defaults to `None`. + Defaults to `None`, optional. References ---------- diff --git a/hvpy/api_groups/movies/queue_movie.py b/hvpy/api_groups/movies/queue_movie.py index c74f08d..246d730 100644 --- a/hvpy/api_groups/movies/queue_movie.py +++ b/hvpy/api_groups/movies/queue_movie.py @@ -27,7 +27,7 @@ class queueMovieInputParameters(HvpyParameters): imageScale Image scale in arcseconds per pixel. format - Movie format (mp4, webm, flv). + Movie format ("mp4", "webm", "flv"). Default value is "mp4", optional. frameRate Movie frames per second. @@ -48,38 +48,39 @@ class queueMovieInputParameters(HvpyParameters): Vertical offset of the image scale indicator in arcseconds with respect to the center of the Sun. Default value is `None`, optional. movieLength - movie length in seconds. + Movie length in seconds. Default value is `None`, optional. watermark - Optionally overlay a Helioviewer.org watermark image. + Overlay a Helioviewer.org watermark image. Default value is `True`, optional. width - Width of the field of view in pixels. (Used in conjunction width `x0`,`y0`, and height). + Width of the field of view in pixels. (Used in conjunction with ``x0``, ``y0``, and ``height``). Default value is `None`, optional. height - Height of the field of view in pixels. (Used in conjunction width `x0`,`y0`, and width). + Height of the field of view in pixels. (Used in conjunction with ``x0``, ``y0``, and ``width``). Default value is `None`, optional. x0 - The horizontal offset of the center of the field of view from the center of the Sun. Used in conjunction with `y0`, width, and height. + The horizontal offset of the center of the field of view from the center of the Sun. + Used in conjunction with ``y0``, ``width``, and ``height``. Default value is `None`, optional. y0 - The vertical offset of the center of the field of view from the center of the Sun. Used in conjunction with `x0`, width, and height. + The vertical offset of the center of the field of view from the center of the Sun. Used in conjunction with ``x0``, width, and height. Default value is `None`, optional. x1 The horizontal offset of the top-left corner of the field of view with respect to the center of the Sun (in arcseconds). - Used in conjunction with `y1`, `x2`, and `y2`. + Used in conjunction with ``y1``, ``x2``, and ``y2``. Default value is `None`, optional. y1 The vertical offset of the top-left corner of the field of view with respect to the center of the Sun (in arcseconds). - Used in conjunction with `x1`, `x2`, and `y2`. + Used in conjunction with ``x1``, ``x2``, and ``y2``. Default value is `None`, optional. x2 The horizontal offset of the bottom-right corner of the field of view with respect to the center of the Sun (in arcseconds). - Used in conjunction with `x1`, `y1`, and `y2`. + Used in conjunction with ``x1``, ``y1``, and ``y2``. Default value is `None`, optional. y2 The vertical offset of the bottom-right corner of the field of view with respect to the center of the Sun (in arcseconds). - Used in conjunction with `x1`, `y1`, and `x2`. + Used in conjunction with ``x1``, ``y1``, and ``x2``. Default value is `None`, optional. callback Wrap the response object in a function call of your choosing. diff --git a/hvpy/api_groups/official_clients/get_closest_image.py b/hvpy/api_groups/official_clients/get_closest_image.py index a056d3c..17049eb 100644 --- a/hvpy/api_groups/official_clients/get_closest_image.py +++ b/hvpy/api_groups/official_clients/get_closest_image.py @@ -15,11 +15,11 @@ class getClosestImageInputParameters(HvpyParameters): ---------- {Shared} date - Date and time of the image. + Datetime of the image. sourceId Unique image datasource identifier. callback - Optionally, wrap the response object in a function call of your choosing. + Wrap the response object in a function call of your choosing. Default is `None` (no wrapping), optional. References diff --git a/hvpy/api_groups/official_clients/get_data_sources.py b/hvpy/api_groups/official_clients/get_data_sources.py index 2940944..c0b92b1 100644 --- a/hvpy/api_groups/official_clients/get_data_sources.py +++ b/hvpy/api_groups/official_clients/get_data_sources.py @@ -14,10 +14,10 @@ class getDataSourcesInputParameters(HvpyParameters): Output the hierarchical list of available datasources in a format that is compatible with the JHelioviewer desktop client. Default is `False`, optional. enable - Optionally, comma-separated list of observatories to enable. + Comma-separated list of observatories to enable. Default is `None` (all observatories are enabled), optional. callback - Optionally, wrap the response object in a function call of your choosing. + Wrap the response object in a function call of your choosing. Default is `None` (no wrapping), optional. References diff --git a/hvpy/api_groups/screenshots/get_tile.py b/hvpy/api_groups/screenshots/get_tile.py index 964b06a..da61dc7 100644 --- a/hvpy/api_groups/screenshots/get_tile.py +++ b/hvpy/api_groups/screenshots/get_tile.py @@ -25,35 +25,28 @@ class getTileInputParameters(HvpyParameters): difference Specify image type difference. - ``0`` - Display regular image - - ``1`` - Running difference image - - ``2`` - Base difference image + * ``0`` - Display regular image + * ``1`` - Running difference image + * ``2`` - Base difference image Default is `None`, optional. - diffCount - Used to display Running difference image. Work with “diffTime” parameter and set amount of time to use in time period. + Used to display Running difference image. + Work with ``diffTime`` parameter and set amount of time to use in time period. Default is `None`, optional. diffTime Select Running difference time period: - ``1`` - Minutes - - ``2`` - Hours - - ``3`` - Days - - ``4`` - Weeks - - ``5`` - Month - - ``6`` - Years + * ``1`` - Minutes + * ``2`` - Hours + * ``3`` - Days + * ``4`` - Weeks + * ``5`` - Month + * ``6`` - Years Default is `None`, optional. baseDiffTime - Date/Time string for Base difference images. + Datetime for base difference images. Default is `None`, optional. References diff --git a/pyproject.toml b/pyproject.toml index 02d9d97..14684ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,6 @@ exclude = ''' | buck-out | build | dist - | docs | .history )/ )