<commit_before>#!/usr/bin/python

# The purpose of this script is to create a graph that shows the processes
# involved for the user.

from graphviz import Digraph

# Node properties
font = "verdana"

envNodeProps = {"shape": "egg", "fontname": font, "fillcolor": "forestgreen",
                "margin": "0.1, 0.1", "style": "filled"}
machNodeProps = {"fontname": font, "fillcolor": "skyblue", "style": "filled"}
graphProps = {"fontname": font}

# Create user graph.
userGraphName = "User"
userGraphColour = "lightpink1"
userGraph = Digraph(name="user")
userGraph.body.append("label = \"{}\"".format(userGraphName))
userGraph.body.append("style = filled")
userGraph.body.append("fillcolor = {}".format(userGraphColour))

# Define user graph nodes and edges.
outputEnv = "Output Environment\n(at atlas.hashicorp.com)"
userMach = "User's Virtual\nMachine"
userGraph.node(outputEnv, **envNodeProps)
userGraph.node(userMach, **machNodeProps)
userGraph.edge(outputEnv, userMach, "Manager and\nProvider Creates",
               {"color": "blue", "fontname": font})

# Create developer graph.
devGraphName = "Developer"
devGraph = Digraph(name="dev")

# Define developer graph nodes and edges.
inputEnv = "Input\nEnvironment"
devMach = "Developer's\nVirtual Machine"
devGraph.node(outputEnv, **envNodeProps)
devGraph.node(inputEnv, **envNodeProps)
devGraph.node(devMach, **machNodeProps)
devGraph.edge(inputEnv, devMach, "Manager and\nProvider Creates",
              {"color": "blue", "fontname": font, "rank": "same"})
devGraph.edge(devMach, devMach, "Provisioner\nProvisions",
              {"color": "red", "fontname": font})
devGraph.edge(devMach, outputEnv, "Manager\nPackages",
              {"color": "purple", "fontname": font})

# Combine and print graphs.
masterGraph = Digraph(name="user-dev-graph", graph_attr=graphProps)<commit_msg>DOC-026: Improve graph labels.<commit_after>#!/usr/bin/python

# The purpose of this script is to create a graph that shows the processes
# involved for the user.

from graphviz import Digraph

# Node properties
font = "verdana"

envNodeProps = {"shape": "egg", "fontname": font, "fillcolor": "forestgreen",
                "margin": "0.1, 0.1", "style": "filled"}
machNodeProps = {"fontname": font, "fillcolor": "skyblue", "style": "filled"}
graphProps = {"fontname": font}

# Edge properties
vagrant = "purple"
vboxVagrant = "blue"
ansible = "red"

# Create user graph.
userGraphName = "User"
userGraphColour = "lightpink1"
userGraph = Digraph(name="user")
userGraph.body.append("label = \"{}\"".format(userGraphName))
userGraph.body.append("style = filled")
userGraph.body.append("fillcolor = {}".format(userGraphColour))

# Define user graph nodes and edges.
outputEnv = "Output Environment\n(at atlas.hashicorp.com)"
userMach = "User's Virtual\nMachine"
userGraph.node(outputEnv, **envNodeProps)
userGraph.node(userMach, **machNodeProps)
userGraph.edge(outputEnv, userMach, "Vagrant and\nVirtualBox Creates",
               {"color": "blue", "fontname": font})

# Create developer graph.
devGraphName = "Developer"
devGraph = Digraph(name="dev")

# Define developer graph nodes and edges.
inputEnv = "Input\nEnvironment"
devMach = "Developer's\nVirtual Machine"
devGraph.node(outputEnv, **envNodeProps)
devGraph.node(inputEnv, **envNodeProps)
devGraph.node(devMach, **machNodeProps)
devGraph.edge(inputEnv, devMach, "Vagrant and\nVirtualBox Creates",
              {"color": vboxVagrant, "fontname": font, "rank": "same"})
devGraph.edge(devMach, devMach, "Ansible\nProvisions",
              {"color": ansible, "fontname": font})
devGraph.edge(devMach, outputEnv, "Vagrant\nPackages",
              {"color": vagrant, "fontname": font})

# Combine and print graphs.
masterGraph = Digraph(name="user-dev-graph", graph_attr=graphProps)
{'fraction_non_alphanumeric': 0.1532556908417152, 'fraction_numerical': 0.003440974060349391, 'mean_word_length': 5.225700164744646, 'pattern_counts': {'":': 36, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6232963', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1217, 'n_words': 302}