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

Improve docstring for add_feed_dict #3612

Closed
merelcht opened this issue Feb 9, 2024 · 3 comments
Closed

Improve docstring for add_feed_dict #3612

merelcht opened this issue Feb 9, 2024 · 3 comments
Assignees

Comments

@merelcht
Copy link
Member

merelcht commented Feb 9, 2024

Description

In the catalog we have a method called add_feed_dict. Which is arguably one of the worst named methods in the public API. Unfortunately, renaming it is a breaking change. For 0.20.0 we should totally rename it, but in the mean time we should add a better docstring explanation so that engineers working on this code can better understand what it does.

Context

This method was added a long time ago, likely even before Kedro was called Kedro, which git blame doesn't even know about. It was added before the catalog could be loaded from yaml and is supposed to describe how data can be "fed" into the catalog dictionary. The term "feed_dict" might come from clojure or tensorflow lingo, nobody really remembers 🤷

@datajoely
Copy link
Contributor

I would consider introducing a more intuitive name, especially with newbies in mind. We can introduce the new name as an alias to ease breaking APIs.

Some ideas of the top of my head:

  • from_objects
  • from_dict

@astrojuanlu
Copy link
Member

+1 to @datajoely 's idea because it also moves away from mutability

@ElenaKhaustova
Copy link
Contributor

Solved in #4009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants