Skip to main content

Internal utilities for projects following git-pull python package spec

Project description

gp-libs · Python Package License Code Coverage

You probably don't need these. These are internal helpers that are getting dogfooded on projects following git-pull's python package patterns, e.g. any python packages in cihai, vcs-python, or tmux-python. They're unstable (APIs can change without warning). When stabilized they can be broken off into separate packages, merged upstream, etc.

doctest helpers (for docutils)

Two parts:

  1. doctest module: Same specification as doctest, but can parse reStructuredText and markdown
  2. pytest plugin: Collects pytest for reStructuredText and markdown files

doctest module

...

This extends standard library doctest to support anything docutils can parse. It can parse reStructuredText (.rst) and markdown (.md).

It supports two barebones directives:

  • docutils' doctest_block

    >>> 2 + 2
    4
    
  • .. doctest:: directive

    reStructuredText:

    .. doctest::
    
       >>> 2 + 2
       4
    

    Markdown (requires myst-parser):

    ```{doctest}
    >>> 2 + 2
    4
    ```
    

pytest plugin

...

This plugin integrates with the above module.

$ pytest docs/

Like the above module, it supports docutils' own doctest_block and a basic .. doctest:: directive.

sphinx plugins

Plain-text issue linker

We need to parse plain text, e.g. #99999, to point to the project tracker at https://github.com/git-pull/gp-libs/issues/99999. This way the markdown looks good anywhere you render it, including GitHub and GitLab.

Table of contents for autodoc

sphinx.ext.autodoc doesn't link objects in the table of contents. So we need a plugin to help.

Install

$ pip install --user gp-libs

Developmental releases

You can test the unpublished version of g before its released.

  • pip:

    $ pip install --user --upgrade --pre gp-libs
    

More information

Docs Build Status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gp-libs-0.0.1a1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

gp_libs-0.0.1a1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page