LuxImagingAI / URT

A TCIA downloader for high performance computing (HPC) environments
0 stars 0 forks source link

URT should resolve the absolute path to its own base directory #12

Closed adhusch closed 1 month ago

adhusch commented 1 month ago

Currently URT is assuming that relative path are sufficient to find data dependencies.

For example with open("datasets/datasets.yaml", "r") as f:

However, this requires that the URT.py main script is called from its install folder, e.g. via cd <URT folder> , python3 URT.py ...

by resolving the path to a valid absolute path like with open(PATH_TO_URT_FOLDER + "datasets/datasets.yaml", "r") as f: it becomes possible to call URT via an alias (e.g. a symlink "URT" in /usr/bin) from ANY folder which is very convenient (simple URT --dataset <dataset_name> call from ANYwhere).

Thus I would like to suggesting populating a PATH_TO_URT_FOLDER (or whatever its called ;)) variable in URT.py first and then use it across the script.

adhusch commented 1 month ago

Addtionally I would suggest to populate the folder "OUTPUT" and "TEMP" with the current directory "." by default.

Eventually you could use URT then similar to the default behaviour of a simple wget :) i.e. cd to the local target directory and then run URT from there, which is very intuitive.