Hey, A small question on mandatory attributes of [...
# questions
v
Hey, A small question on mandatory attributes of [tools.kedro] in pyproject.toml. I noticed that
project_name
refers to ‘name of the project’ where kedro is being used, whereas
project_version
refers to the the ‘version of kedro’ being used instead of the project version which is defined in project_name kedro validates version match as part of the checks. Is this by design that the two attributes refer to different
project
entities ?
m
Hi Vaibhav, the version validation that happens is to ensure that the version of Kedro you have installed in your environment matches that of the project. This is to ensure that the project can be run. If for example, you created a project with Kedro
0.18.0
and then upgrade the installed version to
0.18.3
you won’t be able to run your project anymore.
v
Thanks Merel, makes sense. May I suggest to call this kedro_version instead of project_version then. As project_version in this context feels like version of the project defined in project_name
m
Naming is always so tricky right! 😅 I think the hard part here is that in our check we already refer to
kedro_version
so it’s hard to differentiate:
if metadata_dict["project_version"].split(".")[:2] != kedro_version.split(".")[:2]:
v
I see what you mean, this is indeed tricky 🙂 - but wanted to raise this as at the moment project’s pyproject.toml looks a bit conflicting e.g. below. Would be happy to hear if you have any suggestions
m
Yes it’s definitely a good point! Feel free to open an issue and the team will address it.
v
Thanks Merel, I have created the issue here https://github.com/kedro-org/kedro/issues/2038
👍 1