-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Description of the problem
The 'Attributes' sections for some classes are empty, e.g. for pygmt.params.Box

Context from previous issues:
Originally posted by @weiji14 in #4131 (comment)
If possible it would be nice to remove the "Attribute" section, as there is not entry.
The Attributes section was added in #2402, and it seems to count
@property
methods that start with an underscore. Will need to update the code here:pygmt/doc/_templates/autosummary/class.rst
Lines 7 to 14 in 35f06da
{% if attributes %} .. rubric:: Attributes {% for item in attributes %} .. autoproperty:: {{ objname }}.{{ item }} {% endfor %} {% endif %} If you change that L7 from
{% if attributes %}
to{% if '_aliases' not in attributes %}
, the Attributes section should be hidden for these Param classes.
Originally posted by @weiji14 in #4131 (comment)
Actually, we might need a better solution, because other class pages now show an empty 'Attributes' section 😅 E.g. in these places:
Will need someone with some Jinja templating know-how to fix this!
System information
PyGMT information:
version: v0.17.0.dev118+g947749e4b
System information:
python: 3.11.13 | packaged by conda-forge | (main, Jun 4 2025, 14:48:23) [GCC 13.3.0]
executable: /home/runner/micromamba/envs/pygmt/bin/python
machine: Linux-6.11.0-1018-azure-x86_64-with-glibc2.39
Dependency information:
numpy: 1.26.4
pandas: 2.2.3
xarray: 2023.10.1
packaging: 25.0
contextily: 1.6.2
geopandas: 1.1.1
IPython: 9.6.0
pyarrow: 21.0.0
rioxarray: 0.18.1
gdal: 3.10.3
ghostscript: 10.06.0
GMT library information:
version: 6.6.0
padding: 2
share dir: /home/runner/micromamba/envs/pygmt/share/gmt
plugin dir: /home/runner/micromamba/envs/pygmt/lib/gmt/plugins
library path: /home/runner/micromamba/envs/pygmt/lib/libgmt.so
cores: 4
grid layout: rows
image layout:
binary version: 6.6.0