Allow user to define pubmlst location
Because of permissions, non-admin users can't run some code, e.g. fastmlst --scheme-list results in following error:
Traceback (most recent call last):
File "/opt/anaconda3/envs/fastmlst/bin/fastmlst", line 122, in <module>
pathdb.mkdir(exist_ok=True, parents=True)
File "/opt/anaconda3/envs/fastmlst/lib/python3.11/pathlib.py", line 1116, in mkdir
os.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/opt/anaconda3/envs/fastmlst/lib/python3.11/site-packages/fastmlst/pubmlst'
This is indeed a significant issue, which I did not consider during the development of FastMLST. A potential solution that you could try is to install FastMLST using conda with your non-administrator user account. Would this be a viable option for you?
Not really. Each user should be able to update the db, not only an admin. Moreover, if you allow the user to specify the scheme db location, multiple scheme db versions can be used without overwriting an existing db.
What other commands are you unable to run?
Adding an option to save the DB in a different path sounds reasonable!, but the downside is that this option would need to be specified for each run of FastMLST. Would this be inconvenient for you?
To better understand your situation, are you using FastMLST on a shared cluster? I ask this because the system administrator installed FastMLST, whereas I would expect each user to install it themselves.
Well, I tried as a regular user so stopped trying further. Regular users are not allowed to install conda environment on our server, they can only execute them. I think you could add a default location for the argument (eg. --pubmlst_location or wathever it's called) with a default path provided to argparse. So if the user doens't add the argument in the shell, the default value would be used, else it parses the db location added by the user. I would think in that direction to resolve this.
That's a good idea; it shouldn't break any base code. I will modify the code and close this issue upon updating the code.
Thank you for reporting this, and I hope it won't cause too much delay in your work.