-
Notifications
You must be signed in to change notification settings - Fork 60
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
Move requirements to pyproject.toml files on starters #246
Conversation
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
This reverts commit 088365d. Signed-off-by: Laura Couto <[email protected]>
919a5f8
to
a87df2e
Compare
The linter on this project starts to pop out errors when the project dependencies are put directly on the pyproject.toml files. I don't know if that has to do with ruff resolving dependencies differently when they're on pyproject.toml, but it decided that
AFAIK those have been deprecated for a little while? I've changed everything to comply with the linter. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
PR with the linting updates at #249 |
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.
Left a few comments, thanks @lrcouto!
spaceflights-pandas-viz/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pandas-viz/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pandas/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pandas/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pyspark-viz/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pyspark-viz/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pyspark/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
spaceflights-pyspark/{{ cookiecutter.repo_name }}/pyproject.toml
Outdated
Show resolved
Hide resolved
Signed-off-by: Laura Couto <[email protected]>
"notebook", | ||
"kedro~={{ cookiecutter.kedro_version }}", | ||
"kedro[jupyter]", | ||
"kedro-datasets[spark, pandas, spark.SparkDataset, pandas.ParquetDataset]>=1.0", |
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.
Let's also update this requirement to >=3.0
like in all the other starters, to use the "new" way we define the dependency.
Signed-off-by: Laura Couto <[email protected]>
Should the |
I think @lrcouto was advocating for doing this in 2 steps, given that there were some unintended breakage when removing |
Yes, this. Removing requirements.txt (or making it install the dependencies from pyproject.toml) will be a bit tricky. Removing it would affect documentation, docstrings and example material that we already have and uses the Changing the content to "-e ." like it was suggested on the issue works when running a project locally, but breaks our end-to-end tests, so I'd need to investigate it a little further to figure out a way around it. It will also require changes in the tools-related functions that write the dependencies (it'll probaly need those anyway). As for keeping the redundancy, the biggest disadvantage I see is that if we have to change any dependencies, we have to make sure that we do it on both files. |
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.
Left minor suggestion on updating requirements.txt
for consistency. Overall looks good to me. 👍
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
This reverts commit 088365d. Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
…g/kedro-starters into starters-template-compatibility
Signed-off-by: Laura Couto <[email protected]>
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.
👍🏾
@@ -3,5 +3,5 @@ jupyterlab>=3.0 | |||
notebook | |||
kedro~={{ cookiecutter.kedro_version }} | |||
kedro[jupyter] | |||
kedro-datasets[spark, pandas, spark.SparkDataset, pandas.ParquetDataset]>=1.0 | |||
kedro-datasets[spark, pandas, spark.SparkDataset, pandas.ParquetDataset]>=3.0 |
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.
You'll need to update this to match with the 3.0 syntax e.g. pandas-parquetdataset
instead of pandas.ParquetDataset
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
…g/kedro-starters into starters-template-compatibility
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.
👍
Motivation and Context
Part of kedro-org/kedro#4116.
Moves project template dependencies to pyproject.toml to allow for Kedro projects created with starter templates or the example pipeline to be created with package managers like
uv
,pdm
orrye
How has this been tested?
Can be tested by creating a new kedro project with a starter and using the
--checkout
flag to get the templates from this branch. For example,uvx kedro new --starter=spaceflights-pandas --checkout=starters-template-compatibility
Should go through character creation normally, and managing dependencies with commands like
uv add
anduv remove
should work correctly, altering the pyproject.toml file and creating the uv.lock file on the project directory.Checklist