https://kedro.org/ logo
#questions
Title
# questions
v

Vaibhav

11/18/2022, 12:05 PM
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

Merel

11/18/2022, 1:58 PM
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

Vaibhav

11/18/2022, 2:47 PM
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

Merel

11/18/2022, 2:49 PM
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

Vaibhav

11/18/2022, 3:00 PM
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

Merel

11/18/2022, 3:02 PM
Yes it’s definitely a good point! Feel free to open an issue and the team will address it.
v

Vaibhav

11/18/2022, 3:54 PM
Thanks Merel, I have created the issue here https://github.com/kedro-org/kedro/issues/2038
👍 1
3 Views