Skip to content

Empty 'Attributes' section in docs page #4138

Closed

Description

@weiji14

Description of the problem

The 'Attributes' sections for some classes are empty, e.g. for pygmt.params.Box

Image

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:

{% 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

Activity

  1. added
    bug
    documentation
    help wanted
    on Oct 2, 2025
  2. added this to the 0.18.0 milestone on Oct 2, 2025
  3. removed
    help wanted
    on Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions