Skip to content
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

AbstractDataSet and AbstractVersionedDataSet should be printed meaningfully #3006

Closed
noklam opened this issue Sep 4, 2023 · 4 comments
Closed
Labels
Issue: Feature Request New feature or improvement to existing feature

Comments

@noklam
Copy link
Contributor

noklam commented Sep 4, 2023

Description

<kedro_datasets.pandas.csv_dataset.CSVDataSet object at 0x7f7f69bde2e0>}

It is always frustrating to see this when debugging. In addition, _describe() is a mandatory method so I would expect this is the default __repr__ of a dataset. What is it used for?

Context

The developer experience with dataset in interactive mode is sub-optimal. This is a quick win without much drawback

Possible Implementation

Add default __repr__ to the AbstractClasses

Possible Alternatives

Take one extra step to make them dataclass. In this case I think it still make sense to call _describe in __repr__, but maybe the default could be fallback to dataclass repr

(noted: Dataclass here isn't referring to a specific library, could be dataclasses, attrs or pydantic)

@astrojuanlu
Copy link
Member

One caveat: printing should avoid printing credentials at all costs IMHO

@noklam
Copy link
Contributor Author

noklam commented Sep 4, 2023

@astrojuanlu Good point, we can always try to mask the credentials key. Any insight how tools like Github Action magically mask environment credentials?

@astrojuanlu
Copy link
Member

astrojuanlu commented Sep 4, 2023

No idea 😅

@merelcht
Copy link
Member

Closing because this was done in #3987

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Feature Request New feature or improvement to existing feature
Projects
Archived in project
Development

No branches or pull requests

3 participants