feat: Add hot reloading command to the CLI#200
Closed
johnchildren wants to merge 1 commit into
Closed
Conversation
philipp-seitz
requested changes
Sep 17, 2025
|
|
||
| def _watch_graph(graph_location: str) -> None: | ||
| graph = load_graph(graph_location) | ||
| visualize_graph(graph.get_data()) |
Collaborator
There was a problem hiding this comment.
Does this work correctly? From the type hints, load_graph returns GraphData, which does not have a get_data() method.
Collaborator
Author
There was a problem hiding this comment.
It depends on whether the object you import is graphdata or graphbuilder, but I've been testing it with graphbuilder graphs and it works fine.
We should try to make sure that graphbuilder is always the public API though and clear up this confusion.
Collaborator
Author
There was a problem hiding this comment.
I guess the type annotations for "load_graph"'s return type should probably be 'Any' really
Collaborator
There was a problem hiding this comment.
I assumed as much, I tried with GraphData and it failed for me
52f1482 to
165b1f8
Compare
165b1f8 to
39819d4
Compare
39819d4 to
0040e2b
Compare
Collaborator
|
closed in favor of #248 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
devCLI command whentierkreis_visualizationis installed in the python environment that can be invoked similarly to theruncommand. It will watch the user's file for changes and reload the graph based on those changes.If there are issues importing stubs it can be a little problematic, but it does work in principle.