pdoc3 / pdoc3/pdoc

Hyperlinks to external official documentation

Open
#85 8 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue help wanted 🤷
Dominant language
Python
Stars
1.2k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

When using -c show_types_annotations (found in #6), hyperlinks to external references should be added not only on the method declaration but also in the doc below (that is my understanding from https://pdoc3.github.io/pdoc/doc/pdoc/#linking-to-other-identifiers).

Actual Behavior and steps to reproduce

Example:

def example_method(a: datetime) -> int:
    """

    Parameters
    ----------
    a : `datetime.datetime`
        A date.

    Returns
    -------
    `int`
        The day.
    """

    return a.day

While the page renders as follows:
Screen Shot 2019-07-25 at 16 35 08
if using --http. When using --html, type hints are even completely omitted :
Screen Shot 2019-07-25 at 16 36 25

I guess the proper behavior would be to have the hyperlinks both in the method declaration in the first line and in the text below.
Moreover, it would likely be ideal to link to the official documentation, such as this for datetime

Additional info
  • pdoc version: 0.6.3

Contributor guide

Open the contributing guide

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

Start by reproducing the example with pdoc 0.6.3 using both --http and --html, and trace the rendering of type annotations and docstring parameter or return types. Done means external references are linked in both the method declaration and the documentation text, with the reported --html omission addressed; the issue also suggests official Python documentation links for types such as datetime.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.