-
Notifications
You must be signed in to change notification settings - Fork 905
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
Make kedro micropkg package
use pyproject.toml
#2761
Conversation
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.
I don't have many experience with micropkg
before, I have few comments but not necessary related to this PR.
First, I expect kedro pipeline create
has symmetry to kedro micropkg package
. i.e. kedro pipeline create nok
then kedro micropkg package nok
should work, but it doesn't because I need to do kedro micropkg pipelines.nok
which isn't trivial to find in the doc. I end up have to look at the e2e test. The documentation doesn't tell me I need to do this https://docs.kedro.org/en/latest/nodes_and_pipelines/micro_packaging.html
- Error message is not very helpful for
--all
, I am pretty lost when it talks about manifest and
(kedro_core) pattern main % kedro micropkg package
Please specify a micro-package name or add '--all' to package all micro-packages in the 'pyproject.toml' package manifest section.
(kedro_core) pattern main % kedro micropkg package --all
Nothing to package. Please update the 'pyproject.toml' package manifest section.
I also did a manual test to create micropkg and install it
kedro micropkg pipelines.nok
pip install dist/nok-0.1.tar.gz
This works fine but when I try to uninstall it I notice it is also in test
folder which I didn't expect.
(kedro_core) pattern main % pip uninstall nok
Found existing installation: nok 0.1
Uninstalling nok-0.1:
Would remove:
/Users/Nok_Lam_Chan/miniconda3/envs/kedro_core/lib/python3.8/site-packages/nok-0.1.dist-info/*
/Users/Nok_Lam_Chan/miniconda3/envs/kedro_core/lib/python3.8/site-packages/nok/*
/Users/Nok_Lam_Chan/miniconda3/envs/kedro_core/lib/python3.8/site-packages/tests/* <- what is this?
Thanks a lot @noklam !
This is good feedback, we should add that to #1536
This works on
Couldn't reproduce this 🤔 but I have an idea of how it could have happened. |
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.
Nice and simple solution 👍
I think @noklam raised some very good points, which we need to address. If no tickets exist yet for these issues, let's add them to: https://github.com/kedro-org/kedro/milestone/21
I test it with |
eb08378
to
7723112
Compare
Will this still work for users who are still using setup.py in their existing Kedro projects? Do we need to make any considerations for them? |
Yes indeed - in fact, currently the templates still use That's for |
7723112
to
37526f2
Compare
Fix gh-2414. Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
37526f2
to
80055fd
Compare
Description
Fix gh-2414.
Initially, I tried to be smart and also rework how
requirements.txt
files are handled. But in the end I opted for this simple solution (just replacingsetup.py
withpyproject.toml
) and it looks like it's simple and it works.Thanks to gh-2614, not many code changes were required because essentially the
pull
code is now packaging-agnostic. The only part I had to touch was the on-the-fly generation of the file. Not even the tests needed to be touched.Development notes
Checklist
RELEASE.md
file