ploomber / ploomber

The fastest ⚡️ way to build data pipelines. Develop iteratively, deploy anywhere. ☁️

Home Page:https://docs.ploomber.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScriptRunner: Cannot import modules when other directories

nilbro opened this issue · comments

I am trying to run the pipeline via the ScriptRunner and am not able to import modules from other directories.
My current project structure looks like this:

└── project/
    ├── common/
    │   └── lib
    ├── file1.py --> want to import common.lib here
    ├── file2.py
    └── pipeline.yaml

Adding the project to the sys.path fixes this issues.

Note: This behaviour is not observed with the default NotebookRunner.

thanks for your feedback, we'll get to it!

commented

I have same requetst . Now I have to use sys.path.insert in every script .

@mehtamohit013 will work on this, so it will be fixed in the next version!

commented

@eromoe @nilbro we're open to new committers if it's urgent or you'd like to give it a try!

commented

@eromoe @nilbro This was merged, you can test it via the master branch.
It'll be released soon.

Thanks