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

Describe how to use custom code with Kedro #3418

Open
astrojuanlu opened this issue Dec 12, 2023 · 4 comments
Open

Describe how to use custom code with Kedro #3418

astrojuanlu opened this issue Dec 12, 2023 · 4 comments
Labels
Community Issue/PR opened by the open-source community Component: Documentation 📄 Issue/PR for markdown and API documentation

Comments

@astrojuanlu
Copy link
Member

Description

In general, i struggle to find any documentation on how to place/use/import custom libraries with kedro

https://linen-slack.kedro.org/t/16143547/hey-all-very-new-and-excited-user-of-kedro-here-hopefully-i-#600585f1-60b6-48e3-b0b6-6d1efe01480a

Context

This is natural for people who understand that Kedro projects are mostly Python libraries, but

  1. This was not the case in Kedro<0.19, and
  2. The fact that kedro run injects the project source into the path on startup hides the fact that users can, and should, install their own code.

if str(source_dir) not in sys.path:
sys.path.insert(0, str(source_dir))

@astrojuanlu astrojuanlu added Issue: Feature Request New feature or improvement to existing feature Component: Documentation 📄 Issue/PR for markdown and API documentation labels Dec 12, 2023
@stichbury
Copy link
Contributor

@astrojuanlu If possible, pleasecould you add a bit more detail of where this content should go in the docset and who could contribute it. It looks like something that engineering should write at first draft. What's your priority here -- high-ish?

@astrojuanlu
Copy link
Member Author

I'd say this is Medium-Low priority, and something that definitely engineering should start.

I'd need a bit more time to propose an outline. There are some loose ends in our user journeys that I think would impact this content:

In addition, it was always weird to have those instructions in the "Package an entire Kedro project" page - kedro package is about distributing the code (wheel + config), docs have nothing to do with it.

Originally posted by @astrojuanlu in #3376 (comment)

We could tackle this task without revisiting these user journeys, but I think we risk introducing some inconsistent information, or making the page too long or complex.

I'll give this some more thought in the near future.

@noklam noklam added the Community Issue/PR opened by the open-source community label Mar 24, 2024
@yury-fedotov
Copy link
Contributor

Starting on this per conversation with @noklam

@merelcht merelcht moved this from To Do to In Progress in Kedro Framework May 20, 2024
@merelcht merelcht moved this from In Progress to In Review in Kedro Framework May 20, 2024
@astrojuanlu astrojuanlu removed the Issue: Feature Request New feature or improvement to existing feature label Nov 8, 2024
@astrojuanlu
Copy link
Member Author

We ended up not merging #3852 for a variety of reasons #3852 (review)

There's still appetite to give our users more guidance on how to structure their code so that it doesn't end up in a utils/ package but it's still not clear what is our blessed way.

I also stand by what I said in #3418 (comment), we'd need to look at our current user journeys. This might require a bit of research. Maybe after we've finished #4116 , given that we're considering adding a -e . in the requirements.txt file.

Let's treat this as a docs issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Issue/PR opened by the open-source community Component: Documentation 📄 Issue/PR for markdown and API documentation
Projects
Status: No status
Development

No branches or pull requests

4 participants