Skip to content

Lint and test examples in examples and docstrings automatically #27

@leandro-lucarella-frequenz

Description

Projects normally have examples in the examples/ directory and in docstring documentation. The ones in examples/ are currently being linted, but never ran. The ones in docstrings are never linted nor ran. All of this very subject to break when there are updates.

In docstrings there are mainly 2 types of examples in documentation:

  • doctest: Usually any block starting with >>> in a docstring
  • Markdown examples. Could be in:
    • docstrings (Python files)
    • Other high-level documentation in docs/.

We mainly use markdown examples, so we should focus on that first.

There are several tools to actually test those examples to make sure they work, so we should use one:

Metadata

Metadata

Assignees

Labels

part:ciAffects the GitHub workflow and other parts for running CIpart:testsAffects the unit, integration and performance (benchmarks) testspriority:highAddress this as soon as possible

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions