Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create docs extension for the flexible retrieval of software library documentation, based on the evaluation of strings representing qualified names of library modules & components #13

Open
Mega-JC opened this issue Oct 22, 2022 · 0 comments
Assignees
Labels
Difficulty.Hard This will be hard to do for most contributors Priority.High This is something we'll be giving our full attention to Type.Feature-Request New features to be added
Milestone

Comments

@Mega-JC
Copy link
Member

Mega-JC commented Oct 22, 2022

This is meant to be a convenient way to retrieve documentation for relevant Python software libraries based on qualified names.

There are two possible approaches for realizing this:

1. Interpret and export docstrings from libraries

Since many Python libraries use docstrings and some Sphinx configuration to generate documentation, we could grab those docstrings directly, and map their library component names to them in a json file. This could be done in a docker container that exposes a tiny API for retrieving that docstring documentation.

Pros

  • Full control over which Python libraries to offer docstrings for.

Cons

  • Docstrings might not be fully readable (due to missing preprocessing steps by Sphinx).
  • Docstrings would be non-uniform, due to varying reST style choices.
  • Docstrings may be incomplete or non-existent on some public library components (though unlikely to be a problem).

2. Scrape DevDocs

DevDocs hosts uniformly presented documentation for the most important FOSS software technologies, using web scraping. The uniformity makes it particularly suitable for scraping using BeautifulSoup. Scraping might also be possible locally in a Docker container, since the project is FOSS itself.

Pros

  • Preparsed documentation.
  • A lot of uniformity between Sphinx Python projects on DevDocs in terms of how they're presented.

Cons

  • Zero control over what is made available to scrape.
  • No way to include ecosystem-libraries (e.g. pygame_gui)

The current docs_pre edition of this extension imports modules at runtime to support showing their docstrings, but this is inefficient and has some low hanging fruit for optimization.

@Mega-JC Mega-JC self-assigned this Oct 22, 2022
@Mega-JC Mega-JC added this to the 1.0 milestone Oct 22, 2022
@Mega-JC Mega-JC changed the title Create docs extension for the flexible retrieval of software library documentation, based on the evaluation of strings representing qualified names of library structures Create docs extension for the flexible retrieval of software library documentation, based on the evaluation of strings representing qualified names of library modules & structures Oct 22, 2022
@Mega-JC Mega-JC changed the title Create docs extension for the flexible retrieval of software library documentation, based on the evaluation of strings representing qualified names of library modules & structures Create docs extension for the flexible retrieval of software library documentation, based on the evaluation of strings representing qualified names of library modules & components Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty.Hard This will be hard to do for most contributors Priority.High This is something we'll be giving our full attention to Type.Feature-Request New features to be added
Development

No branches or pull requests

1 participant