hi folks, I'm finding some interesting behavior of...
# questions
j
hi folks, I'm finding some interesting behavior of paths in the catalog when working from notebooks. my catalog entry looks like this:
Copy code
openrepair-0_3-events-raw:
  type: polars.CSVDataSet
  filepath: data/01_raw/OpenRepairData_v0.3_aggregate_202210.csv
but if I try to load the data from a notebook in
notebooks/
with this code:
Copy code
conf_loader = ConfigLoader("../conf")
conf_catalog = conf_loader.get("catalog.yml")
catalog = DataCatalog.from_config(conf_catalog)

catalog.load("openrepair-0_3-events-raw")
then I get a "file not found" error. however, if I change the
filepath:
to
../data/...
or I move the notebook one directory up or if I use the
kedro.ipython
extension, the error goes away. my aim is to show how to gradually move from non-Kedro to Kedro, and as an intermediate stage, I'm loading the catalog manually. I suppose there's some extra magic happening under the hood that properly resolves the paths?
d
so the discrepancy here is what happens with
bootstrap_package()
it’s going to pull from config in
pyproject.toml
and situate your project properly in terms of
src
location and
PYTHONPATH
tuff
j
I see, thanks a lot!