Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Docstring of phases displays phase descriptor

Open
#877 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #878 by @Minipada — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Run the provided OpenHTF example and inspect how the @htf.measures decorator changes hello_world.doc before Sphinx processes it. Trace the phase descriptor and documentation entry point, then verify that the generated documentation exposes the phase function's docstring rather than only the descriptor text.

Written by the indexing model from the issue text.

Description

I'm trying to generate a sphinx documentation of my apps but the only output I get from my phase documentation is the phase descriptor class.

This is what I'm running:

#!/usr/bin/env python
"""OPENHTF based motor control test"""
from __future__ import division, print_function
import openhtf as htf

@htf.measures(htf.Measurement('hello_world_measurement'))
def hello_world(test):
  """A hello world test phase."""
  test.logger.info('Hello World!')
  test.measurements.hello_world_measurement = 'Hello Again!'


if __name__ == '__main__':
    print(hello_world.__doc__)
    pass

This is the output:

Phase function and related information.

  Attributes:
    func: Function to be called (with TestApi as first argument).
    options: PhaseOptions instance.
    plugs: List of PhasePlug instances.
    measurements: List of Measurement objects.
    extra_kwargs: Keyword arguments that will be passed to the function.
    code_info: Info about the source code of func.

I guess something is broken, do you know what it could be?

Dominant language
Python
Stars
723
Forks
239
Avg merge
3h 17m
Merged PRs (30d)
5

Getting set up

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.

More from google/openhtf

All issues in google/openhtf

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.