Skip to main content

dooble

https://img.shields.io/pypi/v/dooble.svg https://img.shields.io/travis/MainRo/dooble.svg

Dooble is a marble diagram generator from text. It eases the documentation of ReactiveX standard and custom operators, in a consitent way.

Installation

pip install dooble

A sphinx plugin is also available:

pip install sphinxcontrib-dooble

Usage

The text grammar allows to easilly define observables and operators. The map operator with an input observable and an output observable is described the following way:

--1--2--3--4-->
[ map(i: i*2) ]
--2--4--6--8-->

save this text in a file named map.txt and then render it to an image:

dooble --input map.txt --output map.png

The generated image looks like this:

examples/map.png

Higher order observables can also be documented easilly:

--a-b-c---d-e-f-->
[     window     ]
--+-------+------>
          +d-e-f-|
  +a-b-c-|

save this text in a file named window.txt and then render it to an image:

dooble --input window.txt --output window.png

The generated image looks like this:

examples/window.png

For operators that take several observables as input, it is possible to label them:

--1--2--3--*
         a-7-8-|
[   catch(a)   ]
--1--2--3--7-8-|

save this text in a file named catch.txt and then render it to an image:

dooble --input catch.txt --output catch.png

The generated image looks like this:

examples/catch.png

Full grammar

  • Each text line represents either an observable, or an operator

  • Observables are defined with dash lines

  • If an Observable starts with a letter, this letter is considered as a label

  • Each character represent a time span

  • Character | indicates an observable completion

  • Character * indicates an observable error

  • Character > indicates an observable continutation

  • The + character is used to define anchors of higher order observables

  • operators start with a [ and end with a ]

The full grammar is the following one (in tatsu pseudo ebnf syntax):

@@grammar::dooble

start = { layer } $ ;

layer
=
| obs:observable
| op:operator
;

observable = {skipspan}* [prefix] {lifetime}* completion ;
operator = '[' description ']' ;

prefix = '+' | label ;

label = /[a-z]/ ;

lifetime
=
| ts:timespan
| item:item
;

completion = /[>|*]/ ;

skipspan = ' ' ;
timespan = '-' ;
item = /[a-zA-Z0-9+.,]+/ ;

description = /[a-zA-Z0-9,:+*() <>_]+/ ;

History

0.1.0 (2019-02-08)

  • First release on PyPI.

Metadata

Release files for dooble 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dooble 1.0.0
File Size Uploaded Provenance
dooble-1.0.0.tar.gz 13.3 kB Without provenance Details

Release files / dooble-1.0.0.tar.gz

Download URL dooble-1.0.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e02ae9236da43e3d8c3018860a0e83bf09f48711c24d49178f0f5ebf0952bc2b
BLAKE2b-256 checksum
How to use checksums
0cba7e20d3639a223c9d3dee45f7b6432f790be59c3cf52a31a8837b8bd68a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Security for dooble 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page