Skip to content
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

micropkg cannot package modules that are not directly under the src/<project_name>/ directory #2200

Closed
lamhm opened this issue Jan 12, 2023 · 4 comments
Labels
Community Issue/PR opened by the open-source community

Comments

@lamhm
Copy link

lamhm commented Jan 12, 2023

Description

micropkg cannot package sub-folders that are more than 1 level below the src/<project_name>/ folder. This has rendered micropkg unusable for pipelines (if you follow the standard folder structure of Kedro).

Steps to Reproduce

Here was my src folder structure:

src
|-- <project_name>
|   |-- io
|   |   |-- __init__.py
|   |   |-- ...
|   |-- pipelines
|       |-- ...
|       |-- clean_data
|           |-- __init__.py
|           |-- ...
|-- tests
|   |-- ...
|-- ...

Under the [tool.kedro.micropkg.package] spec of pyproject.toml, I had:

[tool.kedro.micropkg.package]
io = {}
pipelines.clean_data = {}

Then, I executed kedro micropkg package --all.

Expected Result

Both the io and the pipelines.clean_data modules should be packaged without problems.

Actual Result

Only the io module was packaged successfully.

Packaging the pipelines.clean_data module raised the following error:

TypeError: _package_micropkg() got an unexpected keyword argument 'clean_data'

My Environment

  • Kedro version used: 0.18.4
  • Python version used: 3.10.8
  • Operating system and version: Ubuntu 20.04

Important Note

To make micropkg works on Kedro 0.18.4, I have manually fixed the bug #2119 on my local environment (by following what @merelcht has described in the bug report). Without this step, micropkg would not work at all.

@merelcht merelcht added the Community Issue/PR opened by the open-source community label Jan 16, 2023
@noklam
Copy link
Contributor

noklam commented Mar 10, 2023

@lamhm Is this still failing or fixed by #2119 already?

@noklam
Copy link
Contributor

noklam commented Mar 13, 2023

Closing this as I believe this is already fixed in previous releases, feel free to re-open if it isn't the case.

@noklam noklam closed this as completed Mar 13, 2023
@lamhm
Copy link
Author

lamhm commented Mar 15, 2023

@noklam: Apologies for my late response.

While testing Kedro 0.18.6, I have just noticed that I forgot to quote the key pipelines.clean_data in the [tool.kedro.micropkg.package] section of project.toml. As soon as I surrounded pipelines.clean_data with quotation marks, micropkg worked perfectly.

So, this may be an invalid bug report. Sorry for having bothered you. And thank you very much for your support.

@noklam
Copy link
Contributor

noklam commented Mar 15, 2023

@lamhm Don't worry at all! Thanks for reporting back😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Issue/PR opened by the open-source community
Projects
Archived in project
Development

No branches or pull requests

3 participants