Eunice is based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. Eunice's approach isn't limited to direct dependencies, but includes indirect dependencies as well.
With Eunice you can define an intended structure/architecture, it can then show you dependencies that don't match, and then you can further refine the definition or update your code to match it.
try it out:
The following file types are outputted:
- HTML - interactive render, where the scope can be set to sub-items (e.g. sub-directories, files, functions etc), and dependencies can be listed (eunice.html)
- SVG - render scoped to the root directory (eunice.svg)
- YAML - dependency and structure of the source code (eunice.yaml)
For more information see processing and options.
Structure / architecture
Fundamental to Eunice is the act of defining stacks. When it's intended that an item is to be dependent upon another, the first item is placed above the second item in a stack. When items are intended to be independent of each other, they can be placed at the same level in a stack.
In some programming languages there are implied stacks, such as the order of functions in a file, or the order of files in a project.
Scopes / groups
Stacks can be defined in Eunice with different sized scopes and across boundaries, from individual functions, classes and files; to multiple, large codebases in different languages, frameworks and runtimes.
Eunice supports nested groups of items, each group can have its own stack. When Eunice measures whether dependencies match the intended structure, the results for nested groups are summarized (see renderer repository).
Programming languages often include ways of grouping code, such as the directories in a file system, namespaces, classes or nested functions. Groups such as these can be inferred and automatically represented in Eunice. Multiple repositories and packages can also be represented as groups and analyzed as a whole.
Dependency Count Arrows
Instead of rendering dependencies as lines between items each dependency is counted into the following categories:
- matches stack (green down arrow)
- does not match stack (red up arrow)
- is not independent (red horizontal arrow)
Dependency counts appear for both sides of the dependency, the dependent item and the item depended upon. When there are multiple counts a summary of all counts is rendered at the bottom.
Dependencies within an item are also summarized and rendered inside the item box, below the identifer text.
Items and sub-item can also be opened. Opening an item will show its contents and breadcrumb links for where it is in the hierarchy.
root > grandparent