Andrew Stewart
08/31/2022, 6:34 PMproject_version
in pyproject.toml
seems to correspond to the version of Kedro, not the actual project at hand. Is the package version in src/setup.py
the right place, or is that being controlled by some higher level process?Antony Milne
08/31/2022, 8:35 PMpyproject.toml
version should correspond to your project template’s version (i.e. the kedro version when you did kedro new
). The one in requirements.txt (which goes to setup.py) should correspond to the version of kedro you have installed as a python dependency (like pip install kedro
) used when you do kedro run
etc. Very often these will be the same, but it’s also common to e.g. start your project with 0.18.0
and then pip install -U kedro
when new versions come out since they will have new bug fixes, features, etc. which in general don’t need a change to your project template. Anything in the 0.18.x
line of kedro releases will be non-breaking, so compatible with a project with any other 0.18.x
template. Hence the recommended pattern would be to specify e.g. kedro~=0.18.0
in your requirements file so you can take advantage of the new 0.18.x
features without it trying to upgrade to 0.19.0
which will not be backwards compatible.Andrew Stewart
08/31/2022, 8:49 PMNok Lam Chan
08/31/2022, 9:02 PMsrc/setup.py
is the right place to manage your own project’s versionAndrew Stewart
08/31/2022, 9:25 PM__init__.py
as described here ?Antony Milne
09/01/2022, 8:14 AM__version__
as set in __init__.py
. I’m not sure why it doesn’t seem to do so currently, i.e. we have version="0.1"
manually set.kedro package
and trying to distribute your project. The vast majority of people will never change that version
(or the kedro project template version in pyproject.toml
).kedro
version, as in kedro -V
or pip show kedro
2. The version of the kedro template that your project was started with - specified in pyproject.toml
3. Your project version - only relevant for packaging purposes. Specified in __version__
in __init__.py
and in version
in setup.py
. Not sure why this seems to be duplicated, probably a mistake
4. (optional) pipeline versions, specified in __init__.py
within a pipeline folder e.g. src/pipelines/data_engineering/__init__.py
. This enables you to version each pipeline independently, which is rarely done but useful if you need pull/push/distribute/manage multiple pipelines