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

Allow nested folder structure in pipeline creation #3106

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Gabriel2409
Copy link

Description

This PR was created as support for discussion for issue #3105
Its goal is to enhance the kedro cli (pipeline create and delete) as well as the find_pipelines function to natively work with nested folder structure.

Development notes

create_pipeline, delete_pipeline and find_pipelines were modified and the associated unit tests were created.
Note that I had to put overwrite_if_exists to True in cookiecutter to allow creating a pipeline if a child pipeline already exists.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

Extend name argument of kedro pipeline create to accept dots as folder separator.

Make the test directory structure mirror the pipelines structure

Only include the final pipeline name in the parameters

Force the pipeline name to be globally unique (no two subfolders with the same pipeline names)

Signed-off-by: Gabriel Cournelle <gabriel.cournelle@gmail.com>
Signed-off-by: Gabriel Cournelle <gabriel.cournelle@gmail.com>
As the parameters file only include the final pipeline name,
modify the files to iterate through.

Raise an error if a pipeline to delete has a child pipeline

Signed-off-by: Gabriel Cournelle <gabriel.cournelle@gmail.com>
As there can be several types of templates, forcing a pipeline to have
an __init__.py to be valid seems like a bad idea. Instead, any valid py
file in a subfolder will prevent deletion of the parent test_pipeline.

Signed-off-by: Gabriel Cournelle <gabriel.cournelle@gmail.com>
Various tweaks to tests for create and delete pipeline. Note that to
ensure that creation succeeds even if child pipeline already exists, we
need to set overwrite_if_exists to True in cookiecutter function.

Signed-off-by: Gabriel Cournelle <gabriel.cournelle@gmail.com>
Identify all the pipelines and raise error if two pipelines have the
same name. Add associated tests

Signed-off-by: Gabriel Cournelle <gabriel.cournelle@gmail.com>
@astrojuanlu
Copy link
Member

Hi @Gabriel2409, thanks a lot for submitting this PR and sorry for the delay! This is a change that needs careful review and we are a bit busy doing the final work on the Kedro 0.19 release. We will get to your PR soon 🙏🏽

@merelcht merelcht added Stage: Technical Design 🎨 Ticket needs to undergo technical design before implementation TD: should we? Tech Design topic to discuss whether we should implement/solve a raised issue labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stage: Technical Design 🎨 Ticket needs to undergo technical design before implementation TD: should we? Tech Design topic to discuss whether we should implement/solve a raised issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants