Open noklam opened 9 months ago
+1000 this is a very common annoyance.
Aside from # noqa
, another idea is to supplement a dummy pipeline? For example
def create_pipeline(**kwargs) -> Pipeline:
return pipeline([
node(
func=...,
inputs=...,
outputs=...,
)
])
@astrojuanlu It sounds good to me at first, but then I think it may causes issues because of pipeline autodiscovery. As soon as someone do kedro pipeline create
, their __default__
pipeline will get a random dummy node.
For context, this comes from
Let's do a quick exploration of how the UX is like in the case of a dummy node, if it's too bad or confusing let's settle on # noqa
, but @deepyaman pointed out that this will remain in users code.
Another option, is to have
from kedro.pipeline import Pipeline, pipeline # , node
Another user complained about this today
Description
A user was facing this problem:
Brandon Meek 26 minutes ago Sorry, I meant from the boilerplate created after running kedro pipeline create ...
Context
The current CLI created this file, it used to import
node
also but was removed when we introducedruff
.The problem is because
node
is not used so the linter pick it up. We should either have a #noqa or have linter skip the template file.Expected Result
Expectation is that
kedro pipeline create
creates a runnable pipeline with the correct imports.Actual Result
The
node
import is missing.Your Environment
pip show kedro
orkedro -V
):python -V
):