From 66395f8392853f20fe9b217563c9f977757aa093 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 7 Mar 2023 22:17:34 +0800 Subject: [PATCH 1/3] Update the documentation template to show class attributes --- doc/_templates/autosummary/class.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/_templates/autosummary/class.rst b/doc/_templates/autosummary/class.rst index fb3aecc7d1b..6b7175e4f00 100644 --- a/doc/_templates/autosummary/class.rst +++ b/doc/_templates/autosummary/class.rst @@ -4,6 +4,15 @@ .. autoclass:: {{ objname }} +{% if attributes %} +.. rubic:: Attributes + +{% for item in attributes %} +.. autoproperty:: + {{ objname }}.{{ item }} +{% endfor %} +{% endif %} + {% if methods != ["__init__"] %} .. rubric:: Methods Summary From 047d23380cc8e143dc9d689180d3b9f74bba120b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 8 Mar 2023 07:34:36 +0800 Subject: [PATCH 2/3] Remove attribute list from GMTDataArrayAccessor --- pygmt/accessors.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pygmt/accessors.py b/pygmt/accessors.py index 4fbf10435cb..a21c85ae3b8 100644 --- a/pygmt/accessors.py +++ b/pygmt/accessors.py @@ -17,15 +17,6 @@ class GMTDataArrayAccessor: properties about grids, which are important for PyGMT to correctly process and plot the grids. - Attributes - ---------- - - registration : int - Registration type of the grid, either 0 (Gridline) or 1 (Pixel). - gtype : int - Coordinate system type of the grid, either 0 (Cartesian) or 1 - (Geographic). - Notes ----- From b4c5e1a19c27a6c020de37a9bc9bb9b694812c52 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 8 Mar 2023 07:37:37 +0800 Subject: [PATCH 3/3] typo --- doc/_templates/autosummary/class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/_templates/autosummary/class.rst b/doc/_templates/autosummary/class.rst index 6b7175e4f00..db5d1e29b45 100644 --- a/doc/_templates/autosummary/class.rst +++ b/doc/_templates/autosummary/class.rst @@ -5,7 +5,7 @@ .. autoclass:: {{ objname }} {% if attributes %} -.. rubic:: Attributes +.. rubric:: Attributes {% for item in attributes %} .. autoproperty::