Project

General

Profile

Actions

Support #13418

open

Python SDK must have docstrings for all public interfaces

Added by Tom Morris almost 6 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
SDKs
Target version:
Due date:
Story points:
-

Description

Per PEP-8, as referenced in our coding standards, we should "Write docstrings for all public modules, functions, classes, and methods."

Although this should already be covered as part of our peer review process, perhaps we should also consider using a static checker as part of the CI build process to automate detection of oversights.

We should do a full review of the Python SDK documentation as presented on doc.arvados.org.

A few other problems: epydoc (which we currently use, produces javadoc-like documentation pages) is poor for both learning and reference. Also, existing documentation strings are formatted inconsistently (for example, using ReStructured text, which isn't supported by epydoc).

Dynamically generated methods (everything produced by the discovery document) are not included in the Python SDK documentation. We should figure out a way to ensure that they are included.

Proposed solutions:

  • Review presentation of API on doc.arvados.org and fill in gaps in docstrings needed for learning and reference
  • Generate method stubs (with documentation) from the discovery document so they get included in online documentation
  • Dump epydoc and use another documentation generator, such as sphinx.
  • Add a Python code linter to run-tests, such as flake8, to check for missing documentation bad formatting. (Consider using 'tox' to orchestrate testing and checking.) Also consider adding type annotations and checking with mypy.

Related issues

Related to Arvados - Feature #5214: [SDKs] Use sphinx to render for Python SDK docsRejectedActions
Related to Arvados - Feature #6865: [Documentation] Higher Level Python SDK Reference PageDuplicate08/03/2015Actions
Related to Arvados - Idea #15015: replace epydocDuplicate01/11/2023Actions
Related to Arvados - Bug #16833: [build] replace python-epydoc in our build environmentResolvedWard Vandewege09/16/2020Actions
Related to Arvados Epics - Idea #18800: Update Python SDK documentationIn ProgressActions
Actions #1

Updated by Peter Amstutz almost 6 years ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz almost 6 years ago

  • Related to Feature #5214: [SDKs] Use sphinx to render for Python SDK docs added
Actions #3

Updated by Peter Amstutz almost 6 years ago

Currently leaning towards Doxygen as our alternative for documentation generation. It is very capable and customizable.

Actions #4

Updated by Peter Amstutz almost 6 years ago

  • Related to Feature #6865: [Documentation] Higher Level Python SDK Reference Page added
Actions #5

Updated by Tom Morris about 5 years ago

Actions #6

Updated by Peter Amstutz almost 3 years ago

  • Target version deleted (To Be Groomed)
Actions #7

Updated by Peter Amstutz over 1 year ago

  • Target version set to 2022-11-23 sprint
Actions #8

Updated by Peter Amstutz over 1 year ago

  • Category set to SDKs
Actions #9

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-11-23 sprint to 2022-12-07 Sprint
Actions #10

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-12-07 Sprint to 2022-12-21 Sprint
Actions #11

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-12-21 Sprint to 2023-01-18 sprint
Actions #12

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2023-01-18 sprint to 2023-02-01 sprint
Actions #13

Updated by Peter Amstutz over 1 year ago

  • Tracker changed from Bug to Feature
Actions #14

Updated by Peter Amstutz over 1 year ago

  • Tracker changed from Feature to Support
Actions #15

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2023-02-01 sprint to Future
Actions #16

Updated by Brett Smith over 1 year ago

IMO we should merge this ticket with #18800, or else close it as being redundant. I don't think this ticket covers anything that isn't already covered better there, except for suggesting switching to a different documentation system, which was done in #16833.

Actions #17

Updated by Brett Smith over 1 year ago

  • Related to Idea #18800: Update Python SDK documentation added
  • Related to Bug #16833: [build] replace python-epydoc in our build environment added
Actions

Also available in: Atom PDF