ESPRI-Mod / synda

ESGF Downloader (this is a deprecated repository, the tool has now moved to https://github.com/ESGF/esgf-download)
https://espri-mod.github.io/synda/
21 stars 11 forks source link

bin/sdcleanup_tree.sh is missing in conda install #123

Open senesis opened 5 years ago

senesis commented 5 years ago

When doing synda init-env on a fresh ST_HOME using a conda install, I got :

Key file missing: bin/sdcleanup_tree.sh

AtefBN commented 5 years ago

Is there a prompt after that line that suggests to init stubs of the files? Or does synda simply stop after?

senesis commented 5 years ago

The full ouptut is

(py27) stephane@pavilion-stephane:~$ synda init-env Synda has issues reaching your credential file, in ST_HOME. Running synda checking environment tool... Key file missing: bin/sdcleanup_tree.sh You can either copy previously used file into your ST_HOME (/home/stephane/.synda) or use synda init-env command to initialize a new synda home file system with stubs to fill properly. Synda environment needs a few key files. Would you like to init the stubs of these files? y/n: y (RE)initialized a new synda environment (db and conf files). If you think this is a mistake, copy your old data files to /home/stephane/.synda (RE)initialized a new synda environment (db and conf files). If you think this is a mistake, copy your old data files to /home/stephane/.synda

So, this not blocking, at that stage

AtefBN commented 5 years ago

Both init-env and check-env subcommands check $ST_HOME sequentially for the "key" files required for synda to be able to run properly. It basically checks a list with the first item being 'bin/sdcleanup.sh' and it stops whenever a single file is missing, prompting the user to either resolve the issue manually, or use the synda environment initialization tool. This is not ideal but working as intended for now. Fyi, I think having both check-env and init-env subcommands is a bit redundant, my thinking is getting rid of init-env, and its function will be incorporated within check-env to avoid confusion and redundancy.

senesis commented 5 years ago

OK, I understand now. But what would happen if I had answer 'no' and copied manually the previous config files ? the script would still be missing, no ?

AtefBN commented 5 years ago

As long as the script remains missing, synda will throw that 'error' message. Which I understand is inconvenient for someone who wouldn't need the specific utility requiring that specific script. Might review this bit more in the future and make it more specific to the command launched, so that if the user doesn't need a specific utility, they wouldn't have to bother getting those scripts.

AtefBN commented 5 years ago

TODO: Make check-env more command specific. Building the ST_HOME environment on the go per needed files.