fmi-faim / faim-ipa

A collection of Image Processing and Analysis (IPA) functions used at the Facility for Advanced Imaging and Microscopy (FAIM)
BSD 3-Clause "New" or "Revised" License
8 stars 6 forks source link

Add util to create and resolve paths relative to the git-root directory #135

Closed tibuch closed 4 months ago

tibuch commented 4 months ago

Our project code is always organized in a git-repo and it would be nice if we can store paths (e.g. in config files) as relative paths to the git-root directory.

For example:

In the config file we don't want the full path, but the relative path ../../Data/img.tif. To make this pattern easy we should add two methods:

This would allow us to convert any path during the config file generation to a relative path and in the processing scripts we can convert them back to absolute paths.