Skip to content

Improve doctests vs. rendered documentation #448

Closed
@amotl

Description

@amotl

Hi there,

this is a small proposal I would like to make. Please upvote if you think it should be improved, or downvote if you think it should be left in the current state. Comments are also welcome.

With kind regards,
Andreas.

Introduction

At #442 (comment), we had a conversation about the src/crate/client/doctests/cursor.txt file. On the other hand, there is also docs/query.rst. Both have in common that they demonstrate how to query data from CrateDB.

Problem

Apparently, cursor.txt is being tested 1, but query.rst is not. Vice versa, query.rst is part of the documentation 2, but cursor.txt is not.

Proposal

We may think about having both: Add query.rst to the test suite, and add cursor.txt to the rendered documentation. This will both improve code quality (query.rst will be validated) and the documentation (parts of the tests in cursor.txt may be interesting to readers).

Footnotes

  1. https://github.com/crate/crate-python/blob/0.27.1/src/crate/client/tests.py#L358-L364

  2. https://crate.io/docs/python/en/latest/query.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions