python-dev-tools / pydtl-relativepath

pydtl-relativepath tool from pydtl community can be used to solve many issues that occurs with relative paths and imports from various modules in your complex framework.
MIT License
0 stars 0 forks source link

CURRENT_FILE is not working for jupyter notebooks #14

Open NanthagopalEswaran opened 3 weeks ago

NanthagopalEswaran commented 3 weeks ago

Checked other resources

Description

I am trying to construct a relative path from jupyter notebook.

It produces path like this:

WindowsPath('C:/Users/nanthagopal.eswaran/AppData/Local/Temp/ipykernel_21004')

Reproduce Steps

sample code (cell within sample.ipynb)

from pydtl_relativepath import rel2abs, RelativePathType

test_plan_path = rel2abs("", relative_type=RelativePathType.RELATIVE_TO_CURRENT_FILE)

test_plan_path

Error Message and Stack Trace (if applicable)

N/A

System Info

Windows 10 python version: 3.11.6 (64-bit) pydtl-relative_path: 0.2.0

NanthagopalEswaran commented 3 weeks ago

Similarly RELATIVE_TO_WORKING_DIRECTORY is not working instead it returns the CURRENT FILE directory