-
Notifications
You must be signed in to change notification settings - Fork 5
Comprehensive graph analysis & visualization for nodely environments #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your interest in contributing to Nodely!
On a first review I think this demonstrates a lot of thoughtful work and a good understanding of our under documented data model.
I've left a few specific comments but on reading through more of the PR here's some changes I'd like to see generally applied to proceed:
- When interacting with the data model of Nodely nodes, please only use functions from the
nodely.datanamespace. This space is not comprehensive, nor sufficient for the use cases you've demonstrated with this work, so expanding what's provided there is reasonable scope for this feature. Let's consider keywords with:nodely.dataa code smell for the analysis namespaces. - Toward the end in analysis we see a lot of creation of an anonymous function closing over arguments, and, then immediate invocation of the anonymous function. I think this is to establish some recursive calls? Can these be reformulated to a tail call optimizable structure? If we can TCO do we still need recursion depth constants?
- The same few pieces of information are extracted in the headers of these functions. These seem like good candidates for destructuring.
I want to keep the feedback sizes digestible, so, let's focus on these changes at first and then we will evaluate further. I think this is a strong basis for us to include these features in Nodely!
cd6e3eb to
8af9b8c
Compare
|
@aredington I addressed a bunch of your comments. Hope that gets it closer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor requests, but this is looking pretty good!
To set expectations, @sovelten is out and right now we're planning to hold on a merge until she can take a look, but overall this is some great work. Thanks for taking the time with it!
|
any updates on this? |
Overview
This PR introduces powerful graph analysis and visualization capabilities for Nodely environments, enabling developers to understand complex data flow structures through both statistical analysis and visual representations.
Key Features
Graph Analysis & Statistics
>and,>or, and>condbranch structures{:total-nodes 23, :total-edges 18 :node-types {:value 9, :leaf 8, :branch 4, :sequence 2} :dependency-counts {:user-age 3, :user-profile 2, :threshold 1, ...} :max-dependencies 4}DOT Graph Visualization
condition,truthy,falsey,cond-expr, etc.)Example Visualization
Example of a complex nodely environment with branches, conditions, and embedded nodes visualized as a directed graph.
Usage Example
API Modes:
(analyze-nodely-env env)- auto-detects source file using reflection(analyze-nodely-env env :disabled)- skips function name extraction entirelyArchitecture
Analysis Pipeline
>and,>or,>condpatterns in branch structuresVisualization
DOT Generation → Create valid Graphviz format with semantic edge labels and professional styling
Advanced Capabilities
>cond,>and,>orstructures with nested branch supportBenefits
Breaking Changes
None - this is purely additive functionality with zero external dependencies.
Key Functions:
graph/extract-graph-structure- Main analysis entry pointviz/analyze-nodely-env- Analysis + visualization with flexible API modesviz/auto-detect-source-file- Reflection-based source file detection