Skip to content

Commit

Permalink
Use graphviz instead of UML in docs [fix #160]
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Sep 15, 2016
1 parent f44657d commit fe52a60
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
9 changes: 8 additions & 1 deletion Resources/doc/conf.py
Expand Up @@ -10,11 +10,18 @@

extensions = [
'sensio.sphinx.configurationblock',
'sphinxcontrib.plantuml'
'sphinx.ext.graphviz',
]

master_doc = 'index'
exclude_patterns = ['venv']

html_show_copyright = False
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

graphviz_output_format = 'png'
graphviz_dot_args = [
'-Gbgcolor=transparent',
'-Grankdir=LR',
]
Binary file not shown.
Binary file removed Resources/doc/images/payment-state-transitions.png
Binary file not shown.
73 changes: 33 additions & 40 deletions Resources/doc/model.rst
Expand Up @@ -19,17 +19,14 @@ information.
Below you find the different states that a ``PaymentInstruction`` can go through:

.. uml ::
:alt: PaymentInstruction State Flow
.. digraph:: PaymentInstruction_State_Flow

left to right direction
[*] --> New
New --> Valid
New --> Invalid
Valid --> Closed
Invalid --> [*]
Closed --> [*]
"Start" -> "New";
"New" -> "Valid";
"New" -> "Invalid";
"Valid" -> "Closed";
"Invalid" -> "End";
"Closed" -> "End";

Payment
-------
Expand All @@ -42,29 +39,28 @@ deposited before an order ships, and the rest afterwards.

Below, you find the different states that a ``Payment`` can go through:

.. uml ::
:alt: Payment State Flow
.. digraph:: Payment_State_Flow

left to right direction
resolution="60";

[*] --> New
"Start" -> "New";

New --> Canceled
New --> Approving
"New" -> "Canceled"
"New" -> "Approving"

Approving --> Approved
Approving --> Failed
"Approving" -> "Approved"
"Approving" -> "Failed"

Approved --> Depositing
"Approved" -> "Depositing"

Depositing --> Deposited
Depositing --> Expired
Depositing --> Failed
"Depositing" -> "Deposited"
"Depositing" -> "Expired"
"Depositing" -> "Failed"

Canceled --> [*]
Failed --> [*]
Expired --> [*]
Deposited --> [*]
"Canceled" -> "End"
"Failed" -> "End"
"Expired" -> "End"
"Deposited" -> "End"

.. _model-financial-transaction:

Expand All @@ -81,21 +77,18 @@ a credit card payment, this could for example be an authorization transaction.
Below, you find the different states that a ``FinancialTransaction`` can go through:

.. uml ::
:alt: Financial Transaction State Flow
left to right direction
.. digraph:: Financial_Transaction_State_Flow

[*] --> New
"Start" -> "New"

New --> Pending
New --> Failed
New --> Success
New --> Canceled
"New" -> "Pending"
"New" -> "Failed"
"New" -> "Success"
"New" -> "Canceled"

Pending --> Failed
Pending --> Success
"Pending" -> "Failed"
"Pending" -> "Success"

Failed --> [*]
Success --> [*]
Canceled --> [*]
"Failed" -> "End"
"Success" -> "End"
"Canceled" -> "End"

0 comments on commit fe52a60

Please sign in to comment.