TheAlgorithms / TheAlgorithms/Python

Suggestion: adopt a documentation format for docstring

Open
#6,252 12 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting reviews
Dominant language
Python
Stars
225k
Forks
51.1k
Avg merge
1d 23h
Merged PRs (30d)
156

Description

As the number of algorithms are increasing, it might make sense to adopt a single documentation format for docstrings. Following are existing currently:

There are editor extensions which help in generating the docstring based on the chosen format like:

The doctest will come under the examples section for each of the above format.

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 comparing the Google Docstring, Numpydoc, and Sphinx formats linked in the issue, including how each handles doctest examples. Review the discussion to determine whether the project has chosen a format. Done means an agreed documentation format and a defined way to apply it across algorithm docstrings.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.