Metadata-Version: 2.1
Name: asciidag
Version: 0.2.0
Summary: Draw DAGs (directed acyclic graphs) as ASCII art, à la git log --graph
Home-page: https://www.github.com/sambrightman/asciidag
Author: Sam Brightman
Author-email: sam.brightman@gmail.com
License: GPL-2.0-only
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Description-Content-Type: text/x-rst
Requires-Dist: enum34 ; python_version < "3.4"
Provides-Extra: dev
Requires-Dist: docutils ; extra == 'dev'
Requires-Dist: flake8-docstrings ; extra == 'dev'
Requires-Dist: isort (<5) ; extra == 'dev'
Requires-Dist: more-itertools (<6) ; extra == 'dev'
Requires-Dist: py (>=1.4.29) ; extra == 'dev'
Requires-Dist: pydocstyle (<4) ; extra == 'dev'
Requires-Dist: pylint-venv (<2) ; extra == 'dev'
Requires-Dist: pyparsing (<3) ; extra == 'dev'
Requires-Dist: zipp (<3) ; extra == 'dev'
Requires-Dist: bump2version ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: flake8 ; ((python_version >= "2.7" and python_version < "3") or python_version >= "3.4") and extra == 'dev'
Requires-Dist: pytest-cov ; ((python_version >= "2.7" and python_version < "3") or python_version >= "3.4") and extra == 'dev'
Requires-Dist: pytest-flake8 ; ((python_version >= "2.7" and python_version < "3") or python_version >= "3.4") and extra == 'dev'
Requires-Dist: pytest-pylint (<0.15) ; ((python_version >= "2.7" and python_version < "3") or python_version >= "3.4") and extra == 'dev'
Requires-Dist: pytest (<4.7,>=2.7) ; ((python_version >= "2.7" and python_version < "3") or python_version >= "3.4") and extra == 'dev'
Requires-Dist: astroid (<2) ; (python_version < "2.7" or (python_version >= "3" and python_version < "3.4")) and extra == 'dev'
Requires-Dist: flake8 (<3.8) ; (python_version < "2.7" or (python_version >= "3" and python_version < "3.4")) and extra == 'dev'
Requires-Dist: pytest-cov (<2.6) ; (python_version < "2.7" or (python_version >= "3" and python_version < "3.4")) and extra == 'dev'
Requires-Dist: pytest-flake8 (<0.9) ; (python_version < "2.7" or (python_version >= "3" and python_version < "3.4")) and extra == 'dev'
Requires-Dist: pytest-pylint (<0.10) ; (python_version < "2.7" or (python_version >= "3" and python_version < "3.4")) and extra == 'dev'
Requires-Dist: pytest (<3) ; (python_version < "2.7" or (python_version >= "3" and python_version < "3.4")) and extra == 'dev'
Requires-Dist: pylint (<2) ; (python_version < "3.5") and extra == 'dev'
Requires-Dist: typed-ast (<1.3) ; (python_version >= "3" and python_version < "3.5") and extra == 'dev'
Requires-Dist: typing (<3.7) ; (python_version >= "3" and python_version < "3.5") and extra == 'dev'
Requires-Dist: pylint (>=2) ; (python_version >= "3.5") and extra == 'dev'

asciidag - draw DAGs as ASCII art
=================================

|build-status| |win-build-status| |coverage| |requires|

.. |build-status| image:: https://travis-ci.org/sambrightman/asciidag.svg?branch=master
    :target: https://travis-ci.org/sambrightman/asciidag
    :alt: Travis CI status

.. |win-build-status| image:: https://ci.appveyor.com/api/projects/status/t4dv71xsfcifk8mg/branch/master?svg=true
    :target: https://ci.appveyor.com/project/sambrightman/asciidag
    :alt: AppVeyor CI status

.. |coverage| image:: https://coveralls.io/repos/github/sambrightman/asciidag/badge.svg?branch=master
    :target: https://coveralls.io/github/sambrightman/asciidag?branch=master
    :alt: Coverage

.. |requires| image:: https://requires.io/github/sambrightman/asciidag/requirements.svg?branch=master
     :target: https://requires.io/github/sambrightman/asciidag/requirements/?branch=master
     :alt: Requirements Status

Overview
--------

This is a direct port of the `Git`_ log graphing code, which draws
directed acyclic commit graphs as ASCII art. It was done very
mechanically and quickly, so the code is not Pythonic. Dependencies on
`Git`_ specifics should be gone but look and feel remains.

This project is alpha quality and subject to breaking API changes.

    .. note::
       💡
       If you are thinking about doing a large refactoring, please submit
       an issue for discussion first; I consider it potentially worthwhile
       to stay close to the `Git`_ source.

Installation
------------

Available for install/upgrade from `PyPI`_:

.. code-block:: bash

    pip install -U asciidag

As usual, it is best to install your packages into a `virtual environment`_.

Usage
-----

``examples/demo.py`` is included in the installation directory and is
executable. The core functionality is:

.. code:: python

       from asciidag.graph import Graph
       from asciidag.node import Node

       graph = Graph()

       root = Node('root')
       grandpa = Node('grandpa', parents=[root])
       tips = [
           Node('child', parents=[
               Node('mom', parents=[
                   Node('grandma', parents=[
                       Node('greatgrandma', parents=[]),
                   ]),
                   grandpa,
               ]),
               Node('dad', parents=[
                   Node('bill', parents=[
                       Node('martin'),
                       Node('james'),
                       Node('paul'),
                       Node('jon'),
                   ])]),
               Node('stepdad', parents=[grandpa]),
           ]),
           Node('foo', [Node('bar')]),
       ]

       graph.show_nodes(tips)

Output:

.. image:: https://raw.githubusercontent.com/sambrightman/asciidag/master/images/demo.png
   :alt: Demonstration screenshot

:copyright: © 2016 Sam Brightman
:license: GNU General Public License v2.0, see LICENSE for more details.

.. _virtual environment: http://docs.python-guide.org/en/latest/dev/virtualenvs
.. _Git: https://git-scm.com
.. _PyPI: https://pypi.python.org


