kedro icon indicating copy to clipboard operation
kedro copied to clipboard

[DataCatalog]: Pretty printing

Open ElenaKhaustova opened this issue 8 months ago • 9 comments

Description

Compiling the catalog at runtime hinders users' ability to assess its structure and contents effectively. They express the need for an improved visual representation of the catalog when printing.

We propose:

  1. Explore the feasibility of developing a dedicated function to compile the catalog.
  2. Implement a "pretty printing" - implement catalog.print() / catalog.__repr__ function specifically tailored to improve the visual representation of the catalog when printed or displayed.

Relates to https://github.com/kedro-org/kedro/issues/1721

Context

There is no a particular requirement from user side on how output should look like. They mention that they expect to have something better than the following to help them understand what's in the catalog when debugging:

"I have Kedro jupyter notebook opening. I have a catalog object. Maybe we could have a nicer representation when you do that. You know how many data sets are available, things like that potentially."

"pretty printing (print(catalog) should give something understandable than a long, a minima catalog.list() and maybe details on the dataset)"

Current catalog printing output

Image

Catalog datasets printing output

Image

ElenaKhaustova avatar Jun 03 '24 11:06 ElenaKhaustova