kedro-rich
kedro-rich copied to clipboard
Make your Kedro experience snazzy
kedro-rich
Make your Kedro snazzy
This is a very early work in progress Kedro plugin that utilises the awesome rich library.
The intention with this piece of work is to battle test the idea, iron out the creases potentially to integrate this as a 1st class plugin hosted at kedro-org/plugins or if we're lucky, native functionality within Kedro itself.
I'm very much looking for help developing/testing this project so if you want to get involved please get in touch.
Current Functionality
Overridden kedro run command
- Does exactly the same as a regular Kedro run but kicks the progress bars into account.
- The load/save progress tasks focus purely on persisted data and ignore ephemeral
MemoryDataSets.

- The progress bars are currently disabuled when using
ParallelRunnersinceMultiProcessingis causing issues betweenkedroandrich. Further investigation if some sort ofLock()mechanism will allow for this to work.
Logging via rich.logging.RichHandler
- This plugin changes the default
stdoutconsole logging handler in place of the class provided byrich. - This is actually required to make the progress bars work without being broken onto new lines every time a new log message appears.
- At this point we also enable the rich traceback handler.
- In order enable this purely plug-in side (i.e. not making the user change
logging.yml) I've had to do an ugly bit of monkey patching. Keen to come up with a better solution here.
Overridden kedro catalog list command
Accepts following options:
--format=yamlprovides YAML representation to stdout that can be piped into other utilities--format=jsonprovides JSON representation to stdout that can be piped into other utilities--format=tableprovides pretty representation to console for human consumption

Install the plug-in
(Option 1) Cloning the repository
The plug-in is in very early days so it will be a while before (if) this makes it to pypi
- Clone the repository
- Run
make dev-installto install this to your environment - Go to any Kedro 0.17.x project and see if it works! (Please let me know if it doesn't).
(Option 2) Direct from GitHub
- Run
pip install git+https://github.com/datajoely/kedro-richto install this to your environment. - Go to any Kedro 0.17.x project and see if it works! (Please let me know if it doesn't).
Run end to end example
Running make test-project then make test-run will...
- Install the
kedro-richpackage into the environment - Pull the 'spaceflights'
kedro-starter - Install requirements
- Execute
kedro run