Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Create a docs page about adding code beyond starter files #3852
Create a docs page about adding code beyond starter files #3852
Changes from 28 commits
5f4330f
036cbe0
02f0274
5875e2d
4d7a35a
ca00b72
ff01643
b858406
144783b
cf3a65f
729dc1a
2d22bbf
a58ff32
2ed9639
325489d
1853e29
9fc168e
50a5bba
3024560
0df55ba
a9f0e3a
c02309c
6ee9ad2
8e811cf
fd96088
4310cf6
0e3dcf7
fe19a45
c20e741
a508fe0
52ed71e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 5 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 7 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 7 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 7 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 15 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 19 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 29 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 30 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually avoid
utils.py
as much as possible as they are the bin for everything. It's ironic becausekedro
do haveutils
module that are left from years ago. It hasn't been growing though as we believe it's better to have explicit module.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noklam how would you then call a
.py
file that is notnodes.py
orpipeline.py
for the purpose of this example? I was thinking ofdataframe_utils.py
, but didn't like it because it adds to the impression that Kedro is only useful in data processing projects, which isn't true.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is many thing that I don't like about
utils
(just me, not a team consensus). The purpose is ill-defined and often become the place that people dump code to without thinking.Even if we go with utils. I will strip the
_utils
suffix, it feels redundant to havepandas_utils.py
underutils.py
. Then in the code I will probably dofrom <pacakge> import utils
. When I need to use it, I will useutils.pandas.func
to make it clear that this is a util namespace but notpandas
.visualitization_utils.py
could just bevisualisation
module itself.(all above are subjective)
I think it will be great to first introduce the principle of share module, what are the factors to consider. Then you can show this example. https://kedro-org.slack.com/archives/C03RKP2LW64/p1716912123397259
@datajoely do you have thought about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
questions
channel.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be really beneficial if we have something to showcase, maybe there are some projects in
awesome-kedro
that we can link to?Even just the
tree
structure of a project would be great.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that exactly what I'm adding there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example is good, but I think we can link https://github.com/kedro-org/awesome-kedro/blob/master/README.md#example-projects to direct people for more examples. It's also helpful to see real code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually went through all Kedro projects listed there, I don't think there's any one that implements shared things between pipeline in a way that would be a good example to follow here. The closest one is this one: https://github.com/pablovdcf/TFM_HADO_Cares/tree/main/hado/src/hado
Check warning on line 35 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
Check warning on line 37 in docs/source/kedro_project_setup/code_beyond_starter_files.md
GitHub Actions / runner / vale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about
find_pipelines()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My questions are:
historical_pipeline.py
andinference_pipelines.py
better thanpipelines/historical/pipeline.py
(the modular pipeline structure) that Kedro usually promotes?I think this is a viable alternative, but if this is in docs instead of a blog. I'll probably change the narrative to: There is an alternative to register pipeline manually, explaining the
pipeline.py
is just a convention and forfind_pipeline
works automatically. User still have the option to register manually if desired.@astrojuanlu thought?