Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
Changes visualize driver functions to return graphviz object (#286)
Browse files Browse the repository at this point in the history
* Changes visualize driver functions to return graphviz object

This change is backwards compatible. It returns and wires
through returning the graphviz object created. That way in a notebook,
it can render the DAG for you.

It also makes saving to a file optional -- you just need to
pass in None explicitly. Adds test for it.

The hello world example is also updated with a real notebook
and shows Thierry Jean's approach of using the autoreload
extensions.

* Adds one more assert to test
  • Loading branch information
skrawcz authored Jan 27, 2023
1 parent 07607a2 commit 53f191d
Show file tree
Hide file tree
Showing 6 changed files with 596 additions and 73 deletions.
4 changes: 2 additions & 2 deletions examples/hello_world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ File organization:
* `my_functions.py` houses the logic that we want to compute. Note how the functions are named, and what input
parameters they require. That is how we create a DAG modeling the dataflow we want to happen.
* `my_script.py` houses how to get Hamilton to create the DAG and exercise it with some inputs.
* `my_notebook_script.py` houses how one might iterate in a notebook environment and provide a way to inline define Hamilton
* `my_notebook.ipynb` houses how one might iterate in a notebook environment and provide a way to inline define Hamilton
functions and add them to the DAG constructed. To be clear, it is not used by `my_script.py`, but showing an alternate path
to running things.
to running/developing things.

To run things:
```bash
Expand Down
Loading

0 comments on commit 53f191d

Please sign in to comment.