Hi team...when we do kedro package, it was able to...
# questions
b
Hi team...when we do kedro package, it was able to package all the standard folders, but we had custom folders like utils etc ...which it was not including it...Can you pls help how this can b done
d
Is it under
src
?
kedro package
is a a thin wrapper around `setup.py`; if you aren't writing your code in the Python package, it's not going to package it.
b
yes it is under src, what is the way to packaging these
d
Do you have
__init__.py
under
utils
?
b
No..it has these
d
It's not a package without
__init__.py
. Add that.
👍 1
b
Hi Deepyaman...thanks for the reply. I have a following scenario : 1. Run a kedro package to have the wheel file 2. Initialize a dataproc cluster creation by running a Shell script having pip install wheel, copy conf folders/files into /tmp folder 3. run pythom -m <package> .... this works fine running kedro pipelines. But I have a requirement to trigger the kedro run job after cluster is created...by submitting a job via python script. this fails bcs it is not able to find the /conf folder path ( as it is adding runtime folder after /tmp ...similar issue was there in this https://github.com/kedro-org/kedro/issues/370 , but it recommends to modify the setup.py to include /conf inside the package creation...but the code we have has setup.cfg but not setup.py...Can you pls help how to go about
d
I'd say that's less of a Kedro issue and just general Python, since you've modified your project template to use
setup.cfg
, but it's possible to include package data in any case (see https://setuptools.pypa.io/en/latest/userguide/datafiles.html). I personally wouldn't recommend packaging
conf
(Kedro excludes it because the opinion is that
conf
should be set at the place of deployment instead), but you can. 🤷 I believe in that old issue you referenced does not really recommend it; just says it's possible.