Skip to content

Alpha - Dodo

Compare
Choose a tag to compare
@jsoconno jsoconno released this 25 Jan 14:11
· 81 commits to main since this release

This release was primarily aimed as making some improvements to the way that the core code is managed. There are no changes to the end-user experience in this release, other that possibly making it clearer what inputs and outputs can be expected for functions and classes used in the core.

Internal features were added to manage the state of the Graph to enable new features in the future, such as Cluster-to-Cluster connections where a Cluster does not have a Node, but does have a child Cluster with a node. For example:

from architectures.com import *

with Graph():
    with Cluster() as cluster_a:
        with Cluster() as cluster_b:
            node_a = Node()
    with Cluster() as cluster_c:
        node_b = Node()

    Edge(cluster_a, cluster_c)

Here is an inventory of some of the main changes made as part of this release:

  • Better installation instructions were added to the README
  • Classes were updated to use the built-in id() function for assigning a unique identifier to objects rather than the uuid library and function in the class
  • Several references to "node" were changed to "obj" to make it more clear that Clusters, Groups, or other objects might be accepted
  • Type hinting was added to all functions and classes along with some updates to docstrings
  • An update_state function was added that recursively loops through the Graph's state mapping and appends new objects as they are created
  • A search_state function was added to recursively search the state and return the value of a given key
  • The get_node_obj and get_cluster_obj functions were updated to work with the new state paradigm
  • The Edge object was updated so the more of the code logic is wrapped in the get_node_obj and get_cluster_obj functions
  • Added some tests for Edge-to-Cluster and Edge-to-Group connections