papyri 0.0.8 Pypi GitHub

To remove in the future –– papyri

Papyri – in progress

Here are a couple of documents, or docstrings that are of interest to see how papyri works, generally because they crashed papyri at some point during the development, and/or do not work yet. You likely want to see the readme.md file for now which is kept up do date more often.

Installation

pip install papyri

dev install

You may need to get a modified version of numpydoc depending on the stage of development.

git clone https://github.com/jupyter/papyri cd papyri pip install -e .

Build the TreeSitter rst parser:

Some functionality require tree_sitter_rst , see run papyri build-parser , and CI config file on how to build the tree-sitter shared object locally:

git clone https://github.com/stsewd/tree-sitter-rst
papyri build-parser

Usage

There are mostly 3 stages to run papyri, so far you need to do the 3 steps/roles on your local machine, but it will not be necessary once papyri is production ready. The three stages are:

To generate IRD files:

$ papyri gen <config file>

You can look in the examples folder to see some of these config files. Those will put IRD files in ~/.papyri/data there is no upload mechanism yet.

To install those files:

$ papyri ingest ~/.papyri/data/library_version/

And finally to view the docs, either follow your IED documentation or use some of the built-in renderer:

$ papyri render

$ papyri browse ....

$ papyri serve

Of Interest

Here are a couple of function that are of interest to explore what papyri can do and render.

dask.delayed

one of the parameter of the docstring has multiple paragraphs.

IPython.core.display.Video.__init__

Block Verbatim in params ?

IPython.core.interactiveshell.InteractiveShell.complete

contain a DefListItem

matplotlib.transforms.Bbox

parsing of example is completely incorrect.

matplotlib.axes._axes.Axes.text

misparse example as well.

IPython.core.completer.Completion

item list

matplotlib.figure.Figure.add_subplot

custom double dot example

matplotlib.colors

unnumbered list with indent.

matplotlib.colors

contain a reference via .. _palettable: value and autolink paletable_ .

numpy.npv

hase warning sections.

scipy.signal.ltisys.bode

contains multiple figure

scipy.signal.barthann

multiple figures

numpy.where

The Parameter section have a pair of parameter separated with the coma in the name field; and those parameter should be properly detected as local references in the rest of the docstrings.

numpy.polynomial.laguerre.lagfit

should have plenty of math items

numpy.polyfit

The see also section links to scipy.interpolate.UnivariateSpline which will not resolve (yet) as the fully qualified name is scipy.interpolate.fitpack2.UnivariateSpline ; this should be fixed at some points via aliases; in the intro one link as a name <value> syntax which is also not yet recognized.

scipy.signal.filter_design.zpk2sos :

multi blocks in enumerated list

scipy.signal.filter_design.zpk2sos :

blockquote insted of enumerate list (to fix upstream)

scipy.optimize._lsq.trf :

has lineblocks, which I belive is wrong.

scipy.signal.exponential :

multiple figures

numpy.einsum :

one of the longest numpy docstring/document, or at least one of the longest to render, with scipy.signal.windows.windows.dpss , scipy.optimize._minimize.minimize and scipy.optimize._basinhopping.basinhopping

Changes in behavior

Papyri parsing might be a bit different from docutils/sphinx parsing. As docutils try to keep backward compatibility for historical reason, we may be a bit stricter on some of the syntax you use to. This allows us to catch more errors. Feel free to report differences in parsing, here we document the one we do on purpose.

Directive must not have spaces before double colon:

.. directive :: will be seen as a comment.
        and thus this will not appear in final output.

.. directive:: is the proper way to write block directive.
        it will be properly interpreted.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /papyri/__init__.py#0
type: <class 'module'>
Commit: