twisted / pydoctor

This is pydoctor, an API documentation generator that works by static analysis.
https://pydoctor.readthedocs.io
Other
180 stars 48 forks source link

Auto-detection of intersphinx URLs #384

Open mthuurne opened 3 years ago

mthuurne commented 3 years ago

Intersphinx makes documentation much more useful, by being able to deep-link to other documentation. However, it is currently up to the maintainer to add the intersphinx URLs for all dependencies to make this work. Maybe we can simplify this.

pydoctor could auto-detect the intersphinx URL:

I dislike it when tools connect to internet services unprompted, so this feature would have to be turned on explicitly through a command line option, such as --intersphinx=auto or --intersphinx-autodetect.

Auto-detection should work together with explicitly passed intersphinx URLs, where explicit URLs always take precedence over auto-detected ones.

tristanlatr commented 2 years ago

by looking at the Project-URL metadata of installed distributions

This sounds hard. Because we need to guess the sub folder when the intersphinx objects inventory is placed, which can be a difficult.

tristanlatr commented 2 years ago

workaround for doc URL lookups from zope.interface:

tristanlatr commented 6 months ago

We could use the pypi API to get the project documentation url, from that we should try /objects.inv and /api/objects.inv. The problem lies with packages that don’t have the same python module name as their package name. Or if a package is providing several modules. I’m not quite sure how to handle these relatively common cases.