readthedocs / readthedocs/sphinx-autoapi

Parse "non constant" attribute values

Open
#296 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Language: Python
Dominant language
Python
Stars
494
Forks
147
Avg merge
9m
Merged PRs (30d)
1

Description

I'm building documentation for my python package and some of my classes have class-level attributes. These can sometimes take the value of dictionaries, or python enums.

I was trying to get these values to show up in the documentation by messing with the template, but I learned that the value of these attributes is None because they're not constant.

Is is possible to support the automatic parsing of non-constant values? Right now, I can document the values of these attributes in the docstring and mess around with the attribute template but that leads to duplication so I'm looking for a more maintainable solution.

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file, test, or entry point. Start by tracing how class-level attribute values become available to the attribute template, then compare handling of constants with dictionaries and Python enums. Done means non-constant values can be represented in generated documentation without requiring duplicated docstrings.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.