0Hughman0 / Cassini

Turn Jupyter Lab with Python into an electronic lab notebook (ELN)
https://0hughman0.github.io/Cassini/latest/quickstart.html
GNU General Public License v3.0
11 stars 0 forks source link

Problem using Symlinks for projects #125

Open 0Hughman0 opened 3 months ago

0Hughman0 commented 3 months ago

This line

Means if the project_folder is set to a symlink, this gets undone upon initialisation, which seems to cause problems generating relative paths because drives are different

Might be better to change to path.absolute(), although not sure if there was a good reason to use resolve() in the first place.

dirty workaround is:

# project.py
from pathlib import Path

project = Project(HIERARCHY, project_folder='P:/PhD')
project.project_folder = Path('P:/PhD')  # explicitly set again, before launch
0Hughman0 commented 3 months ago

Ah so I think this exists because resolve() is the only method that gets ride of relative paths e.g. ../above.

Is there a reason we're concerned about this? Are there tests that fail for this?

0Hughman0 commented 2 weeks ago

A workaround is just setting the project_folder value after init.