This PR adds the --update-symlink argument to the data-download.py script, and it's working as expected on my end 👍 . I added a function update_symlink() which is called in two spots:
After downloading a data release (where the code originally was before I ported it into a function)
I also added a sentence here to print out how the symlink would change if --dryrun is used
Before any creds get used (to list releases), I include an if args.update_symlink: to update the symlink as desired. This is only done if the specified directory exists, and errors out otherwise with a message that you should download the data instead. I also use sys.exit(0) to exit out after changing the symlink, since we don't want to be doing any downloads with this flag.
Let me know if there are other behaviors we'd like to see for this flag. Also, I'm not convinced my help string for this argument is as clear as it could be, what do you think?
I moved the check into the function, flipped the logic order, and also added some code to also print what would happen under the --update_symlink <arg> --dryrun flag combo.
Closes #530
This PR adds the
--update-symlink
argument to thedata-download.py
script, and it's working as expected on my end 👍 . I added a functionupdate_symlink()
which is called in two spots:--dryrun
is usedif args.update_symlink:
to update the symlink as desired. This is only done if the specified directory exists, and errors out otherwise with a message that you should download the data instead. I also usesys.exit(0)
to exit out after changing the symlink, since we don't want to be doing any downloads with this flag.Let me know if there are other behaviors we'd like to see for this flag. Also, I'm not convinced my help string for this argument is as clear as it could be, what do you think?